← All animations

πŸ”’ The Hidden Order of Primes

A prime number is a whole number greater than 1 whose only divisors are 1 and itself β€” 2, 3, 5, 7, 11, 13, … (2 is the smallest, and the only even prime; 1 is not prime). They look scattered, yet a 2,000-year-old sieve picks them out cleanly, and a simple spiral reveals a startling pattern hiding inside them. Scroll through the two animations to see it.

1. The Sieve of Eratosthenes

Write the numbers 1–120 in a grid. Take the first uncrossed number above 1 β€” that's a prime. Keep it, then cross out every multiple of it (those have an extra divisor, so they're composite). Repeat with the next survivor: 2, then 3, 5, 7… Whatever is left standing at the end are exactly the primes.

Ready β€” press Step or Auto-play
prime (kept) crossed out (composite) current prime being used still undecided

2. The Ulam Spiral

Now lay the integers out in a square spiral β€” 1 at the centre, winding outward β€” and light up only the primes. If primes were random, they'd be sprinkled evenly. Instead they crowd onto surprising diagonal lines (each diagonal is a quadratic like 4nΒ²+something) β€” a hidden order no one fully understands. Drag the slider to plot more numbers.

1–2601