Project Euler 7: The 10001st Prime with a Sieve of Eratosthenes That Doubles in Size
Finding the n-th prime when the sieve bound is unknown: start small and double. We derive the sieve from trial division, show why doubling costs only a constant factor, with C++17 and Python 3 code.
Project Euleralgorithmsmathprimes