Jump to content

Ulam spiral

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by XJaM (talk | contribs) at 13:44, 25 August 2002 (restoring vandalism of original work). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 counterclockwise out like this:

    17--16--15--14--13
     |               |
    18   5-- 4-- 3  12
     |   |       |   |
    19   6   1-- 2  11
     |   |           |
    20   7-- 8-- 9--10
     |
    21--22--23--24--25 ...

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

    17--  --  --  --13
     |               |
         5--  -- 3  
     |   |       |   |
    19           2  11
     |   |           |
         7--  --  --
     |
      --  --23--  --  ...

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:

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

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.

Other types of Ulam prime spirals

We can observe other arithmetic and number theory's properties of primes in the same manner.

For instance we can also consider the Möbius function μ(n) for every n and we get the following picture with four colours: blue if μ(n) = 0, magenta if μ(n) = -1, green if μ(n) = -1 and red if μ(n) = -1 and n is prime (Ulam prime spiral):

File:Ulmo001.gif Ulam prime spiral on a plane with fixed point n=1 represented together with μ(n).

We can watch for Mersenne primes (see link bellow), perfect numbers, twin primes and such.


References