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:
“Ones prime is elusive. You little girls, when you grow up, must be on the alert to recognize your prime at whatever time of your life it may occur. You must then live it to the full.”
—Muriel Spark (b. 1918)