← Back to Gallery

Ulam Spirals

Explore the beautiful patterns hidden in prime numbers through Stanislaw Ulam's famous spiral visualization, discovered during a boring meeting in 1963.

20
Visualizations
Primes
01

Classic Ulam Spiral

The original visualization with primes highlighted on a square spiral grid

02

Animated Growth

Watch the spiral grow number by number, revealing prime patterns

03

Interactive Zoom

Pan and zoom to explore millions of primes in the spiral

04

Twin Primes

Highlight twin primes (p and p+2) with special colors

05

Prime Gaps

Visualize the distances between consecutive primes

06

Diagonal Patterns

Highlight the mysterious diagonal lines where primes cluster

07

Modular Colors

Color primes by their remainder when divided by various numbers

08

Particle Spiral

Primes as glowing particles orbiting in the spiral

09

Sieve Animation

Watch the Sieve of Eratosthenes reveal primes on the spiral

10

Prime Density

Heatmap showing prime density in different regions

11

Hexagonal Ulam

The spiral on a hexagonal grid instead of square

12

Sophie Germain Primes

Highlight primes p where 2p+1 is also prime

13

3D Helix Spiral

The Ulam spiral extended into three dimensions

14

Prime Constellations

Connect nearby primes to form beautiful constellation patterns

15

Goldbach Spiral

Visualize Goldbach partitions on the spiral

16

Palindromic Primes

Highlight primes that read the same forwards and backwards

17

Morphing Spiral

Watch the spiral transform between different mathematical bases

18

Prime Factorization

Color composite numbers by their largest prime factor

19

Lucky Numbers

Compare primes with lucky numbers on the same spiral

20

Prime Races

Visualize the race between primes of form 4k+1 vs 4k+3