Monday, December 22, 2025

No $N\times N$ Prime Magic for 2026

Find all values of $N$ for which it is possible to construct an $N$-by-$N$ prime magic square with a magic number of 2026.

The generic update for the magic number formula that we used in the Classic problem states that as long as $j>1$ and $j \mid N^2$, then we can construct an $N\times N$ magic square with magic number $$M_N = M_N(a,j,r,s) = Na + \frac{N}{2} \left( (j-1) r + \left( \frac{N^2}{j} -1\right) s \right),$$ using any natural magic square using numbers $i=1, 2, \dots, N^2$ and mapping $i \leftarrow a_i,$ where $$a_i = a + \left((i-1)\!\!\!\!\! \mod j\right) r+ \Big\lfloor \frac{i-1}{j} \Big\rfloor s, \,\, i=1,\dots, N^2.$$

One thing that we see is that the smallest magic number of for $N\times N$ magic squares occurs for a natural magic square, that is where $a=r=s=1$ and $j=N^2$, and is $$m(N) = \min M_N=\frac{N(N^2+1)}{2}.$$ Since we have $m(16)= 2056 \gt 2026$ we know that we need only search for up to $N\leq 15.$ That said, just as we did for the Classic problem we will lean on some basic number theory.

Firstly, since $2026$ is not a prime, we cannot trivially solve using a $1 \times 1$ magic square that simply contains the number $2026.$ Additionally, there are no $2 \times 2$ magic squares at all, let along prime ones, so we must look for value of $2 \lt N \leq 15$ where there are

Furthermore, we see that besides the $1\times 1$ magic square that only contains $2,$ that any non-trivial prime magic square cannot contain $2,$ and that furthermore both of the differences in the arithmetic progression system, $r$ and $s,$ must be even to hop from one odd prime to another. Therefore, we see that there again exists some $p, q \in \mathbb{Z}$ such that $r=2p$ and $s=2q$ such that \begin{align*}M_N = M_N(a,j,r,s) &= Na + \frac{N}{2} \left( (j-1)r + \left(\frac{N^2}{j} - 1 \right)s \right) \\ &= N \left( a + (j-1) p + \left( \frac{N^2}{j} - 1\right) q \right) \in N\mathbb{Z}.\end{align*} However, since $2026 = 2 \cdot 1013$ and $1013$ is prime, we see that there cannot be any $2 \lt N \leq 15$ such that $N \mid 2026$ and therefore, there are no prime magic squares with a magic number of 2026, for any integer $N.$

This was a lot of null results this week, but lest you think that it is impossible for all numbers, if we close our eyes for a year, then 2027, which is prime will be a trivial $1\times 1$ prime magic square. Additionally, in the not so distant past, we see that 2019 was primally magic with the following $3 \times 3$ magic square:

229 1327 463
907 673 439
883 19 1117

No comments:

Post a Comment