[Math] Primes and 32 – where did this pattern come from

number theoryprime numberssieve-theory

If we position all the natural numbers into a 'periodic table' with the period equal to $32$, we get the following pattern for primes.

The primes are colored according to their last digit. I did not color the primes past the first 'full diagonal', but the pattern continues indefinitely. The numbers on the 'prime diagonals' that are composite are in bold.

How can this pattern be explained? I'm genuinely surprised by it.

Edit The so called 'pattern' was explained to me as trivial in the answers but what about the bold numbers $[49,77,91,119,121,133,143,…]$? Is there something special about this sequence? Some of them are squares of primes, some of them are the product of two primes, but maybe there is something else?

Prime numbers table

Best Answer

Actually, this is a little misleading. If you ignore the primes and mark off every number by its last digit (but only consider those that end in 1, 3, 7, or 9) you will get the exact same pattern. Except now the lines will be solid without breaks in them.

This isn't a mystery. Each column we add 32 to each coresponding cell so by going over 1 column and up 2 rows you will always get a digit that has the same last digit and the lines with the same last digits will always form by going over 1 and up 2. (If we colored all digits we'd get a confusing checkerboard like pattern but by restricting to odd values we can see lines.)

Filtering by primes (or any other condition) will put blank spots in the lines but will not change the basic existence of the lines.

Basically the lines exist because $32 \equiv 2 \mod 10$. If we used 31 the lines would go over one up one. If we used 30, the lines would be horizontal. If we used 33 the lines would slant down. Etc.

NOTHING to do with primes.

====

But what is surprising, is Ulam's spiral. Google it. (Which has NOTHING to do with what you have done--- which is utterly trivial.)

Related Question