# $3 \times 3$ Magic Square of Squares

On picture below is three-by-three magic square in which seven of the entries are squared integers, found by Andrew Bremner of Arizona State University (and independently by Lee Sallows of the University of Nijmegen):

What would be an efficient algorithm for finding a new example of a three-by-three magic square with seven squared entries that differs from the one already known ?

I know that general formula for $e_{ij}$ entry of an odd magic square is given by :

$e_{ij}= n\cdot\left(\left(i+j-1+\left \lfloor \frac{n}{2} \right \rfloor \right) \bmod n \right)+\left((i+2j-2\right) \bmod n)+1$

P.S.

Rotations, symmetries, and multiples of this known square don't count as new solutions.

EDIT :

I have found this one with six squared entries :

-
For starters, I think you might want to look for number that are expressible as sums of 3 squares in many (at least 3) different ways. –  Joel Cohen Mar 22 '12 at 8:54
@JoelCohen Actually, as sum of 2 squares and then, they have to be compatible to form sums of 3 squares. –  Phira Mar 22 '12 at 9:35
@pedja: Your general formula is only good for finding magic squares containing exactly the numbers $1,2,...,n^2$. It doesn't help here. –  TonyK Mar 22 '12 at 13:27

You will want to look at A search for $3\times3$ magic squares having more than six square integers among their nine distinct integers, by Christian Boyer, and at the papers by Bremner and others that Boyer references. You can't hope to find a new one until you understand the methods used to find the one that's already known.
From the ansatz (where m is the horizontal,vertical and diagonal sum) $$\begin{array} {rrr|r} & & & m \\ a^2 & b^2 & c^2 & m \\ d^2 & e^2 & f^2 & m \\ g^2 & h^2 & i^2 & m \\ \hline m&m&m&m \end{array}$$ writing this as an array of equations and using Gauss-reduction I arrived at the following magic square with three free parameters e,i,h $$\begin{array} {rrr|r} & & & 3e^2 \\ 2e^2-i^2 & 2e^2 -h^2& -e^2 +h^2 + i^2 & 3e^2 \\ -2e^2+h^2+2i^2 & e^2 & 4e^2-h^2-2i^2 & 3e^2 \\ 3e^2-h^2-i^2 & h^2 & i^2 & 3e^2 \\ \hline 3e^2&3e^2&3e^2&3e^2 \end{array}$$ and if I recall correctly I've seen, that the parameters must be odd and not divisible by 3 or in other words $e^2,i^2,h^2$ must be congruent 1 modulo 12 .