A

# Ulam spiral

The Ulam spiral is a remarkable geometric pattern accidentally found among the prime numbers by Stanislaw Ulam;1 it is also known as the prime spiral. During a boring meeting one day in 1963, Ulam drew a square, marked the number 1 at the center, and then wrote the increasing whole numbers as spiral that wound its way out to the edge of the paper. He then circled all the prime numbers and was immediately struck by how they tended to fall on diagonal lines radiating from the central 1. In Ulam's words the arrangement of primes "appears to exhibit a strongly nonrandom appearance." Ulam rushed home and expanded the spiral to cover a much larger portion of the number sequence. The strange pattern persisted. Primes had a tendency to occur in clusters and all clusters tended to make a beautiful image that couldn't be predicted. With the help of computers this pattern can now be explored almost indefinitely and it reveals a wonderfully rich combination of symmetry and surprise – very reminiscent of some fractals.

The Ulam spiral should perhaps be known as the "Clarke spiral" in view of the fact that Arthur C. Clarke described the phenomenon in his novel The City and the Stars (1956, Ch. 6, p. 54),2 predating Ulam's discovery by several years. Clarke wrote:

Jeserac sat motionless within a whirlpool of numbers. The first thousand primes... Jeserac was no mathematician, though sometimes he liked to believe he was. All he could do was to search among the infinite array of primes for special relationships and rules which more talented men might incorporate in general laws. He could find how numbers behaved, but he could not explain why. It was his pleasure to hack his way through the arithmetical jungle, and sometimes he discovered wonders that more skillful explorers had missed. He set up the matrix of all possible integers, and started his computer stringing the primes across its surface as beads might be arranged at the intersections of a mesh.

### References

1. Stein, M. L., Ulam, S. M., and Wells, M. B. "A Visual Display of Some Properties of the Distribution of Primes." Amer. Math. Monthly, 71: 516-520, 1964.
2. Clarke, Arthur C. The City and the Stars. New York: Harcourt, Brace, 1956.