import functools import itertools import operator def prime_generator(n): """ Sieve of Eratosthenes Create a candidate list within which non-primes will be marked as None. """ cand = [i for i in range(3, n + 1, 2)] end = int(n ** 0.5) // 2 # Loop over candid...