Ulam Spiral

Write the counting numbers round a spiral and dot the primes. Nobody has explained why, but they crowd onto diagonals and curves where there should be none.

Ulam Spiral: Write the counting numbers round a spiral and dot the primes. Nobody has explained why, but they crowd onto diagonals and curves where there should be none.Ulam Spiral: Write the counting numbers round a spiral and dot the primes. Nobody has explained why, but they crowd onto diagonals and curves where there should be none.

About this pattern

Stanisław Ulam, 1963 · Robert Sacks, 1994

Ulam Spiral, prime number, drawn by GART: Write the counting numbers round a spiral and dot the primes. Nobody has explained why, but they crowd onto diagonals and curves where there should be none.
Ulam Spiral · CC BY 4.0

In 1963 the mathematician Stanisław Ulam was sitting through a dull talk at a scientific meeting. To pass the time he wrote the numbers 1, 2, 3 and on in a square spiral on a grid, and circled the primes. They were not scattered at random. They lined up along diagonals, some lines dense and some almost empty, and the computer at Los Alamos soon showed that it went on for tens of thousands of numbers; the picture made the cover of Scientific American.

Behind the mathematics

Stanisław Ulam1909–1984

Doodled the square spiral in a meeting, 1963

Polish-American mathematician at Los Alamos who co-invented the Monte Carlo method and the cellular automaton, and who found the prime spiral while doodling in a meeting in 1963.

Robert Sacks

The number spiral, 1994

Creator of the number spiral, who in 1994 laid the whole numbers on an Archimedean spiral, one turn between consecutive squares, and found the primes gathering on curves.