Prime Sieves
A prime sieve or prime number sieve is a fast type of algorithm for finding primes. There are many prime sieves. The simple sieve of Eratosthenes, the faster but more complicated sieve of Atkin, and the various wheel sieves are most common.
A prime sieve works by creating a list of all integers up to a desired limit and progressively removing composite numbers (which it directly generates) until only primes are left. This is the most efficient way to obtain a large range of primes; however, to find individual primes, direct primality tests are more efficient.
Read more about this topic: Generating Primes
Famous quotes containing the word prime:
“Ye elms that wave on Malvern Hill
In prime of morn and May,
Recall ye how McClellans men
Here stood at bay?”
—Herman Melville (18191891)