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.
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.
Stanisław Ulam, 1963 · Robert Sacks, 1994

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.
A diagonal of the spiral is a quadratic, a rule like 4n² + 2n + 1, and some quadratics are rich in primes while others can never be prime at all. Leonhard Euler's n² + n + 41 is prime for every n from 0 to 39: start the spiral at 41 and it is one solid diagonal through the middle. In 1994 Robert Sacks drew another spiral, an Archimedean one, with each number n at angle 2π√n and distance √n, so that every perfect square falls due east of the centre.
The same quadratics become curves sweeping out from the centre. Showing divisors instead, every number gets a dot as big as the number of its divisors: the primes, with two, are the smallest, and the busiest numbers, like 5040 with its sixty, stand out. In motion a ripple runs out from the centre.
Behind the mathematics
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.
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.
n² + n + 41, prime for every n up to 39, 1772
Swiss mathematician who in 1744 found the catenoid, the surface made by spinning a hanging chain, and showed it encloses the least area between two rings.