The explanation
The spirals belong to the whole numbers, not the primes: 6, 44 and 710 radians are each almost whole turns (44/7 and 710/113 are the best fractions for 2π). The primes only avoid the arms that share a factor with those numbers, and split evenly among the rest (Dirichlet’s theorem).
01One number, one point
Polar coordinates fix a point by how far it is from the centre and how far it has turned. Put the whole number at
Every point lies on the Archimedean spiral , and neighbouring numbers are 1 radian (about 57.3°) apart. On the stage the primes are amber and the other numbers blue.
Close in there is only one loose spiral; the pattern appears as you zoom out.
02Why 6, 44 and 710
and point radians apart. If is almost a whole number of turns, lands just outside , a little off to one side, so every -th number joins into one slowly curving arm, arms in all:
The smaller the miss, the straighter the arms: the 6 arms wind once every 133 numbers outwards, so they show around 150; the 44 spirals take about 15,600 to wind once; the 710 take 74 million, so below a million they look like rays.
The numbers come from the continued fraction of :
Its convergents are . The larger the next term, the better that fraction and the clearer its arms: 6 is followed by 3, 44 by 7, 710 by 146. Halved, they are the famous approximations and for π.
03Which arms the primes keep
Arm holds the numbers . If and share a factor , every number on that arm is divisible by , and at most itself is prime. So primes sit only on arms where and have no common factor; there are of them (Euler’s totient):
The 24 empty arms of the 44 are the even arms and the multiples of 11; , so the empty rays hold multiples of 2, 5 or 71.
04Dirichlet: an even split
In 1837 Dirichlet proved that whenever and have no common factor, contains infinitely many primes, and in the long run every such arm gets the same share.
The stage’s own numbers bear it out: the 78,498 primes below a million, sorted by remainder mod 44, put between 3874 and 3964 on each of the 20 arms; over the 280 rays of 710 they average about 280.
So the pictures do not say that primes hide a spiral structure; they say two plainer things: whole numbers form spirals in polar coordinates, and primes spread evenly over the arms they are allowed.
Questions
Can this be used to find primes?
No. The picture only tells you which arms can hold no primes (those sharing a factor with the count); on the allowed arms, which numbers are prime still has to be checked one by one, and looks close to random.
Is this the Ulam spiral?
No. The Ulam spiral winds the integers in a square spiral, where primes often line up along diagonals that correspond to quadratic polynomials, such as Euler’s $n^2+n+41$, prime for every $n$ from 0 to 39. The spirals and rays here come from fractions close to 2π.
What if I use degrees instead of radians?
Then every 360th number comes back exactly, and the picture becomes 360 perfectly straight rays that never curve. The primes sit on $\varphi(360)=96$ of them. Radians make a full turn the irrational 2π, which is what bends the arms into spirals.
The syllabus side
Related curves
Sources: Dirichlet’s theorem on arithmetic progressions — Wikipedia · Continued fraction — Wikipedia · Ulam spiral — Wikipedia