PlanetMath (more info)
 Math for the people, by the people.
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: Very high Entry average rating: No information on entry rating
sieve of Eratosthenes (Definition)

The sieve of Eratosthenes is a simple algorithm for generating a list of the prime numbers between $ 1$ and some integer $ N\geq 2$.

Let $ p=2$, which is of course known to be prime. Mark all positive multiples of $ p$ (e.g. $ 2, 4, 6, 8 \dots$), up until $ N$, as composite. Now let $ p$ be the smallest number not marked as composite (in this case, $ 3$); it must be the next prime. Again, mark all positive multiples of $ p$ as composite. Continue this process while $ p \leq \sqrt{N}$. When done, all numbers less than $ N$ that have not been marked as composite are prime.

For many years, the sieve of Eratosthenes was the fastest known algorithm for listing primes. Today, there are faster methods, such as a quadratic sieve.



"sieve of Eratosthenes" is owned by mathcam. [ full author list (2) | owner history (1) ]
(view preamble | get metadata)

View style:

See Also: Brun's pure sieve

Log in to rate this entry.
(view current ratings)

Cross-references: quadratic sieve, number, composite, multiples, positive, integer, prime numbers, generating, algorithm, simple
There are 5 references to this entry.

This is version 3 of sieve of Eratosthenes, born on 2002-05-22, modified 2004-11-22.
Object id is 2928, canonical name is SieveOfEratosthenes.
Accessed 7064 times total.

Classification:
AMS MSC11A41 (Number theory :: Elementary number theory :: Primes)

Pending Errata and Addenda
None.
[ View all 1 ]
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add derivation | add example | add (any)