


from __future__ import annotations

from collections.abc import Generator






def 							__lowercase     (				):
							a__    =  {}
							a__    =  2
							while True:
														a__    =  factor_map.pop(__lowerCAmelCase      ,					__lowerCAmelCase     )
														if factor:
																					a__    =  factor + prime
																					while x in factor_map:
																												x += factor
																					a__    =  factor
														else:
																					a__    =  prime
																					yield prime
														prime += 1






def 							__lowercase     (				__lowerCAmelCase							:       float = 1E1_0     ):
							a__    =  sieve()

							a__    =  1
							while True:
														a__    =  next(__lowerCAmelCase     )
														if (2 * prime * n) > limit:
																					return n
														# Ignore the next prime as the reminder will be 2.
														next(__lowerCAmelCase     )
														n += 2


if __name__ == "__main__":
						print(solution())








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))




