
Patterns and Primes
32
odd-numbered squares, you will find
that they form diagonal lines. But in the
higher, less dense areas of the number
series one would not expect many such
lines to form. How would the grid look,
Ulam wondered, if it was extended to thou-
sands of primes?
The computer divison at Los
Alanlos has
a magnetic tape on which
$10 million prime
numbers are recorded. Ulam, together with
Myron L. Stein and Mark B. Wells, pro-
gramed the
MANIAC
computer to display the
primes on a spiral of consecutive integers
from
1
to about 65,000. The picture of the
grid presented
by the computer is shown in
Figure 63. Note that even near the picture's
outer limits the primes continue to fall
obediently into line.
The eye first sees the diagonally compact
lines,
where odd-number cells are adjacent,
but there is also a marked
tendency for
primes to crowd into vertical and hori-
zontal lines on which the odd numbers
mark every other cell. Straight lines in all
directions (once they have been extended
beyond the consecutive numbers on a seg-
ment of the spiral) bear numbers that are
the
values of quadratic expressions begin-
ning with
4x5 For example, the diagonal
sequence of primes 5,
19,41,71 is given by
the expression
4x" lox
+
5
as x takes the
values 0 through 3. The grid suggests that
throughout the entire number series expres-
sions of this form are likely to vary markedly
from those "poor" in primes to those that
are "rich," and that
013
the rich lines an
unusual amount of clumping occurs.
By starting
the spiral with numbers lhigher
than
1
other quadratic expressions form the
lines. Consider a grid formed by starting
the spiral with 17
[see
Figure
64,
left].
Numbers in the main diagonal running
northeast by southwest are generated
by
4x" 2x
+
17. Plugging positive integers
into
x
gives the diagonal's lower half; plug-
ging negative integers give the upper half.
If
we consider the entire diagonal, rear-
ranging the numbers in order of increasing
size, we find- pleasantly enough
-
that all
the numbers are generated by the
siinpler
formula x" x
+
17. This is one of many
"prime-rich" formulas discovered by Leon-
hard Euler, the eighteenth-century Swiss
mathematician. It generates primes for all
values of x from 0 through
15.
This means
that if we continue the spiral
shown in the
illustration until it fills a 16-by-16 square,
the entire diagonal will be solid with
primes.
Euler's most famous prime generator,
x2
+
x
+
41, can be diagramed similarly on a
spiral grid that starts with 41
[see Figure
64,
right].
This produces an unbroken se-
quence of 40 primes, filling the diagonal of
a 40-by-40 square! It has long been known
that of the first 2,398 numbers generated by
this formula, exactly half are prime. After
testing all such numbers below 10,000,000,
Ulam, Stein, and Wells found the proportion
of primes to be
,475
. .
.
Mathematicians
would like to have a
forinula expressing a
function of
n
that would give a different
prime for
ezjery
integral value of
rz.
It has
been proved that no polynomial formula
of this type exists. There are many
nonpoly-
nomial formulas that
will
generate only