While reading standup mathematician Matt Parker‘s book Things to Make and do in Fourth Dimension, I found answer (on pp. 146) to the question I raised 7 months ago.

When the grid happens to be a multiple of 6 wide, suddenly all primes snap into dead-straight lines. All primes (except 2 and 3) are one more or less than a multiple of 6. (© Matt Parker, 2014)
He also proves the following surprising theorem:
The square of every prime number greater than 3 is one more than a multiple of 24.
Let be an odd prime not equal to 3. Now we subtract one from the square of this prime number. Therefore, we wish to prove that
is a multiple of 24.
Note that, is a product of two even numbers. In particular, one of these two even numbers must be a multiple of 4, as they are consecutive even numbers and every other even number is divisible by 4. Hence we conclude that
is divisible by 8.
Observe that exactly one of three consecutive numbers, must be divisible by 3. Since
is an odd prime different from 3, one of
or
must be divisible by 3. Hence we conclude that
is divisible by 3.
Combining both the conclusions made above, we complete proof of our statement (since 2 and 3 are coprime).
Edit[19 April 2017]: Today I discovered that this theorem is exercise 68 in “The USSR Olympiad Problem Book“.
You must be logged in to post a comment.