primegen is a small, fast library to generate prime numbers in order. Can generate primes up to 1000000000000000, although it is not optimized for primes past 32 bits. It uses the Sieve of Atkin instead of the traditional Sieve of Eratosthenes.

WWW: https://cr.yp.to/primegen.html
