


def 							__lowercase     (				__lowerCAmelCase							:       int     ):

							if num <= 0:
														raise ValueError('Input must be a positive integer'     )

							a__    =  [True] * (num + 1)

							a__    =  2
							while p * p <= num:
														if primes[p]:
																					for i in range(p * p      ,					num + 1      ,					__lowerCAmelCase     ):
																												a__    =  False
														p += 1

							return [prime for prime in range(2      ,					num + 1     ) if primes[prime]]


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						snake_case							: Any      =   int(input('''Enter a positive integer: ''').strip())
						print(prime_sieve_eratosthenes(user_num))








def 							__lowercase     (				__lowerCAmelCase							:       int     ):

							if length <= 0 or not isinstance(__lowerCAmelCase      ,					__lowerCAmelCase     ):
														raise ValueError('Length must be a positive integer.'     )
							return [n * (2 * n - 1) for n in range(__lowerCAmelCase     )]


if __name__ == "__main__":
						print(hexagonal_numbers(length=5))
						print(hexagonal_numbers(length=10))




