Magic Squares of Squares

People have been toying with magic squares for more than 2,000 years—setting themselves increasingly difficult challenges to find arrays of numbers that fit given patterns.

Typically, a magic square consists of a set of distinct integers arranged in the form of a square so that the numbers in each row, column, and diagonal all add up to the same total. The most recent developments concern magic squares in which each of the entries is a different squared number—a magic square of squares.

In the current Mathematical Intelligencer, Christian Boyer of Enghien les Bains, France, summarizes progress in finding magic squares of squares and lists several unsolved problems involving such patterns. In one case, he offers a cash (and champagne) prize for the solution.

The first known magic square of squares was devised by Leonhard Euler (1707–1783). He described this four-by-four array in a letter he sent in 1770 to Joseph-Louis Lagrange (1736–1813).

682
292
412
372
172
312
792
322
592
282
232
612
112
772
82
492

In Euler’s magic square of squares (above), the four rows, four columns, and two diagonals each have the sum 8515.

In a separate publication, Euler revealed the formula that he had used to come up with this pattern—one member of a family of magic squares of squares.

(+ap+bq+cr+ds
(+arbscp+dq
(–asbr+cq+dp
(+aqbp+csdr
(–aq+bp+csdr
(+as+br+cq+dp
(+arbs+cpdq
(+ap+bqcrds
(+ar+bscpdq
(–ap+bqcr+ds
(+aq+bp+cs+dr
(+asbrcq+dp
(–as+brcq+dp
(–aqbp+cs+dr
(–ap+bq+crds
(+ar+bs+cp+dq

The magic sum is given by (a² + b² + c²

+ d²)(p² + q² + r² +

s²).

Two additional conditions are needed to get the diagonals to add up to the same sum:

  • pr + qs = 0,
  • a/c = [–d(pq + rs) –

    b(ps + qr)]/[b(pq + rs)

    + d(ps + qr)].

To get the magic square that he sent to Lagrange, Euler set a = 5,

b = 5, c = 9, d = 0, p = 6, q =

4, r = 2, s = –3.

The smallest magic square of squares belonging to this family (below) is not one found

by Euler himself. It’s generated by setting a = 2, b = 3,

c = 5, d = 0, p = 1, q = 2, r =

8, s = –4. The magic sum is 3230.

482
232
62
192
212
262
332
322
12
362
132
422
222
272
442
92

There are other four-by-four patterns now known that do not belong to Euler’s formula family.

Boyer has recently come up with the first examples of five-by-five, six-by-six, and seven-by-seven magic squares of squares.

Here’s the smallest five-by-five magic square of squares, with a magic sum of 1375.

12
22
312
32
202
222
162
132
52
212
112
232
102
242
72
122
152
92
272
142
252
192
82
62
172

Boyer suspects that it’s impossible to get a six-by-six magic square using squared consecutive integers (02 to 352 or 12 to 362). Interestingly, the example that he did find (below) has all the squares from 02 to 362 with the exception of 302.

22
12
362
52
02
352
62
332
202
292
42
132
252
72
142
242
312
122
212
322
112
152
222
162
342
182
232
102
192
92
172
82
32
282
272
262

Boyer’s seven-by-seven magic square of squares with the smallest magic sum (below), however, does use squared consecutive integers.

252
452
152
142
442
52
202
162
102
222
62
462
262
422
482
92
182
412
272
132
122
342
372
312
332
02
292
42
192
72
352
302
12
362
402
212
322
22
392
232
432
82
172
282
472
32
112
242
382

Is there a three-by-three magic square of squares? No one knows.

In 1996, Martin Gardner offered $100 as a prize to the first person to construct such a square from nine distinct integer squares. No one has yet come forward with an example—or a proof that it’s impossible to create one.

Boyer has offered a prize of €100 (and a bottle of champagne) for a solution to a presumably easier problem: finding a new example of a three-by-three magic square with seven squared entries that differs from the one already known or constructing the first example with eight squared entries.

Here’s the known example of a 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):

3732
2892
5652
360721
4252
232
2052
5272
222121

Of course, rotations, symmetries, and multiples of this known square don’t count as new solutions.

What is known about any three-by-three magic square of nine squared integers—if it exists—is that the numbers involved would be huge.

Happy hunting!

More Stories from Science News on Math

From the Nature Index

Paid Content