The construction of perfect panmagic squares of order 4k (k≥2)

Below two new perfect 8×8 panmagic squares are shown, with both franklin and normal panmagic properties. For example, all rows*, columns*, diagonals*, subdiagonals*, and franklin-diagonals* show the sum 260. All half-rows*, half-columns*, half-diagonals*, 2×2 squares* show the sum 130. The quadrants are panmagic as well.
(A subdiagonal is formed by e.g. the numbers 47-40-18-27-61-54-4-9; a franklin-diagonal is e.g. 47-40-18-27-6-15-57-50)

624 1351 4620 2935
5595412 21433828
5214361 36301945
1153606 27374422
6421549 48183133
7575610 23414026
5016163 34321747
955588 25394224
606 1153 4422 2737
1351624 29354620
5412559 38282143
3615214 19453630
588955 42242539
1549642 31334818
5610757 40262341
1635016 17473432

Both squares have been constructed in April 2007 by Willem Barink, author of the puzzle-game Medjig (strongly magic square related). Inspiration was due to three young master-class students in Nijmegen, the Netherlands, who in March 2007 reached world news because they had constructed a spectacular 12×12 panmagic square (HSA square).

Short explanation of the method of construction

Below you see the first square broken down in its grids, after p = a × 8 + r.

6 4 5 3 6 4 5 3   70 16 5 2 3 4
53 64 53 64 0761 25 43
46 35 46 35 6107 43 25
35 46 35 46 1670 34 52
8271 8271 7016 52 34
7182 7182 0761 25 43
2817 2817 6107 43 25
1728 1728 1670 34 52
grid for the r-numbers grid for the a-numbers

In both grids the rows and columns are filled with 8, and two times 4 different numbers (8/4 system). This is different from all more or less panmagic 8×8 squares I (Willem Barink) found on internet, and which, when broken down, showed grids with 8, and an alternation of 2 different numbers in either the rows, or the columns. The panmagic properties of the existing 8×8 squares could still be improved!

In the above 8/4 system I applied my knowledge about latin squares. There are 12 (and only 12) different structures in latin squares of order 4. I examined the patterns of all of them for their usefulness in constructing the grids, in order to avoid the problem of duplo-numbering when composing the final square. I found three (and only three) latins which were suitable:

Structure A   Structure B   Structure C
ABCD ABCD AB CD
BADC CDAB CD AB
DCBA BADC DC BA
CD AB DC BA BA DC

Regarding the grids of the first 8×8 square, you find out that they have been constructed by using 2×2 structure A for the a-numbers, and 2×2 structure B for the r-numbers. Decompose the second 8×8 square yourself, and you will find out that its grids have been constructed by using 2×2 structure C and its reflection. Consequently the first square may be called type AB, the second type CC.

I found one difference in magic properties between the two squares AB and CC. In type AB in the columns the sum of pairs of two consecutive numbers is 67, 63, 71, and 59, while in the rows it is an alternation of only 66 and 64. In the type CC square both in the rows and columns there is an alternation of just two sums of pairs (73 / 57 and 66 / 64). I call this feature isotropic (a term borrowed from mineralogy and crystallography). Due to these just two sums of pairs the second square contains more magic than the first: 5 semi-magic 4×4 units versus 2 semi-magic units extra magic (except for the diagonals, e.g. the 4×4 square between the numbers 5, 28, 33 and 64 in the second).

Applying the method to 12×12 and 16×16 squares

The above method can also be applied for constructing a 12×12 magic square (totals of rows, columns, etc. 870). The one shown below has been constructed by using 3×3 structure C for both the a-numbers and the r-numbers (its reflection).

1411133132 3835109108 62598584
12114422397120 264773965071
12131311343637 10711060618386
14312224111998 482595747249
1691351304033 11110664578782
12314242199118 284575945269
10151291363439 10511258638188
141124223117100 462793767051
1871371284231 11310466558980
125140619101116 304377925467
8171271383241 10311456657990
139126205115102 442991786853

The nine 4×4 subsquares, and also the four 8×8 subsquares are all perfectly panmagic. So, the above 12×12 square contains in fact 14 panmagic subsquares!

Note that the square is isotropic in the sense that both in rows and columns the sum of pairs of consecutive numbers is an alternation of six sums (135, 155, 139, 151, 143 and 147 for the columns, 25, 265, 73, 217, 121 and 169 for the rows). Also here this isotropic feature is an easy way to recognize a type CC construction. It is also possible to construct a type CC 12×12 square with horizontally and vertically an alternation of just two sums, see the next square.

138817127 1143241103 90566579
19125140643101 1163067779254
12818713710442 3111380665589
51391262029115 1024453917868
136101512911234 3910588586381
2112314244599 1182869759452
13016913510640 3311182645787
31411242227117 1004651937670
134121313111036 3710786606183
2312114424797 1202671739650
132141113310838 3510984625985
11431222425119 984849957472

With this square we have a lot more magic than in foregoing 12×12 square: 16 semi-magic 4×4 units more!

Relative to the well-known Morris 12×12 and the HSA 12×12, this abundance of panmagic and semi-magic subsquares is quite an extra panmagic quality; on the other hand, the square lacks the constant sum of franklin-diagonals*. This lack is due to the position of the diameters, dividing panmagic 4×4 units into non-magic 2×2 parts.

This flaw would not occur when constructing a 16×16 with magic properties as shown above. Consequently, the perfect 16×16 panmagic squares of Benjamin Franklin (1706-1790), recently discovered, and the more recent one of Morris can probably be improved! You see the result in my square below.

For comparison, see the franklin-square, and the panmagic Morris 16×16, and its description on the websites:

In the construction of my 16×16 panmagic square I kept the sums of pairs restricted to two in both rows and columns, as in the second 12×12 square above. The result is a square containing 30 panmagic (sub)squares, and 33 semi-magic 4×4 units! Enjoy the beautiful pattern in the positioning of the numbers, going from 1 to 256.

2481023233 2164255201 1847487169 152106119137
2523125085719921840 8916718672121135154104
2342492472025641215 1708873183138120105151
7249232263921720058 7118516890103153136122
24612212352144453203 1827685171150108117139
2722925265919722038 9116518870123133156102
23622112452045443213 1728675181140118107149
5251230283721919860 6918716692101155134124
24414192372124651205 1807883173148110115141
2922725446119522236 9316319068125131158100
23820132432065245211 1748477179142116109147
3253228303522119662 671891649499157132126
24216172392104849207 1788081175146112113143
3122525626319322434 951611926612712916098
24018152412085047209 1768279177144114111145
1255226323322319464 651911629697159130128

Conclusion

The 8/4, 12/4, 16/4 technique, as described above, for the construction of panmagic squares of order 4k (k≥2) is new, and gives very good results. The method is based on three useful structures in latin squares of order 4, which I called structure A, B and C. In the construction two different combinations of structures are possible: AB and CC. A type CC construction leads to the most impressive magic results.

Willem Barink,
Amsterdam, April 2007.


Use the Magic Square Tester!