Is there a reason why the first few primes have hexagonal symmetry when snaked around the plane?

103 Views Asked by At

See the image. I've been playing around with some "space filling snakes" of sequences. This sequence is precisely the sequence of natural numbers. But when you snake it thusly, and color $1$ and the odd prime numbers blue, you get a symmetric figure!

Is there a reason behind it? Does the pattern somehow continue?

enter image description here

2

There are 2 best solutions below

0
On BEST ANSWER

The bilateral symmetry of the outer ring is an easy consequence of two 'coincidences': (a) $2\cdot 3\cdot 5=30$, and (b) $30\lt 49 = 7\cdot 7$. Now, (a) means that $p|n$ iff $p|(30-n)$ for $p\in\{2,3,5\}$; (b) means that $2,3,5\not\mid n\implies n$ prime for $n\lt 30$. Together, they imply that for $6\leq n\leq 24$, $n$ is prime iff $30-n$ is prime.

Now, this symmetry can't really continue any further, because the next primorial, $210=2\cdot3\cdot5\cdot7$, is larger than the next 'sieve number' $121=11^2$, so it's not necessarily the case that $n$ is prime iff $210-n$ is prime for $30\leq n\leq 180$; for instance, $67$ is prime but $210-67 = 143 = 11\cdot 13$.

The rotational symmetry is a similar 'accident' of small numbers: for $7\leq n\lt 19=25-6$, $n$ is prime iff $n+6$ is prime. This is because all non-primes less than $25$ must have a factor of $2$ or $3$, and $n$ has such a factor iff $n+6$ does. Again, this can't really continue further, because the size of the products of primes that you need to ensure that $n$ and $n+d$ are divisible by the same set of numbers too rapidly outpaces the size of the squares of primes that you need to bound your $n$ to make sure they can't have 'spurious' prime factors.

0
On

If you think about sieving out the primes, you only need to check $2$ and $3$ as divisors because you haven't gotten to $5^2=25$ yet. That means all numbers of the form $6k+1$ and $6k+5$ are prime, plus $2$ and $3$. Your chart is incorrect in that it shows $1$ as a prime and not $2$. That would spoil the symmetry.