code: def SCREAMING_SNAKE_CASE				(     lowercase_:	list				):
         if not isinstance(lowercase_		,						lowercase_				):
                raise ValueError('Input series is not valid, valid series - [1, 2/3, 2]'				)
         if len(lowercase_				) == 0:
                raise ValueError('Input list must be a non empty list'				)
         if len(lowercase_				) == 1 and series[0] != 0:
                return True
         _UpperCamelCase     :       str  						=  []
         _UpperCamelCase     :       Tuple  						=  len(lowercase_				)
         for i in range(0		,						lowercase_				):
                if series[i] == 0:
                       raise ValueError('Input series cannot have 0 as an element'				)
                rec_series.append(1 / series[i]				)
         _UpperCamelCase     :       Dict  						=  rec_series[1] - rec_series[0]
         for index in range(2		,						lowercase_				):
                if rec_series[index] - rec_series[index - 1] != common_diff:
                       return False
         return True
  
  
  def SCREAMING_SNAKE_CASE				(     lowercase_:	list				):
         if not isinstance(lowercase_		,						lowercase_				):
                raise ValueError('Input series is not valid, valid series - [2, 4, 6]'				)
         if len(lowercase_				) == 0:
                raise ValueError('Input list must be a non empty list'				)
         _UpperCamelCase     :       Any  						=  0
         for val in series:
                answer += 1 / val
         return len(lowercase_				) / answer
  
  
  if __name__ == "__main__":
   import doctest
  
   doctest.testmod()
  
  
  
  
style_context: import math
  from collections.abc import Generator
  
  
  def SCREAMING_SNAKE_CASE				(     lowercase_:	int				):
         _UpperCamelCase     :       Generator  						=  (i for i in range(1		,						(max_n + 1)				))
         for i in (n for n in numbers if n > 1):
                for j in range(2		,						lowercase_				):
                       if (i % j) == 0:
                              break
                else:
                       yield i
  
  
  def SCREAMING_SNAKE_CASE				(     lowercase_:	int				):
         _UpperCamelCase     :       Generator  						=  (i for i in range(1		,						(max_n + 1)				))
         for i in (n for n in numbers if n > 1):
                # only need to check for factors up to sqrt(i)
                _UpperCamelCase     :       Any  						=  int(math.sqrt(lowercase_				)				) + 1
                for j in range(2		,						lowercase_				):
                       if (i % j) == 0:
                              break
                else:
                       yield i
  
  
  def SCREAMING_SNAKE_CASE				(     lowercase_:	int				):
         _UpperCamelCase     :       Generator  						=  (i for i in range(1		,						(max_n + 1)		,						2				))
         # It's useless to test even numbers as they will not be prime
         if max_n > 2:
                yield 2  # Because 2 will not be tested, it's necessary to yield it now
         for i in (n for n in numbers if n > 1):
                _UpperCamelCase     :       Tuple  						=  int(math.sqrt(lowercase_				)				) + 1
                for j in range(3		,						lowercase_		,						2				):
                       # As we removed the even numbers, we don't need them now
                       if (i % j) == 0:
                              break
                else:
                       yield i
  
  
  def SCREAMING_SNAKE_CASE				(     ):
         from timeit import timeit
  
         _UpperCamelCase     :       Optional[Any]  						=  'from __main__ import slow_primes, primes, fast_primes'
         print(timeit('slow_primes(1_000_000_000_000)'		,						setup=lowercase_		,						number=1000000				)				)
         print(timeit('primes(1_000_000_000_000)'		,						setup=lowercase_		,						number=1000000				)				)
         print(timeit('fast_primes(1_000_000_000_000)'		,						setup=lowercase_		,						number=1000000				)				)
  
  
  if __name__ == "__main__":
   UpperCAmelCase					=				int(input('''Calculate primes up to:\n>> ''').strip())
   for ret in primes(number):
    print(ret)
   benchmark()
  
  
  
  