Skip to content

AlanLattimore/sieve_of_eratosthenes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Eratosthenes’s original algorithm was based on the idea of removing non-primes from a list of integers. The next unremoved integer must be prime, because it was not divisible by any of the smaller primes.

Make a list of the integers from 2 to n.
For each integer i, 2 <= i <= n
    If i has not been crossed out
       Cross out all multiples of i (except i itself).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages