Generating Primes - Prime Sieves

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:

    What was lost in the European cataclysm was not only the Jewish past—the whole life of a civilization—but also a major share of the Jewish future.... [ellipsis in source] It was not only the intellect of a people in its prime that was excised, but the treasure of a people in its potential.
    Cynthia Ozick (b. 1928)