The regular 8x8 pan magic squares have a fascinating structure. Like the 4x4 squares, 8x8 squares can be constructed using a set of magic carpets. For the 4 x 4 square there was really only a single basic carpet which, by suitable sampling, produced the four possible carpets, each consisting of eight zeros and eight ones. The ones in these patterns were multiplied by 8, 4, 2, and 1, in all the possible sequences. Somewhat surprisingly, there were only three truly different order 4 panmagic squares. For the 8x8 square, many more panmagic carpets exist and, from these, six are selected which are then multiplied respectively by 32, 16, 8, 4, 2 and 1.


I have, so far, identified twelve, 8x8, magic carpets. These really consist of only six distinct patterns, each of which is twisted about a diagonal to produce a second pattern.
Square 1 is probably the simplest  and reminiscent of the pattern used for the 4x4. Pairs of numbers alternate horizontally; each line is the inverse of the one before; the lower half reflects the top. The square 2 is identical except for being twisted.
The five squares below (3,5,7,9,11) show five more fundamental carpets. To save space the twisted versions of each (4,6,8,10,12) have been omitted:





The above magic carpets are templates from which 8x8, panmagic squares can be constructed. A convenient way of making the actual magic squares is to create an Alphabetical Magic Carpet using six of the above carpets. This can be done by substituting letters, e.g, A in square 1; B in square 2; C in square 3, D in square 4, E in square 5 abs F in square 6, to make the Composite Magic Carpet below. Strictly, neither this final square, nor any of its components, can be classified as GraecoLatin Squares because each row and column contains more than one of each character; they are, however, magic carpets which can be repeated endlessly and then sampled at any point to obtain panmagic properties.


The alphabetical square above is obviously panmagic because:
The alphabetical square generates the adjoining numerical square by substituting A=32, B=16, C=8, D=4, E=2, and F=1. This regular, order 8, panmagic square is just one of the 720 substitutions which are possible by substituting 32, 16, 8, 4, 2, and 1 for the six letters.
Succeed  Fail 

1,2,3,4,5,6  1,2,3,4,5,9 
1,2,3,4,5,7  1,2,3,4,5,10 
1,2,3,4,5,8  1,2,3,4,5,12 
1,2,3,4,5,11  1,2,3,4,6,9 
1,2,3,4,6,7  1,2,3,4,6,10 
1,2,3,4,6,8  1,2,3,4,6,11 
1,2,3,4,6,12  1,2,3,4,7,8 
The Alphabetical Square above was derived from carpets: 1, 2, 3, 4, 5, and 6. There are, however, twelve carpets and they can be combined in many different ways to produce different Alphabetical Squares. I have found no intuitively obvious rule to predict which combinations create order8, panmagic squares. The table on the right shows the start of a lengthy list of test results showing which sets make, and which sets fail to make, panmagic squares.
Some of the component carpets, e.g., 9 and 10, appear to allow translocation by one cell while still remaining able to from an orthogonal pair but initial experiments suggest they will not combine with other carpets to form panmagic squares or, if they do so it appears to be only infrequently.
Orders 4 and 5 are kind and allow easy construction and counting of all the possible panmagic squares. (Order 6 is not panmagic.) Order 7 is different; construction of regular panmagic squares using magic carpets is efficient, and counting the results easy. Unfortunately, additional irregular squares can be made by "pairwise exchange". Therefore, although counting regular, order 7, panmagic squares may have been easy; counting them all will be daunting.
Order 8 is an even greater challenge. Like order 7 before it, the magic carpet approach is an efficient way to construct squares but it is not consistent. Some, probably all, of the component magic carpets, fail to generate magic squares in some combinations. In addition, some of the larger patterns may be offset by translocation with unpredictable effects on the output. Counting the regular order 8, panmagic squares appears to be impossible using this approach.
Will some combinatorial mathematician help me? Is there a way of linking the magic carpet approach to creating order8, panmagic squares to this unresolved question of their ennumeration?
Copyright © Mar 2010  Magic Squares Website 
Updated Mar 6, 2010 