Eratosthenes sieve

Eratosthenes sieve of a given length up to 10 quadrillion. Over 100 million we use segmented sieve.

For advanced sieves, see eratostenes on GitHub.

Total of primes smaller or equal than 2 is 1, it took 1 μs. Used eratosthenes sieve.

Last one prime of the sieve:

2