Counting magic squares

Although many problems concerning magic squares have long been solved, there are still some open questions, for example the number of magic squares of sixth or higher order is not known.

Let us take a closer look. There is just one magic square of third order, although it can occur in eight different forms by reflections and rotations. On the other hand, already 880 magic squares of fourth order exist, which may be presented by reflections and rotations in 7040 various forms.

With 5th order, it becomes really complicated. Let's take a deeper look at the following magic square, which was constructed by the method of de la Loubère. For further processing, we reduce all numbers by one.

17241815
23571416
46132022
101219213
11182529
16230714
22461315
35121921
91118202
10172418

Now we seem to do it in a more complex way and display all numbers in a number system with radix 5. This isn't a problem anymore, since all numbers are in the range from 0 to 24 and thus can be written with two digits.

For a better oversight we also displayed the numbers in a different way: the left digit in uppercase as capital letters and the right digit in lowercase. Now we can better distinguish their different meanings.

314301224
424112330
310223441
142133402
203244113
DbEdAaBcCe
EcAeBbCdDa
AdBaCcDeEb
BeCbDdEaAc
CaDcEeAbBd

We have received our magic square substituting the letters with the following numbers, where, of course, all numbers have to be increased additionally by one.

A B C D E a b c d e
0 5 10 15 20 0 1 2 3 4

But this is only one possible substitution, because the magical property does not depend on specific numerical values, but on the existing symmetric arrangement of uppercase and lowercase letters. Let us be clear, what different choices could be made.

Overall, this results in 2 880 different magic squares for this method.

m= m1 · m2= 120 · 24=2880

On closer examination however, it is found that only 720 of these 2880 magic squares are really different. All other magic squares can be generated by rotations and reflections from these basic squares.

Bachet presented annother algorithm that creates 720 different magic squares. And other generalizations of the method of Loubère can also create different squares. So you can imagine the difficulties to guess the exact number of magic square of any order.