Size: Index   3x3   4x4   5x5   6x6   7x7   8x8   9x9   10x10   11x11   12x12   13x13

# The 8x8 Pan-Magic Squares

### Structure

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 pan-magic squares. For the 8x8 square, many more pan-magic carpets exist and, from these, six are selected which are then multiplied respectively by 32, 16, 8, 4, 2 and 1.

1
 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0
2
 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

### Twelve Basic Magic Carpets

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.

### First Pair of Magic Carpets

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.

### Another Five Basic Patterns

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:

3
 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0
5
 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
7
 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1
9
 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
11
 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1

### Constructing The Composite Magic Carpet

The above magic carpets are templates from which 8x8, pan-magic 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 Graeco-Latin 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 pan-magic properties.

 ACDE BD ABCE ACF DEF ABCDF BEF BCDF ABEF CF ADEF ABD BCE A CDE AC DE ABCD BE F ACDEF BDF ABCEF ABDF BCEF AF CDEF BCD ABE C ADE BDE ABC E ACD ABCDEF BF ACEF DF CEF ADF BCDEF ABF AE CD ABDE BC ABCDE B ACE D BDEF ABCF EF ACDF AEF CDF ABDEF BCF CE AD BCDE AB
 0 29 40 53 22 11 62 35 46 51 6 27 56 37 16 13 20 9 60 33 2 31 42 55 58 39 18 15 44 49 4 25 41 52 1 28 63 34 23 10 7 26 47 50 17 12 57 36 61 32 21 8 43 54 3 30 19 14 59 38 5 24 45 48

### Making Numerical Squares

The alphabetical square above is obviously pan-magic because:

• Every possible combination of letters is used, which is essential to obtain a complete sequence of numbers from 0 to 63.
• All rows, columns, and diagonals contain every letter four times.

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, pan-magic 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

### Other Combinations of the Carpets

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 order-8, pan-magic 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, pan-magic squares.

### Other Variations on the Carpets

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 pan-magic squares or, if they do so it appears to be only infrequently.

### Total Number of Regular, Order 8, Pan-Magic Squares.

Orders 4 and 5 are kind and allow easy construction and counting of all the possible pan-magic squares. (Order 6 is not pan-magic.) Order 7 is different; construction of regular pan-magic squares using magic carpets is efficient, and counting the results easy. Unfortunately, additional irregular squares can be made by "pair-wise exchange". Therefore, although counting regular, order 7, pan-magic 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, pan-magic squares appears to be impossible using this approach.

### Invitation:

Will some combinatorial mathematician help me? Is there a way of linking the magic carpet approach to creating order-8, pan-magic squares to this unresolved question of their ennumeration?

 Size: