Ulam spiral
The Ulam spiral, or prime spiral (in other languages 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 anti-clockwise out like this:
17--16--15--14--13 | | 18 05--04--03 12 | | | | 19 06 01--02 11 | | | 20 07--08--09--10 | 21--22--23--24--25...
He then circled all of the prime numbers. To his surprise, the circled numbers tended to line up along diagonal lines. The following two images illustrate this. The first image is a 150×150 Ulam spiral, where primes are black. The diagonal lines are clearly visible. The second pattern is random, where cell n is black with probability 1/log(n), so the black dots have the same density as the Ulam spiral. The lack of diagonal lines in this picture shows that the lines in the Ulam spiral are more than an optical illusion.
File:Ulam primes.png File:Ulam random.png
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:
generates an unexpectedly-large number of primes as n counts up {1, 2, 3, ...}. This was so surprising, that the Ulam spiral appeared on the cover of Scientific American in March 1964. The reasons for this pattern are still not understood.
If we connect all the points, representing primes when n runs to infinity, we might get a two-dimensional fractal in a square.
References
- Stein, M. and Ulam, S. M. (1067), "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.
- Links to Ulam spiral pages
- Nice pictures
- An applet that draws spirals of various sizes
- An applet with source code