← Back to all activities한국어 →
🌀 Ulam Prime Spiral

Arrange numbers in a spiral
and primes line up

If 1, 2, 3, ... are simply placed in a line, primes appear scattered without any pattern. But arrange the numbers in a spiral and primes often appear along diagonal lines. Mathematician Stanisław Ulam reportedly discovered this while doodling during a boring meeting in 1956.

Place 1 at the center, then fill 2, 3, 4, ... in a growing spiral, moving right → up → left → down.

Mark primes (numbers divisible only by 1 and themselves) as dots and leave the rest blank. The primes then appear unusually often along certain diagonals — a pattern that mathematicians still cannot fully explain.

Click a cell to see which number it contains
Spiral size31 × 31
Starting number (center)1
Fun fact: The formula n² − n + 41 (n=0,1,2,...) is famous because its first 40 values are all prime. Click "Start from 41" above and follow the diagonal extending up and to the right from 41 at the center.

🌀 Ulam Prime Spiral Quiz

Question 1/3 · Correct 0 correct