Labs / Mathematics
Sieve of Eratosthenes
Start with every whole number from 2 up. Circle the smallest survivor, cross out all of its multiples, and repeat — whatever is left standing is prime. Press Play to watch it run, or drag across the grid to sieve straight to a number.
primes 0sieving —density 0.000
What to try
- Once you have struck out the multiples of 2, 3, 5 and 7, why is everything still standing below 121 guaranteed to be prime?
- Turn on “colour by smallest factor.” Which colour claims the most squares, and why should that one always win?
- Push N up to 400 and watch the density readout. Do primes get rarer as the numbers grow, or does the thinning slow down?
- Every prime except 2 and 3 sits right next to a multiple of 6. Can you spot that pattern in the coloured grid?
- Can you find two primes that differ by just 2 — and do these twin pairs keep appearing no matter how far you sieve?