Meaning of Rays in Polar Plot of Prime Numbers

What we're seeing is arithmetic progressions (not prime-producing polynomials) of primes, combined with a classical phenomenon about rational approximations.

When the integers (or any subset of them) are represented by the polar points $(n,n)$, of course integers that are close to a multiple of $2\pi$ apart from each other will lie close to the same central ray. Figuring out when integers are close to a multiple of $2\pi$ apart is a perfect job for continued fractions. The continued fraction of $2\pi$ is $\langle 6; 3,1,1,7,2,146,\dots\rangle$, giving the convergents $$ \left\{6,\frac{19}{3},\frac{25}{4},\frac{44}{7},\frac{333}{53},\frac{710}{113},\frac{103993}{16551},\dots\right\}, $$ which are the rational approximations of $2\pi$ that will dominate the picture on different scales.

For example, if you plot the polar points $(n,n)$ for $1\le n\le 25000$, you will notice the points aligning themselves into $44$ spirals: jumping ahead from $n$ to $n+44$ is almost the same as going around the circle $7$ times (note the convergent $\frac{44}7$ showing up); moving from $n$ to $n+1$ jumps ahead $7$ spirals. Each spiral corresponds to an arithmetic progression $a\pmod{44}$; going from one spiral to the next one counterclockwise corresponding to changing the arithmetic progression from $a\pmod{44}$ to $a+19\pmod{44}$ (note that $19\equiv7^{-1}\pmod{44}$).

If instead you plot only the primes $(p,p)$, you will get reasonable representation in the $\phi(44)=20$ spirals corresponding to arithmetic progressions $a\pmod{44}$ where $\gcd(a,44)=1$, and no primes in the other $24$ spirals. That's what we're seeing in the top two pictures.

As the scale moves farther out, these particular spirals become more tightly wound and harder to see (go from the 1st picture to the 5th, then the 3rd, then the 4th), and the next convergent takes over. In this case, the convergent $\frac{710}{113}$ is an extremely good rational approximation to $2\pi$ (as we know from the large partial quotient $146$). Therefore the integer points $(n,n)$ will group themselves into $710$ spirals, but these spirals are so close to straight lines at the beginning that they almost don't look like spirals, and persist for a large interval of possible scales. Each ray thus corresponds to an arithmetic progression $a\pmod{710}$.

When we plot only prime points $(p,p)$ (the 4th picture is best here), we will only see the $\phi(710)=280$ arithmetic progressions $a\pmod{710}$ where $\gcd(a,710)=1$. The fact that the visible rays are mostly grouped in fours is a consequence of the fact that $5\mid710$ and so every fifth ray doesn't contain primes. Really, though, we are seeing four out of every ten rays rather than four out of every five; the arithmetic progressions $a\pmod{710}$ with $a$ even have no primes at all and are thus invisible. There are four exceptional groups containing only three rays instead of four; these correspond to the four arithmetic progressions $a\pmod{710}$ where $a$ is a multiple of $71$ but not a multiple of $2$ or $5$.


$3$Blue$1$Brown has given a beautiful explanation to the spiral and ray patterns. Please watch his video titled "Why do prime numbers make these spirals?"