Possible solution for the magic square of squares problem

813 Views Asked by At

I was fiddling around with this problem for 3x3 magic squares after seeing another Numberphile video and I got to a point where I'm not sure where the error in proving no such magic squares exists is, so I would appreciate someone pointing it out.

So, consider a generic magic square of the following form:

$\begin{pmatrix} a^2 & b^2 & c^2 \\ d^2 & e^2 & f^2 \\ g^2 & h^2 & i^2 \end{pmatrix}$

and a sum $s$. Using some simple arithmetic and the basic properties of magic squares (the rows, columns and diagonals sum up to $s$), we can see that any magic square of squares can be written as follows:

$\begin{pmatrix} 2 t^2 - \frac{b^2+d^2}{2} & b^2 & t^2 - \frac{b^2-d^2}{2} \\ d^2 & t^2 & 2t^2-d^2 \\ t^2 + \frac{b^2-d^2}{2} & 2 t^2-b^2 & \frac{b^2+d^2}{2} \end{pmatrix}$

where $t^2=\frac{s}{3}$. Now, we can see that the elements in the second diagonal form an arithmetic sequence, and since we know these should be square numbers, we know we can parameterize them using the following replacements (Arithmetic sequence of squares):

$t^2 =(m^2+n^2)^2$

$\frac{b^2-d^2}{2} = 4 m n (m^2-n^2)$ - the congruum

Now, replacing the values of $t$ and $d$ in the matrix and simplifying the terms, we get the elements on the main diagonal to be:

$a^2=(m^2+n^2)^2+\left((m^2+n^2)^2+4 m n (m^2-n^2) - b^2\right)$

$e^2=(m^2+n^2)^2$

$i^2=(m^2+n^2)^2-\left((m^2+n^2)^2+4 m n (m^2-n^2) - b^2\right)$

Again, these are all squares and again form an arithmetic sequence so we can parameterize them in the same way, but since the middle element is already in parameterized form, we know that the congruum of this sequence must be of the form $4 m n (m^2-n^2)$. And now we have two possibilities:

  1. $(m^2+n^2)^2+4 m n (m^2-n^2) - b^2=4 m n (m^2-n^2)$

which gives $b^2=(m^2+n^2)^2$, but doing the replacement makes all the entries of the magic square equal, or

  1. $(m^2+n^2)^2+4 m n (m^2-n^2) - b^2=-4 m n (m^2-n^2)$

which when used to express $b^2$ and replace it in the magic square gives the second row to have all the same elements $(m^2+n^2)^2$, all the corner elements to be equal to $(m^2-2mn-n^2)^2$, and $b^2$ and $h^2$ to be equal to $(m^2-n^2)^2-8 m n (m^2-n^2)$.

So, the conclusion is that the only magic squares of squares are the ones with at most three distinct values.

3

There are 3 best solutions below

12
On

$e^2=(m^2+n^2)^2$, but $e^2$ may have another entirely different expression as the square of a sum of two squares, $e^2=(u^2+v^2)^2$, with $\{u,v\}\ne\{m,n\}$.

As a general rule, longstanding conjectures will not be solved via high school algebra.

0
On

Again, these are all squares and again form an arithmetic sequence so we can parameterize them in the same way, but since the middle element is already in parameterized form, we know that the congruum of this sequence must be of the form $4mn\left(m^2−n^2\right)$

Unfortunately, this conclusion doesn't hold. Firstly, you're missing the other part of the parameterisation in that article; arithmetic progressions of squares can also have the form $$t^2 \left(m^2+n^2\right)^2 - 4mnt^2 \left(m^2−n^2\right),t^2\left(m^2+n^2\right)^2,t^2 \left(m^2+n^2\right)^2 + 4mnt^2\left(m^2−n^2\right)$$

So, for example, the squares $25,625,1225$ are in AP, but so are the squares $289,625,841$.

Also the parameterisation isn't necessarily unique; for example since $65=1^2+8^2=4^2+7^2$, we can generate the two distinct triples of squares in AP $529,4225,7921$ and $2209,4225,6241$.

3
On

The magic square is sometimes used to let children wonder about numbers. Less common are questions to practice disproving a statement i.e. finding the flaw. These examples often only use high school algebra. A similar example.

Richard Guy noted that we can write the problem with three squares $x_1^2$, $x_3^2$, and $x_5^2$ as follows (also referred to as the Lucas form)

$\begin{pmatrix} x_1^2 & x_2^2 & x_3^2 \\ x_4^2 & x_5^2 & x_6^2 \\ x_7^2 & x_8^2 & x_9^2 \\ \end{pmatrix} = \begin{pmatrix} x_1^2 & 3x_5^2-x_1^2-x_3^2 & x_3^2 \\ x_5^2+x_3^2-x_1^2 & x_5^2 & x_5^2+x_1^2-x_3^2 \\ 2x_5^2-x_3^2 & x_1^2+x_3^2-x_5^2 & 2x_5^2-x_1^2 \\ \end{pmatrix}$

whereby all squares are uneven, and $x_8^2=x_1^2+x_3^2-x_5^2$ is the smallest square.

There are many relations, for instance, the three sets of two relations below

# relation
1a $(x_1^2)^2=(x_6x_8)^2+(x_5^2-x_3^2)^2$
1b $2x_1^2=x_6^2+x_8^2$
2a $(x_3^2)^2=(x_4x_8)^2+(x_5^2-x_1^2)^2$
2b $2x_3^2=x_4^2+x_8^2$
3a $(x_5^2)^2=(x_4x_6)^2+(x_3^2-x_1^2)^2$
3b $2x_1^2=x_6^2+x_8^2$

All Pythagorean triples can be written as $a =h \cdot (m^{2}-n^{2}),\ \,b=h \cdot (2mn),\ \,c=h \cdot (m^{2}+n^{2})$ where $0<n<m$ are coprime integers, and both are not odd, and $0<h$ is an integer such that $\gcd(a,b,c)=h$.

The first relation is a Pythagorean triple, and hence there exist positive integers $m>n$ such that $x_1^2= h(m^2+n^2)$, $x_6x_8=h(m^2-n^2)$ and $x_5^2-x_3^ 2=2hmn$. Note that $x_6x_8=2hmn$ is not possible as all squares are uneven. As $x_1^2$ is a square, we can ignore the parameter $h$ and consider it to be a part of the parameters $m$ and $n$.

We can solve 1a+1b via the polynomial $z^2-(x_6^2+x_8^2)z+(x_6x_8)^2=z^2-2(m^2+n^2)z+(m^2-n^2)^2=0$ to yield $x_1^2=m^2+n^2$, $x_6=m+n$, $x_8=m-n$ and $x_5^2 -x_3^2=2mn$.

In the same manner, we can solve the following two relations 2a+2b, which yields that $x_3^2=m'^2+n'^2$, $x_4=m'+n'$, $x_8=m'-n'$ and $x_5^2 -x_1^2=2m'n'$.

We conclude that $x_8=m-n=m'-n'$. Furthermore, $x_5^2=\frac{1}{2}(x_4^2+x_6^2)=\frac{1}{2}\big((m+n)^2+(m'+n')^2\big)$.

Similarly, we can solve the next two relations 3a+3b. Hence, for numbers $m_*>n_*$ we have that $x_5^2=m_*^2+n_*^2$, $x_4=m_*+n_*$, $x_6=m_*-n_*$ and $x_3^2 -x_1^2=2m_*n_*$.

The solutions imply the following conditions:

  • $x_4=m_*+n_*=m'+n'$ en $x_6=m_*-n_*=m+n$
  • $x_3^2-x_1^2=2m_*n_*=2m'n'-2mn=(x_5^2-x_1^2)-(x_5^2-x_3^2)$

Hence $m_*,n_*=m'+n,n'-n$.

Also holds $x_5^2=m_*^2+m_*^2=\frac{1}{2}(x_4^2+x_6^2)=\frac{1}{2}\big(( m+n)^2+(m'+n')^2\big)$. This is only true if $-m'n - n^2 - m'n' + nn'=0$. This yields $n'=-n\big(\frac{m'+n}{m'-n}\big)$, hence $n'<0$ as $n<m<m'$. This contradicts the fact that $n’$ is positive.

Exercise: find the flaw(s).