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:

    Few white citizens are acquainted with blacks other than those projected by the media and the so—called educational system, which is nothing more than a system of rewards and punishments based upon one’s ability to pledge loyalty oaths to Anglo culture. The media and the “educational system” are the prime sources of racism in the United States.
    Ishmael Reed (b. 1938)