Smallest magic squares of triangular numbers (and of polygonal
numbers)
Expanded version of the solution
published in The American Mathematical Monthly, Vol 114, N. 8, October 2007,
p. 745746
by Christian Boyer. V2.0, June 2008, with
additions (magic squares of pentagonal numbers, by Lee Morgenstern)
An old problem proposed in 1941, solved in 2007
In 1941, Royal Vale Heath proposed this short problem
in The American Mathematical Monthly
[4], when H. S. M. Coxeter
was in charge of the “Problems and Solutions” column:
What is
the smallest value of n for which the n² triangular numbers 0, 1, 3, 6, 10, …,
n²(n²1)/2 can be
arranged to form a magic square?
This problem
remained unsolved. Here is the solution found in April 2007… 66 years later:
n = 6.
The samples were not easy to find, but are easy for the reader to check, as a factorization problem. Contents of this expanded solution:
Triangular and polygonal numbers
This figure will help us to understand what triangular numbers are, and more generally polygonal numbers.
First polygonal numbers
Relationship to bimagic squares
In his partial solution [5] published in the Monthly 1942, R. V. Heath remarked that a bimagic square (magic square which is still magic after the original entries are all squared [2a]) can be directly used to construct a magic square of triangular numbers:
“Clearly, the magic property will still be retained if each of the original numbers is subtracted from its square. The resulting numbers are all even, and their halves are the triangular numbers”
Using a bimagic square of order 8 found in the wellknown book [1, p. 212] by W.W. Rouse Ball and initially constructed by H. Schots in 1931 [8, p.357], Heath [5] built a magic square of 64 triangular numbers and with it showed that n£8, but the smallest possible n remained unknown, as he said:
“But it remains possible that a smaller set of triangular numbers might form a magic square without the corresponding natural numbers forming a magic square. Moreover, it has never been satisfactorily proved that there is no doublymagic (=bimagic) square of order 7”
By an exhaustive search, we proved with Walter Trump in 2002 [2b] that a bimagic square of order smaller or equal to 7 does not exist: this means that Heath’s trick in using bimagic squares cannot be used for orders n<8. Here is a study of the problem for the smallest orders.
Is it possible to construct a magic square using the 9 triangular numbers 0, 1, 3, 6, 10, 15, 21, 28, 36?
No! The total sum of these numbers being 120, such a square would have a magic sum 120/3=40. The central number of any 3x3 magic square being one third of its magic sum, and 40 being not divisible by 3, since n=3, it is impossible.
A magic square using the 16 triangular numbers 0, 1, 3, …, 120 would have a magic sum equal to 170. There are only 10 series of 4 triangular numbers giving this sum:
0 1 78 91
0 10 55 105
1 21 28 120
1 28 36 105
1 36 55 78
3 10 66 91
3 21 55 91
6 28 45 91
15 28 36 91
21 28 55 66
In a magic square, each number needs to use at least two or three series: one for the row, one for the column, and one more if the number is located on a diagonal. Because the number 6 for example is present in only one series, a magic square of order n=4 is impossible.
A magic square using the 25 triangular numbers 0, 1, 3, …, 300 would have a magic sum equal to 520. There are 118 series giving this sum. Combining the series, there are 148 possible ways to get 5 series using the 25 triangular numbers. This means that it is possible to have 5 magic rows. An exhaustive search, however, shows that it is impossible to arrange these rows and make all the columns magic. The best possible arrangements are 5 magic rows and 3 magic columns, for example:
0 
3 
105 
276 
136 
66 
1 
253 
190 
10 
210 
45 
6 
28 
231 
91 
300 
36 
15 
78 
153 
171 
120 
21 
55 
Order n=6, possible! Solution of the problem.
A magic square using the 36 triangular numbers 0, 1, 3, …, 630 would have a magic sum equal to 1295. There are 1921 series giving this sum.
Good news: it is possible to arrange these series to form magic squares! Here is an example, solution of our problem.
0 
406 
120 
528 
105 
136 
1 
300 
435 
378 
171 
10 
66 
276 
496 
15 
91 
351 
595 
78 
153 
28 
210 
231 
3 
190 
55 
21 
465 
561 
630 
45 
36 
325 
253 
6 
The order n=7 allows also magic squares of the first triangular numbers.
0 
378 
1176 
210 
595 
6 
435 
3 
351 
45 
465 
703 
1128 
105 
946 
171 
561 
820 
190 
21 
91 
741 
528 
36 
325 
120 
15 
1035 
1081 
300 
55 
496 
780 
10 
78 
28 
666 
66 
231 
276 
630 
903 
1 
406 
861 
253 
136 
990 
153 
If we prefer to use consecutive polygonal numbers starting from 1 instead of 0 (see below the da Silva’s challenge), a similar reasoning shows that the minimum order is again 6. The 6 series of order 4 and the 91 series of order 5 are not sufficient to construct a magic square. Here are examples of order 6 and 7 starting from 1.
28 
666 
78 
1 
528 
105 
45 
276 
351 
3 
406 
325 
66 
378 
136 
171 
190 
465 
496 
21 
153 
630 
15 
91 
210 
10 
435 
595 
36 
120 
561 
55 
253 
6 
231 
300 
36 
406 
276 
3 
528 
946 
780 
45 
903 
351 
6 
1225 
10 
435 
561 
861 
496 
741 
105 
21 
190 
990 
120 
630 
1 
66 
703 
465 
253 
136 
666 
1081 
153 
91 
595 
55 
378 
231 
15 
820 
1176 
300 
1035 
171 
325 
1128 
78 
28 
210 
Squares of polygonal numbers, p ≤ 10
We can generalize Heath’s Problem E496 to other polygonal numbers.
Reminder: the ith pgonal number is equal to
((p  2)i²  (p  4)i)/2
With p=3, we get triangular numbers. With p=4, we get square numbers. With p=5, we get pentagonal numbers. And so on…
Any bimagic square can be used to construct magic squares of k_{2}i²+k_{1}i+k_{0} numbers: using the same bimagic square of order n=8 as R.V. Heath, Charles W. Trigg published squares of polygonal numbers for p=3, 5, 6, 7, 8 in [9], and for p=9, 10 in [10]. But is it possible to construct squares of orders n<8? Yes!
1617 
3015 
35 
0 
1162 
715 
1520 
2882 
330 
12 
5 
210 
3290 
1335 
1926 
2752 
2501 
247 
117 
376 
145 
70 
176 
2380 
1 
3432 
925 
1080 
51 
532 
2262 
2625 
1717 
287 
590 
1426 
782 
22 
2035 
1001 
651 
2147 
92 
477 
852 
3151 
425 
1820 
1247 
An interesting remark: a magic square of polygonal numbers can be turned into a magic square of squares by multiplying each term by 8(p – 2) then adding (p  4)² to each term, because:
8(p – 2) [((p  2)i²  (p  4)i)/2] + (p  4)² = [2(p  2)i²  (p  4)]²
An unsolved problem: the smallest magic square of distinct triangular numbers
All the above examples use the first consecutive polygonal numbers. But what is the smallest order n if we allow any polygonal numbers, consecutive or not, but distinct?
The first 4x4 magic square of squares, using 16 distinct squares, was constructed by Euler, in a letter sent to Lagrange in 1770 [3]. I found the first 5x5 magic square of squares in 2004 [2c] [3] [6]. Now I am please to give the first 4x4 and 5x5 magic square of triangular numbers:
66 
465 
780 
91 
1 
630 
105 
666 
300 
171 
496 
435 
1035 
136 
21 
210 
351 
0 
210 
91 
171 
36 
136 
153 
378 
120 
105 
406 
15 
231 
66 
325 
253 
10 
45 
190 
6 
28 
435 
78 
276 
It is still unknown if a 3x3 magic square of squares is possible [2d] [3] [6] [7], but what about a 3x3 magic square of triangular numbers? As remarked by John P. Robertson (author of [7]), in a private communication of April 2007:
“If there is a 3x3 magic square of squares, then all the entries are odd, and so congruent to 1 modulo 8. Because if T is a triangular number then 8T + 1 is a square, and if S is an odd square then (S  1)/8 is a triangular number, the question of whether there is a 3x3 magic square of squares is equivalent to the question of whether there is a 3x3 magic square of triangular numbers.”
Open problem. Who will construct a 3x3 magic square of distinct triangular numbers, or its equivalent 3x3 magic square of squares? Or who will prove that it is impossible?
Another unsolved problem: the smallest magic square of distinct pentagonal numbers
We have seen that we do not have the answer to the problem of the smallest magic square of triangular or of square numbers: there are 4x4 magic squares, but we still don’t know if 3x3 squares are possible.
But after triangular numbers (p=3) and square numbers (p=4), what about pentagonal numbers (p=5)? We find that 6x6 squares are possible, as shown in the figure below, but it should be possible to construct 5x5 squares or smaller ones.
1426 
1520 
1080 
176 
0 
376 
1335 
5 
782 
2147 
22 
287 
1 
1820 
651 
1926 
145 
35 
92 
51 
925 
247 
2262 
1001 
1247 
852 
715 
70 
532 
1162 
477 
330 
425 
12 
1617 
1717 
Open problem. What is the smallest possible magic square of distinct pentagonal numbers: 3x3, 4x4, 5x5 or 6x6?
In November 2007, Lee Morgenstern worked on this very difficult problem. He constructed the first known 4x4 and 5x5 magic squares of distinct pentagonal numbers. Congratulations!
4030 
1001 
145 
2262 
117 

1426 
1247 
376 
3290 
0 
70 
176 
2501 
2882 
1926 
4187 
35 
715 
477 
925 

782 
3151 
1162 
425 
2035 
5 
145 
3876 
51 
2262 

1426 
2147 
22 
1335 
2625 
70 
1335 
782 
1001 
3151 

1247 
1080 
3725 
651 
852 
651 
3577 
590 
1520 
1 
3725 
1908012 
659022 
20475 

12650 
1969401 
578151 
31032 
760060 
115787 
500837 
1214550 
722107 
83426 
455126 
1330575 

300832 
543305 
1431305 
315792 
247051 
495650 
1557032 
291501 

1526617 
24130 
70 
1040417 
1609426 
42757 
925 
938126 
Lee constructed also this 3x3 semimagic square:
356972 
651 
54626 
19780 
275847 
116622 
35497 
135751 
241001 
All this means that the above open problem becomes now:
Open problem. Who will construct a 3x3 magic square of distinct pentagonal numbers? Or who will prove that it is impossible?
As seen above, a magic square of polygonal numbers can be turned into a magic square of squares: an example of a 3x3 magic square of pentagonal numbers would also solve the 3x3 magic square of squares problem.
Particular thanks to Sebastião A. da Silva, Brazil, who challenged me to find solutions of order n < 8 in March 2007. Without knowing the references [4] and [5] to Problem E496 by Heath and [9] and [10] to articles by Charles W. Trigg, Sebastião had independently found the relationship with bimagic squares and sent me this solution of order 8, constructed using the G. Pfeffermann’s first bimagic square built in 1890 [2a].
1596 
595 
36 
1653 
171 
1128 
45 
496 
561 
210 
1485 
1176 
28 
435 
1770 
55 
351 
946 
91 
276 
2080 
741 
10 
1225 
190 
15 
630 
465 
1431 
78 
1081 
1830 
120 
325 
2016 
3 
861 
300 
1275 
820 
21 
1540 
153 
66 
666 
1711 
528 
1035 
1891 
136 
903 
1378 
378 
1 
780 
253 
990 
1953 
406 
703 
105 
1326 
231 
6 
But Sebastião was unsuccessful in finding examples of smaller orders. He offered a bottle of Brazilian Curaçao if I succeeded in answering his question, asking in French:
“Estil
possible
de construire un carré triangulaire quand il n´existe pas un bimagique du même
ordre ?”
(“Is it possible to construct
a triangular square when there is no bimagic of the same order?”)
A bottle? Very interesting! It’s because I worked on his challenge that I looked for mathematical references and found that the same problem had been proposed already a long time ago in the Monthly –without the reward of a bottle and which had remained unsolved. The only difference is the starting triangular number: Sebastião started from 1, while Heath started from 0. Both cases are solved now. Because I won his challenge, and because it seems unfortunately difficult to send a bottle through the airmail post, Sebastião sent me in May 2007 this nice gift instead of a bottle. Thanks Sebastião for your interesting challenge and for your gift. We will drink together another bottle when you come to Paris, or when I go to Rio!
Pão de Açucar, Rio de Janaeiro, received from Sebastião A. da Silva
Thanks to Doug Hensley, Dept. of Mathematics, Texas A&M University, and Douglas B. West, Dept. of Mathematics, University of Illinois at UrbanaChampaign, both in charge of the “Problems and Solutions” column of The American Mathematical Monthly. They were the first to read the solution n=6, after Sebastião, and immediately accepted to publish it, 66 years after the problem was proposed in the same column.
Thanks to George P. H. Styan, McGill University, Montreal, Canada, who sent me a copy of the paper [9], wich I was unable to find it in the main mathematical libraries of Paris. And thanks also to him and to Evelyn Matheson Styan, his wife, for correcting my English in this expanded solution of Problem E 496!
Return to the home page http://www.multimagie.com