Skip to content

This is a HTML visualization of the Sieve of Eratosthenes algorithm using Javascript.

Notifications You must be signed in to change notification settings

matthewoates/eratosthenes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is a visualization of the Sieve of Eratosthenes algorithm for finding prime numbers.

This project uses Typescript. To install typescript, run 'npm install -g typescript'

To build, run 'make'

Here is the pseudocode of the algorithm from wikipedia.org:

for i = 2, 3, 4, ..., sqrt(n) :
    if A[i] is true:
        for j = i^2, i^2 + i, i^2 + 2i, ..., n:
            A[j] := false
# Now all i such that A[i] is true are prime.

to view, open animation.html in a browser

You can also view the live version here: http://www.mattoates.me/projects/primes/

About

This is a HTML visualization of the Sieve of Eratosthenes algorithm using Javascript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published