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

# The 9x9 Pan-Magic Squares

### A Short 9x9 History

It used to be believed that there were no 9x9 pan-magic squares - probably because there was no very obvious pattern to use to create a regular 9x9 square. Constructing a square by expanding a 3x3 square would produce a magic square but not a pan-magic one. In addition, amongst odd-order panmagic squares, most interest was focused on the regular prime number squares. These lent themselves to analysis more readily and to calculation of the number of regular pan-magic squares which could be constructed with an underlying pattern.

### A 9x9 Square Analyzed.

Against this background it was exciting, therefore, when Mutsumi Suzuki, in his E-Mail of Nov 5th 1996, reported that " . . . Mr. Gakuho Abe decomposed a panmagic square of 9 order as:"

 4 3 5 6 8 7 2 1 0 1 0 4 3 5 6 8 7 2 7 2 1 0 4 3 5 6 8 6 8 7 2 1 0 4 3 5 3 5 6 8 7 2 1 0 4 0 4 3 5 6 8 7 2 1 2 1 0 4 3 5 6 8 7 8 7 2 1 0 4 3 5 6 5 6 8 7 2 1 0 4 3
Matrix A
 5 3 7 5 3 7 5 3 7 2 9 4 2 9 4 2 9 4 8 6 1 8 6 1 8 6 1 7 5 3 7 5 3 7 5 3 4 2 9 4 2 9 4 2 9 1 8 6 1 8 6 1 8 6 3 7 5 3 7 5 3 7 5 9 4 2 9 4 2 9 4 2 6 1 8 6 1 8 6 1 8
Matrix B

 9x9 Page:

### Latin Squares?

If Mr. Abe had used letters A to I instead of numbers he would have made two orthogonal Latin squares which, when combined, would make one "Graeco-Latin" square.

### The Magic Carpet Approach

Although there is clearly a pattern in Mr. Abe's two squares, its rationale is not very obvious. I therefore subjected both squares to the analysis used previously for smaller squares. I first normalized the second square by subtracting one from each cell and then decomposed both squares to obtain four different 9x9 pan-magic carpets (see the squares below 1 - 4 labeled Abe). I subsequently experimented with other designs and managed to create two more order-9 magic carpets (the two squares 5 and 6 labeled Grog).

### Note:

To make these carpets more readily compared, some have been normalized by rotation or reflection, and each carpet has been assigned letters so that the top row, at least the first few letters, is in alphabetcal order. For this reason, a reader trying to relate an individual carpet to the original Abe's squares may have to reflect or rotate the square "back" from the form below.

 9x9 Page:

### Six, Order-9, Pan-Magic Carpets

1 - Abe
 A B C A B C A B C A B C A B C A B C A B C A B C A B C B C A B C A B C A B C A B C A B C A B C A B C A B C A C A B C A B C A B C A B C A B C A B C A B C A B C A B
3 - Abe
 A C B B A C C B A A C C B A A C B B A A C B B A C C B B A C C B A A C B B A A C B B A C C B B A C C B A A C C B A A C B B A C C B B A C C B A A C C B A A C B B A
5 - Grog
 A B A C A C B C B B C B A B A C A C C A C B C B A B A A B A C A C B C B B C B A B A C A C C A C B C B A B A A B A C A C B C B B C B A B A C A C C A C B C B A B A
2 - Abe
 A C B B A C C B A B A C C B A A C B C B A A C B B A C A C B B A C C B A B A C C B A A C B C B A A C B B A C A C B B A C C B A B A C C B A A C B C B A A C B B A C
4 - Abe
 A B C B C A C A B A B A B C B C A C A C A B A B C B C B C A C A B A B C B C B C A C A B A B A B C B C A C A C A B A B C B C A C A C A B A B C B C B C A C A B A B
6 - Grog
 A C B C B A B A C B A B A C A C B C C A C B C B A B A C B A B A C A C B A C A C B C B A B B C B A B A C A C B A C A C B C B A C B C B A B A C A A B A C A C B C B

 9x9 Page:

### Why Four?

The four carpets I had created from Abe's squares lead to a series of questions and surprises. First, did the original designer of Abe's square use patterns like these magic carpets? If so, why had he used so many different ones? Was variety essential? Initially, I assumed "Yes!" because surely he would have found it simpler to use a single pattern if that were possible (see below). I now think it may be more likely that these underlying patterns may not have been recognised.

### Total of Six?

To date I have found no others. Some, which initially appeared to be quite different, could always be manipulated to match one of the above carpets. The obvious and important questions is: "May there still be other order-9, pan-magic carpets?"

### Experiments with the Carpets.

With six different carpets to play with I started to investigate their properties. This lead to the second surprise. Far from a mixture being required, I found that any one of the six magic carpets can, by itself, create an order-9, pan-magic square. With suitable manipulation, each carpet can create four mutually orthogonal carpets.

 9x9 Page:

### Four versions of the first carpet.

The set of squares below is a complete set of four mutually orthogonal magic carpets created by manipulating the first carpet obtained from Abe's square. Each of the other five magic carpets can be manipulated in the same way.

 A B C A B C A B C A B C A B C A B C A B C A B C A B C B C A B C A B C A B C A B C A B C A B C A B C A B C A C A B C A B C A B C A B C A B C A B C A B C A B C A B

1. The magic carpet (left) can be repeated in all directions as an endless pattern. The pan-magic properties are preserved regardless of where the 9x9 sample is obtained.

2. When this first square is twisted along a main diagonal it makes the second magic carpet (right)

 A A A B B B C C C B B B C C C A A A C C C A A A B B B A A A B B B C C C B B B C C C A A A C C C A A A B B B A A A B B B C C C B B B C C C A A A C C C A A A B B B
 C C C A A A B B B B B B C C C A A A A A A B B B C C C C C C A A A B B B B B B C C C A A A A A A B B B C C C C C C A A A B B B B B B C C C A A A A A A B B B C C C
3. Magic carpet number three (left) is created by rotating the first carpet ninety degrees clockwise (or by reflecting carpet 2 horizontally).

4. The fourth magic carpet (right) is then created by twisting number three along the other main diagonal (or by reflecting carpet 1 horizontally).

 C A B C A B C A B C A B C A B C A B C A B C A B C A B B C A B C A B C A B C A B C A B C A B C A B C A B C A A B C A B C A B C A B C A B C A B C A B C A B C A B C
 9x9 Page:

### A Composite Alphabetical Square

When these four versions of the one magic carpet are combined, they make a composite alphabetical square. Every possible sequence of letters is produced; and, when all of the sequences in any row, column, or diagonal are "added together", the letters "A", "B", and "C" occur three times as the first character, as well as three times as the second, third, and fourth - a true recipe for a pan magic square.

 AACC BACA CACB ABAC BBAA CBAB ACBC BCBA CCBB ABBC BBBA CBBB ACCC BCCA CCCB AAAC BAAA CAAB ACAC BCAA CCAB AABC BABA CABB ABCC BBCA CBCB BACB CACC AACA BBAB CBAC ABAA BCBB CCBC ACBA BBBB CBBC ABBA BCCB CCCC ACCA BAAB CAAC AAAA BCAB CCAC ACAA BABB CABC AABA BBCB CBCC ABCA CACA AACB BACC CBAA ABAB BBAC CCBA ACBB BCBC CBBA ABBB BBBC CCCA ACCB BCCC CAAA AAAB BAAC CCAA ACAB BCAC CABA AABB BABC CBCA ABCB BBCC

### A Family of Squares

This Composite Alphabetical Square generates a whole family of numerical pan-magic squares by substitution. As with smaller squares, it is advantageous to fix the zero position by assigning the value zero to the letter "A" in all four character positions. Then, at each character position, the values 1 and 2 can be assigned to either the letter "B" or the letter "C" - a total of 16 options. There are another 24 options in the assignment of the factors 27, 9, 3, and 1 to the four character positions, i.e., a potential total of 16 x 24 = 384 magic squares.

Character:  1  2  3 4
A =  0 0 0 0
B =  27 9 3 1
C =  54 18 6 2

### Assigning Values:

This table on the right shows the character values for one such assignment. Thus, a cell containing CBAC would be assigned a numerical value of 54 + 9 + 0 + 2 = 65.

### Duplications:

The 384 numerical squares generated by a single alphabetical square actually consist of 192 identical pairs, i.e., every alphabetical 9x9 square creates 192 unique, regular, pan-magic squares. Each of these yields 81 versions by translocation and each of these another 8 by reflection and rotation to give a total of 192 x 81 x 8 = 124416 pan-magic squares for each alphabetical square.

 9x9 Page:

### Total Number of Squares - Some succeed, some fail.

The six, order-9, pan-magic carpets, each with four variations, gives a total of 4 x 6 = 24 pan-magic carpets. At least, that is all I have been able to make. Four carpets are required to make an alphabetical square which then generates the numerical pan-magic squares.

It would be simpler if every possible combination of carpets made a pan-magic alphabetical square. Unfortunately, many combinations don't! Moreover, I see no way to predict which combinations succeed and which fail. Therefore, the magic carpet approach may be a wonderful technique for making and understanding some order-9, regular, pan-magic squares; but, as yet, it makes little contribution to predicting the total available number of such squares.

### Initial Testing.

To predict the possible number of Alphabetical squares I wrote a Hypercard Stack which, in turn, combined four of the 24 Latin Squares above. Each resulting square was assigned a unique score to assist in later sorting. This was stored with the numbers of the component Latin squares. Initial experiments suggested that only about 20% of the possible combinations produced pan-magic alphabetical squares.

 9x9 Page:

### And, Finally, an Actual, Numerical, Regular, Order-9, Pan-Magic Square

When the composite alphabetical square is substituted with the numerical values in the table we get this order-9, pan-magic square with a magic sum of 360.

 8 33 61 11 36 64 23 48 76 14 39 67 26 51 79 2 27 55 20 45 73 5 30 58 17 42 70 34 62 6 37 65 9 49 77 21 40 68 12 52 80 24 28 56 0 46 74 18 31 59 3 43 71 15 60 7 35 63 10 38 75 22 50 66 13 41 78 25 53 54 1 29 72 19 47 57 4 32 69 16 44

### Congratulations!

Any reader who has reached the bottom of this page must be a glutton for punishment - or extremely interested. If you really did reach this point - please write me an E-Mail note and comment on this page. Thank-you.

 9x9 Page: