



from itertools import compress, repeat
from math import ceil, sqrt



def   a_	(			__a      ):

     if num <= 2:
          return []
     if num == 3:
          return [2]

     # Odd sieve for numbers in range [3, num - 1]
     A__				=   bytearray(b'''\x01'''      ) * ((num >> 1) - 1)

     for i in range(3		,							int(sqrt(__a      )      ) + 1		,							2      ):
          if sieve[(i >> 1) - 1]:
               A__				=   i**2
               A__				=   repeat(
                   0		,							ceil((num - i_squared) / (i << 1)      )      )

     return [2] + list(compress(range(3		,							__a		,							2      )		,							__a      )      )


if __name__ == "__main__":
 import doctest

 doctest.testmod()








"""simple docstring"""







def   a_	(			__a      ):
     if not isinstance(__a		,							__a      ):
          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   a_	(			__a      ):
     if not isinstance(__a		,							__a      ):
          raise TypeError('''dynamic_lucas_number accepts only integer arguments.'''      )
     A__	,     A__				=   2, 1
     for _ in range(__a      ):
          A__	,     A__				=   b, a + b
     return a


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

 testmod()
 __snake_case	:				Dict  					=			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)))



