



def 	__snake_case      (     _UpperCAmelCase							):
    if not isinstance(_UpperCAmelCase  ,					_UpperCAmelCase							):
        raise TypeError('''recursive_lucas_number accepts only integer arguments.'''							)
    if n_th_number == 0:
        return 2
    if n_th_number == 1:
        return 1

    return recursive_lucas_number(n_th_number - 1							) + recursive_lucas_number(
        n_th_number - 2							)





def 	__snake_case      (     _UpperCAmelCase							):
    if not isinstance(_UpperCAmelCase  ,					_UpperCAmelCase							):
        raise TypeError('''dynamic_lucas_number accepts only integer arguments.'''							)
    __a			,  __a					=							2, 1
    for _ in range(_UpperCAmelCase							):
        __a			,  __a					=							b, a + b
    return a


if __name__ == "__main__":
 from doctest import testmod

 testmod()
 __snake_case		:Union[str, Any] 						=	int(input('''Enter the number of terms in lucas series:\n''').strip())
 print('''Using recursive function to calculate lucas series:''')
 print(''' '''.join(str(recursive_lucas_number(i)) for i in range(n)))
 print('''\nUsing dynamic function to calculate lucas series:''')
 print(''' '''.join(str(dynamic_lucas_number(i)) for i in range(n)))










def 	__snake_case      (     _UpperCAmelCase							):
    __a					=							1
    __a					=							0
    __a					=							1
    __a					=							1
    __a					=							3
    __a					=							3
    __a					=							limit
    __a					=							0

    __a					=							''''''
    while counter != decimal + 1:
        if 4 * q + r - t < n * t:
            result += str(_UpperCAmelCase							)
            if counter == 0:
                result += "."

            if decimal == counter:
                break

            counter += 1
            __a					=							10 * (r - n * t)
            __a					=							((10 * (3 * q + r)) // t) - 10 * n
            q *= 10
            __a					=							nr
        else:
            __a					=							(2 * q + r) * l
            __a					=							(q * (7 * k) + 2 + (r * l)) // (t * l)
            q *= k
            t *= l
            l += 2
            k += 1
            __a					=							nn
            __a					=							nr
    return result





def 	__snake_case      (     ):
    print(f'{calculate_pi(50							) = }'							)
    import doctest

    doctest.testmod()


if __name__ == "__main__":
 main()





