def common_denominator(number_one, number_two, range_one, range_two):
    """
    Recursion solution to this problem even though it is not the best way of doing it.

    Base case is when the modulo of both numbers and the second range value is zero,
    or if they are the same.

    Parameters
    ----------
    number_one : int
        the first number of the two numbers to find the common denominator between.
    number_two : int
        the second number of the two numbers to find the common denominator between.
    range_one : int
        the lowest integer for a range of values to find the common denominator in.
    range_two : int
        the highest integer for a range of values to find the common denominator in.

    Returns
    ------
    Integer
        the value that the two input have number both have a denominator with, or the lowest int
        in the range given if no denominator was found.

    """
    if number_one % range_two == 0 and number_two % range_two == 0:
        return range_two
    if range_one == range_two:
        return range_one
    return common_denominator(number_one, number_two, range_one, range_two-1)