Home▸Mathematics▸Ulam Spiral — Patterns in the Primes (2D)

🌀 Ulam Spiral — Patterns in the Primes (2D)

Interactive 2D Ulam spiral: integers laid out on a square spiral with prime numbers highlighted as bright dots. Pan, zoom, adjust the grid size and reveal prime-rich diagonals like n²+n+41.

Mathematics2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-ulam-spiral ↗ Open standalone
⚙ Under the hood

Watch integers spiral outward in a square grid while real prime numbers, found with a genuine Sieve of Eratosthenes, light up as bright dots. Pan, zoom and highlight prime-rich diagonals like n²+n+41 to see the pattern Stanislaw Ulam discovered in 1963.

mathprimesnumber-theoryspiral2dcanvas

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)