Latest research on the "3x3 magic square of squares" problem


This page presents the most interesting studies on the Open problems 1 and 2 done after the publication of my article "Some notes on the magic squares of squares problem" in 2005. The two corresponding prizes are still to be won!

If you want to study these two problems, I STRONGLY recommend that you first:

Send me your new results, they will be added if interesting.


Received March 6, 2006
Ajai Choudhry, India, constructed some 3x3 squares with 7 correct sums, their magic sums not being a square. For example:

Interesting, because most of the 3x3 squares with 7 correct sums come from the Lucas family, in which the magic sum is a square. The first known example with a non-square magic sum was constructed by Michael Schweitzer (Fig MS4 of the M.I. article). It would be very interesting to find a parametric solution with a non-square magic sum, generating an infinite number of 3x3 squares. With such a new parametric solution, it should be easy to check mathematically if this family can or cannot produce a solution with 8 magic sums. The Lucas family is unfortunately proved unable to produce 8 magic sums.


Received October 10th, 2006
Message from Randall Rathbun, USA, on the Open problem 2:

Several years before this problem 2, Randall already worked on Gardner's challenge (=our open problem 1). It was in 1999, look at:


Received November 5th, 13th, 23rd, 2006
Jean-Claude Rosa, France, constructed this 3x3 semi-magic square (with 6 correct sums) using only odd numbers. Interesting, because most of the 3x3 semi-magic squares use both odd and even numbers. Strange: in this smallest possible example, all the numbers used are squares of primes.

Using these 3 primitive Pythagorean triangles having the same area:

he constructed this 3x3 square (with 7 correct sums) using only odd numbers. 6 of its 9 numbers are squares of primes.

And using other Pythagorean triangles having the same area, he produced this other square (with 7 correct sums) using only odd numbers. The magic sum is smaller than the previous square.


Received November 30th, 2006
Theorem from Lee Morgenstern, USA: "In a 3x3 magic square of distinct squares, the smallest square cannot be 1."


Received December 10th, 2006
Only some days after Lee Morgenstern, Jean-Claude Rosa independently proved that a 3x3 magic square can't be constructed using 1 and eight squares of odd numbers.


Received December 19th, 2006
From Lee Morgenstern, USA, far extending his previous proof excluding 1: "if there is a 3x3 magic square of distinct squares, then all entries must be above 10^14."


Received December 23rd, 2006
Lucien Pech, when he was a "Mathématiques Spéciales" student, school year 2005-2006, chose the "3x3 magic square of squares" as the subject for his TIPE: Travaux d'Initiative Personnelle Encadrés = supervised personal search. He searched for a magic hourglass; such a solution would solve the Open problem 2, since it uses 7 squares. He used Duncan Buell's method (see reference [12], top of this page), but didn't find any solution to this very difficult problem. His best result is an excellent modulo 2^52 example, better than Duncan Buell's modulo 2^46 example.

Lucien Pech, now a student at the ENS Paris (Ecole Normale Supérieure, rue d'Ulm), sent this revised version of his TIPE:


Received July 21st, 2007. Updated results received October 18th, 2007.
After his paper published in 2003 [49] on the magic squares of squares problem, Landon Rabern, USA, searched for a 3x3 magic square having at least 7 squared integers. Using a similar method as my study of 2004 [8], he didn't find any new example different from the only known example.

You can download and use his Windows application with any other range of center cells, even though he doesn't provide any explanation on its use (unfortunately): http://landon314.brinkster.net/MagicSearcher.zip. This application needs the Microsoft .NET Framework. The code sources are provided.


Received April 8th and 12th, 2008.
From Lee Morgenstern, USA, the complete formula for all 3x3 semi-magic squares of squares (better than the Lucas formula producing some, but not all, 3x3 semi-magic squares of squares), and a list of 3x3 semi-magic squares with 7 correct sums and using odd entries (including the two first smallest squares given above by J.-C. Rosa in 2006):


Received February 6th, 2009.
From Lee Morgenstern, USA: "We know that the magic sum of a 3x3 fully-magic square must be three times the central entry. Are there any 3x3 semi-magic squares of squares with a magic sum of three times any square? Looking over the published results, such as with the Lucas formula, all the magic sums are squares.The new non-square magic sums that you published on your previous update weren't three times a square. I searched for 3x3 semi-magic squares of squares and found 20 of them with a magic sum that is three times a square (searched up to a magic sum of 3 x 5000²). One of them, the smallest, had a magic sum which was three times one of the actual entries. Since you can rearrange rows and columns to make another semi-magic square, any of the entries can become the central one. So here is my 3x3 semi-magic square of squares having a magic sum which is three times the central entry (S = 3 x 1105²). This is the only known solution."

For his other 19 solutions, the magic sum was three times a square different from any of the entries. Their sums (< 3 x 5000²) are 3 x 1225², 1275², 1533², 1955², 1989², 2125², 2265², 2335², 2345², 2675², 3395², 3485², 3515², 3575², 3655², 3765², 3885², 3995², 4193². Here is the example S = 3 x 1225²:


Received from May 17th to July 27th, 2009.
Frank Rubin (http://contestcen.com/) worked on 3x3 semi-magic squares of squares having 7 magic sums, only one diagonal being not magic. With Sd1 = magic sum = sum of the magic diagonal, and Sd2 = sum of the non-magic diagonal, Frank searched for squares having the best possible ratio Sd1/Sd2 ~ 1.

Using Lee Morgenstern's method for finding 3x3 nearly-magic squares of squares with close sums, here is one of the impressive squares computed by Frank Rubin:

Sd1 = 1890006405715707401173356334328966702876471825085875343146504267674569
Sd2 = 1890006405715707267778636165444057741201927206436686602706450141117123

Sd1/Sd2 = 1.0000000000000000705... Very close to 1... And Sd1/Sd2 = 1 would be a solution of this 3x3 magic square of squares problem!

Noticing that the magic sum is a square (S = Sd1 = 43474203911235768609981537098048163²), I thought that Rubin's square was simply a member of the Lucas family.
January 22nd 2010, mentioning my feeling to
Randall Rathbun, he confirmed, finding (p, q, r, s) = (51498645679307420, 68881590670955891, 80839778471595961, 171878882029570731).
It is known that unfortunately this family can't produce a 3x3 magic square of squares.


Received January 26th, 2010.
Here is Lee Morgenstern's method, above used by Frank Rubin in May-July 2009 for 3x3 nearly-magic squares of squares with close sums. This method uses Hillyer's formula of Pythagorean Triangles having equal areas, and Newton's method of finding a root of a polynomial:


Received March 2nd-3rd, 2010.
Randall Rathbun made a serious attempt to solve the enigma #1, searched for a 3x3 magic square having 7 squared entries, different from the only known example. He created more than 116,000,000 magic squares having 6 squared entries, looking to see if their 7th, 8th or 9th entries was a squared integer. But alas, no new solution!


Received April 8th, 2010.
Interesting remark by Lee Sallows on the enigma #1: it is possible to construct a 3x3 magic square having 7 squared entries, if we allow... allow from SallowS ? ;-)... Gaussian integers! Here is his nice example having a null magic sum, the two non-squared entries being 6 and -6:

Can somebody construct a 3x3 magic square having 8 or 9 distinct squared Gaussian integers?


Received October 15th, 2010
Here is Lee Morgenstern's method for finding 3x3 magic squares with 7 distinct square entries. This method would be (perhaps?) able to solve the enigma 1.


Received May 27th, 2011
Ant King (www.mathstutoring.co.uk) constructed this nice parametric solution of 3x3 semi-magic squares of squares using a single variable, and only one diagonal is not magic. Because its magic sum is a squared integer [3(1+ 3k + 3k²)²]², this parametric solution unfortunately can't produce magic squares of squares (needing a magic sum equaling three times a squared integer, or more precisely three times its center).


Received from November 15th 2011 to January 27th 2012
Lee Morgenstern sent various interesting remarks and results:

For example, in the last but one document, he extended the above remark of Lee Sallows on Gaussian integers.
And in the last document, he constructed a magic square of squares modulo 2^90, therefore better than previous magic hourglasses of squares by Duncan Buell and Lucien Pech (respectivelly mod 2^46 and mod 2^52).


Received March 2nd, 2012, updated May 6th, 2012, updated again August 21st, 2012
Mike Winkler (www.mikewinkler.co.nf), using Morgenstern's above remark of Feb. 2009, searched for 3x3 semi-magic squares having a magic sum which is three times a square.

His search with Delphi was done with magic sum < 3 x 320000², but in a non-exhaustive way. He found 7 out of the 20 solutions previously found by Morgenstern < 3 x 5000², and also these new bigger solutions. Sums = 3 x 6115², 7395², 8905², 9345², 9565², 9995², 10195², 12725², 13175², 13765², 14825², 15225², 15525², 16185², 18085², 18115², 20085², 22425², 25075², 26571², 28135², 32625², 37635², 41905², 41925², 42415², 44353², 45025², 45435², 49045², 63495², 76075², 77435², 87135², 117725², 123335², 124845², 140675², 141865², 157675², 195925², 196775², 227035², 264265², 319685². But no new solution with sum three times the central entry.


Received January 21st, 2013
Lee Morgenstern reused his method sent in April 2008 concerning the list of 3x3 nearly-magic squares of squares having all odd entries and 7 correct sums. This is equivalent to three 3-square arithmetic progressions having equal step values. The idea was to look for instances that satisfy the requirements of a 3x3 fully-magic square of squares. The 2008 results were based on two searches:

  1. All odd-entry APs, primitive and scaled, up to a step value of d = 1.4 x 10^10.
  2. All primitive APs up to d = 10^19.

His new 2013 searches extended the above:

  1. up to d = 2.4 x 10^19.
  2. up to d = 6.4 x 10^22.

Received July 2nd and August 8th, 2013

Tim S. Roberts, Bundaberg, east coast of Australia, author of http://unsolvedproblems.org, reminds us that a 3x3 magic square of squares must have this parametric form of any 3x3 magic square:

As an example, we will look at the modulo 13. Any squared integer can only have one of these 7 "authorized" values, the quadratic residues mod 13: 0, 1, 3, 4, 9, 10, 12. If we check by program all the possible values (x, y, z) mod 13, the nine cells (x+y), (x-y-z), ...(x-y) can be nine squares (meaning that none of them is equal to another value than the 7 authorized values) only when (x, y, z) = (x, y, 0) or (x, 0, z): we conclude that y or z must be divisible by 13. Also equivalent is to say that y*z must be divisible by 13. Here are the final astonishing results that I have checked and slightly extended (5 -> 5^2, and 7 -> 7^2):

Yes, x*y*z must be divisible by every prime < 40, with the sole exception of 23.


Received from August 10th to September 3rd, 2013

Tim S. Roberts, again using the above parametric form of any 3x3 magic square, remarked that:

Astonishing! An incredibly long list, where 25 is the first integer > 1 not present. We can extend and finish his list, and say:

This should be the full list, a total of 106 integers. All these integers can be factorized with these primes only (or powers of them): 2 (4, 8, 16), 3 (9), 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 61, 67.
That is to say, every prime < 70, with the sole exception of 59. We can also say that:


Received from December 18th 2013 to January 8th, 2014

Mark Underwood, Canada, sent to Tim S. Roberts an interesting remark improving the above results: y and z must both be divisible by 24, then so too must be y+z and y-z. So the product of all four must be divisible by 24^4, which is 2^12 * 3^4. And at least one of the items must be divisible by 16, and at least one by 9. So that brings it up to 2^13 * 3^5.

And if I add my previous remark of July-August 2013 that y*z must be divisible by 5^2 * 7^2, then:


Received February 7th and 22nd, 2014

Lee Morgenstern extended again his previous searches of January 2013 and April 2008. No solution :

  1. up to d = 2.4 x 10^21.
  2. up to d = 6.0 x 10^23, the primitive step values being 4mn(m²-n²), with m,n coprime, one odd, one even, and n < m < 2^24.

Received June 30, 2014

Lee Morgenstern completed three new searches for a magic hourglass, but found no solution.


Received September 16, 2014


Received from February 19 to March 13, 2015

Paul Zimmermann, researcher (INRIA, LORIA, http://www.loria.fr/~zimmerma/), with two young students, Paul Pierrat and François Thiriet, proved these modular properties: the magic sum of any primitive 3x3 magic square of squares must be 3 mod 72, and the squared entries must be 1 mod 24. And extending Buell's and Pech's previous searches, they found modulo 2^n solutions for 3x3 magic squares of 7 squares, up to modulo 2^59.

Their paper is available at http://www.loria.fr/~zimmerma/papers/squares.pdf


Received July 25, 2015

Terry Moriarty, Northern Ireland, found some properties of 3x3 magic squares of squares. For example, their magic sums are 3 mod 72. Look at http://magicsqr.byethost8.com/


Received April 16, 2016

Allowing imaginary numbers (see also above), Eddie Guttierez, New Jersey, USA, found 3x3 magic squares having 7 squared entries. For example, this square with magic sum = 15552:

Look at http://www.oddwheel.com/, with some other studies. The above magic square can be found from his table of contents 0B, 15th page (or directly http://www.oddwheel.com/Image_SquareA.html)


Received April 18, 2016

F U N !!! Matt Parker, an Australian living in UK, former maths teacher (https://en.wikipedia.org/wiki/Matt_Parker and http://standupmaths.com/), tried to solve the enigma #1 (3x3 magic square of squares) at (YouTube Numberphile videos by Brady Haran). In his video, 1:02-1:36, he also presented the solution of the enigma #4c (7x7 magic square of cubes) found in 2015 by Sébastien Miquel:

Invalid solution..., so no, I did not send any prize in euros or any bottle of champagne to Matt! :-)


Received February 6, 2017

Ben Asselstine, Canada, announced his "set of tools for finding and managing 3x3 magic squares of squares" freely available at http://fituvalu.nongnu.org/. This software uses libgmp (GNU Multiprecision Arithmetic Library) for computing on large integers, and is designed to be easily parallelizable with GNU Parallel.


Return to the home page http://www.multimagie.com