10
Numbers in a Spiral (sh.itjust.works)
submitted 6 days ago* (last edited 6 days ago) by xiao@sh.itjust.works to c/Math_history@sh.itjust.works

painter

Johnson, Crockett

Description

Some of Crockett Johnson's paintings reflect relatively recent research. Mathematicians had long been interested in the distribution of prime numbers. At a meeting in the early 1960s, physicist

Stanislaw Ulam

Stanisław Marcin Ulam (13 April 1909 – 13 May 1984) was a Polish and American mathematician, nuclear physicist and computer scientist. He participated in the Manhattan Project, originated the Teller–Ulam design of thermonuclear weapons, discovered the concept of the cellular automaton, invented the Monte Carlo method of computation, and suggested nuclear pulse propulsion. In pure and applied mathematics, he proved a number of theorems and proposed several conjectures.

https://en.wikipedia.org/wiki/Stanis%C5%82aw_Ulam

of the Los Alamos Scientific Laboratory in New Mexico passed the time by jotting down numbers in grid. One was at the center, the digits from 2 to 9 around it to form a square, the digits from 10 to 25 around this, and the spiral continued outward.

Circling the prime numbers, Ulam was surprised to discover that they tended to lie on lines. He and several colleagues programmed the MANIAC computer to compute and plot a much larger number spiral, and published the result in the American Mathematical Monthly in 1964. News of the event also created sufficient stir for Scientific American to feature their image on its March 1964 cover. Martin Gardner wrote a related column in that issue entitled “The Remarkable Lore of the Prime Numbers.”

The painting is #77 in the series. It is unsigned and undated, and has a wooden frame painted white.

date made

ca 1965

Object Name

painting

Physical Description

masonite (substrate material) wood (frame material)

Measurements

overall: 82 cm x 85 cm x 1.3 cm; 32 5/16 in x 33 7/16 in x 1/2 in


The Ulam spiral or prime spiral is a graphical depiction of the set of prime numbers, devised by mathematician Stanisław Ulam in 1963 and popularized in Martin Gardner's Mathematical Games column in Scientific American a short time later. It is constructed by writing the positive integers in a square spiral and specially marking the prime numbers.

Ulam spiral of size 201×201. Black dots represent prime numbers. Diagonal, vertical, and horizontal lines with a high density of prime numbers are clearly visible.

For comparison, a spiral with random odd numbers colored black (at the same density of primes in a 200x200 spiral).

Ulam and Gardner emphasized the striking appearance in the spiral of prominent diagonal, horizontal, and vertical lines containing large numbers of primes. Both Ulam and Gardner noted that the existence of such prominent lines is not unexpected, as lines in the spiral correspond to quadratic polynomials, and certain such polynomials, such as Euler's prime-generating polynomial x^2^ − x + 41, are believed to produce a high density of prime numbers. Nevertheless, the Ulam spiral is connected with major unsolved problems in number theory such as Landau's problems. In particular, no quadratic polynomial has ever been proved to generate infinitely many primes, much less to have a high asymptotic density of them, although there is a well-supported conjecture as to what that asymptotic density should be.

The Ulam spiral is constructed by writing the positive integers in a spiral arrangement on a square lattice:

and then marking the prime numbers:

In the figure, primes appear to concentrate along certain diagonal lines. In the 201×201 Ulam spiral shown above, diagonal lines are clearly visible, confirming the pattern to that point. Horizontal and vertical lines with a high density of primes, while less prominent, are also evident. Most often, the number spiral is started with the number 1 at the center, but it is possible to start with any number, and the same concentration of primes along diagonal, horizontal, and vertical lines is observed. Starting with 41 at the center gives a diagonal containing an unbroken string of 40 primes (starting from 1523 southwest of the origin, decreasing to 41 at the origin, and increasing to 1601 northeast of the origin), the longest example of its kind.

Explanation

Diagonal, horizontal, and vertical lines in the number spiral correspond to polynomials of the form

f(n) = 4n^2^ + bn + c

where b and c are integer constants. When b is even, the lines are diagonal, and either all numbers are odd, or all are even, depending on the value of c. It is therefore no surprise that all primes other than 2 lie in alternate diagonals of the Ulam spiral. Some polynomials, such as 4n^2^ + 8n + 3, while producing only odd values, factorize over the integers (4n^2^ + 8n + 3) = (2n + 1)(2n + 3) and are therefore never prime except possibly when one of the factors equals 1. Such examples correspond to diagonals that are devoid of primes or nearly so.

To gain insight into why some of the remaining odd diagonals may have a higher concentration of primes than others, consider 4n^2^ + 6 n + 1 and 4n^2^ + 6 n + 5. Compute remainders upon division by 3 as n takes successive values 0, 1, 2, .... For the first of these polynomials, the sequence of remainders is 1, 2, 2, 1, 2, 2, ..., while for the second, it is 2, 0, 0, 2, 0, 0, .... This implies that in the sequence of values taken by the second polynomial, two out of every three are divisible by 3, and hence certainly not prime, while in the sequence of values taken by the first polynomial, none are divisible by 3. Thus it seems plausible that the first polynomial will produce values with a higher density of primes than will the second. At the very least, this observation gives little reason to believe that the corresponding diagonals will be equally dense with primes. One should, of course, consider divisibility by primes other than 3. Examining divisibility by 5 as well, remainders upon division by 15 repeat with pattern 1, 11, 14, 10, 14, 11, 1, 14, 5, 4, 11, 11, 4, 5, 14 for the first polynomial, and with pattern 5, 0, 3, 14, 3, 0, 5, 3, 9, 8, 0, 0, 8, 9, 3 for the second, implying that only three out of 15 values in the second sequence are potentially prime (being divisible by neither 3 nor 5), while 12 out of 15 values in the first sequence are potentially prime (since only three are divisible by 5 and none are divisible by 3).

While rigorously-proved results about primes in quadratic sequences are scarce, considerations like those above give rise to a plausible conjecture on the asymptotic density of primes in such sequences, which is described in the next section.

Variants

Klauber triangle with prime numbers generated by Euler's polynomial x^2^  −  x  +  41 highlighted

Sacks spiral

Ulam spiral of size 150×150 showing both prime and composite numbers

Hexagonal number spiral with prime numbers in green and more highly composite numbers in darker shades of blue

Number spiral with 7503 primes visible on regular triangle

Ulam spiral with 10 million primes

https://en.wikipedia.org/wiki/Ulam_spiral

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 19 Oct 2025
10 points (100.0% liked)

Math Thematic

88 readers
2 users here now

Sharing of different mathematic elements, stories, archives of all kinds.

founded 2 months ago
MODERATORS