# Spiral of prime numbers.

This is a sketch of a spiral of primes. Up to prime 1427, the number 641 (famous number that divides Fermat numbers) is the only twin prime congruent to 1 mod 4 in the central column containing 2. Just coincidence?

• I'm not going to decipher your handwriting, sorry. Please put your question as text in the question.
– orlp
Feb 16, 2018 at 14:43
• Well, $p=a^2+b^2$ if and only if $p=4k+1$ (or $p=2$). But I see no reason that all the primes on the first diagonal should be on this form. This is really interesting though! Feb 16, 2018 at 14:50
• @user477343, I agree, the OP's handwriting is easy enough to read. Nonetheless, the OP should take the time here to typeset the text, to make it searchable. Feb 16, 2018 at 14:59
• @EnzoCreti, nice observation. Feb 16, 2018 at 20:50
• @user477343 The main problem raised by orlp is that "text" in images aren't accessible to both human users and search bots. This affects this page's SEO. It's not readable to some users, for example, those who use screen readers. One should use MathJax whenever possble. Feb 5, 2019 at 12:03

For what it's worth, here is an abstraction of the OP's spiral, extended to the prime $419$ in the lower right hand corner (and $313$ in the upper left), indicating only the locations of the twin primes congruent to $1$ mod $4$, with an $L$ if it's the "Lower" twin prime and a $U$ if it's the "Upper" (e.g., a $U$ for $13$ and an $L$ for $17$; the prime $5$ is special because it's one of each).

$$\pmatrix{ U&&&&&L&&&L\\ &*&&L&&L&&*&\\ &&*&&&&L&&\\ &&U&*&&5&&U&\\ &&&U&2&&&&U\\ U&&&L&&*&L&&\\ &U&U&&&&*&L&\\ &*&U&&&&&*&U\\ *&&&&&&&&* }$$

Here it is again, without the asterisks along the diagonals, which are somewhat visually misleading:

$$\pmatrix{ U&&&&&L&&&L\\ &&&L&&L&&&\\ &&&&&&L&&\\ &&U&&&5&&U&\\ &&&U&&&&&U\\ U&&&L&&&L&&\\ &U&U&&&&&L&\\ &&U&&&&&&U\\ &&&&&&&& }$$

I'm making this community wiki in case someone wants to expand the spiral some more. (Please remember to edit the primes cited in the first paragraph if you do.) Right now the down diagonal through $2$ has only one twin prime congruent to $1$ mod $4$ in it, while the up diagonal has five (of eight possibilities in each direction). Curiously (or maybe not),

• the column containing the $2$ is (currently) empty.
• Even though the "main" diagonal diagonal (through the $2$) is mostly empty, there do seem to be some "clusters" of down-diagonal entries.
• There is (currently) just one $L$ below the main diagonal, corresponding to the prime $17$. (This was pointed out by the OP in comments.)

But the spiral is still pretty small; all these effects could well disappear.

• I dont know how to expand this matrix, perhaps it is quite simple with the help of a computer software...moreover I am not sure to be able to edit. Perhaps the effects are a consequence of the law of small prime numbers Feb 17, 2018 at 9:32

So, for diagonal #1 (top left to bottom right), you'll have what can be split into two diagonals. The first diagonal starts at 2 and moves down toward the bottom right. Each number in this spiral will be the $(2k+1)^2$th prime for each number in the spiral where k is the number of rotations around the spiral. The second diagonal starts at 11 and moves toward the top left. Each number in this diagonal will be at the point of a half rotation of the spiral (assuming that the spiral completes its full rotation when it hits a point in the bottom right diagonal). So, each number in this spiral will be the $((2k+1)^2+1)$th prime number. Now that you know this, you should be able to find a proof either that all numbers in these two diagonals are pythagorean and twin primes, or you'll find a counterexample. If you'd like, I can post a proof of this later (I don't know the answer off the top of my head, I'd have to work it out).