Ulam spiral

From Example Problems
Jump to navigation Jump to search

The Ulam spiral, or prime spiral (in other languages also called Ulam cloth) is a simple method of graphing the prime numbers that reveals a pattern which has never been fully explained. It was discovered by the mathematician Stanislaw Marcin Ulam in 1963, while doodling on scratch paper at a scientific meeting. Ulam, bored that day, wrote down a regular grid of numbers, starting with 1 at the center, and spiraling out like this:

He then circled all of the prime numbers and he got the following picture:

To his surprise, the circled numbers tended to line up along diagonal lines. The following image illustrates this. This is a 200×200 Ulam spiral, where primes are black. Black diagonal lines are clearly visible.

Ulam spiral of size 200×200

It appears that there are diagonal lines no matter how many numbers are plotted. This seems to remain true, even if the starting number at the center is much larger than 1. This implies that there are many integer constants b and c such that the function:

f(n) = 4 n2 + b n + c

generates an unexpectedly-large number of primes as n counts up {1, 2, 3, ...}. This was so significant, that the Ulam spiral appeared on the cover of Scientific American in March 1964.

At sufficient distance from the centre, horizontal and vertical lines are also clearly visible.

External links


  • Stein, M. and Ulam, S. M. (1967), "An Observation on the Distribution of Primes." Amer. Math. Monthly 74, 43-44.
  • Stein, M. L.; Ulam, S. M.; and Wells, M. B. (1964), "A Visual Display of Some Properties of the Distribution of Primes." Amer. Math. Monthly 71, 516-520.
  • Gardner, M. (1964), "Mathematical Recreations: The Remarkable Lore of the Prime Number." Sci. Amer. 210, 120-128, March 1964.

de:Ulam-Spirale fr:Spirale d'Ulam sl:Ulamov prt