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

 The 4x4 Magic Square Index

# The 4x4 Pan-Magic Squares

#### Binary Pattern

 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

### Discovery: Only Three Squares, Only One Pattern.

Many writers have devoted time to enumerating the total possible number of 4x4 magic squares (384). By contrast, the focus here is to show that all these 384 order-4 pan-magic squares are just variations on three possible squares and, moreover, that these three are in turn based on a single underlying pattern. These conclusions were reached in 1998. If anyone knows of earlier work reaching the same conclusions, I would appreciate notification.

#### Magic Carpets

 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0
 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1
 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0
 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1

### Summary

All of the Order 4 Pan-Magic Squares are based on extracting small Magic Carpets from a large underlying binary pattern (on the Right). Four samples of this pattern shown on the left may be multiplied by 8, 4, 2, and 1, to make the Carpets which are added together to make the final square. The 8, 4, 2, and 1, can be used in any order to make different squares.

1. All order 4 pan-magic squares are based on four pan-magic Components.
2. Each Component is obtainable from the one large pan-magic carpet
3. Substituting 1, 2, 4, and 8, into the Componentd offers 24 potential permutations.
4. However, in practice this produces only three truly different pan magic squares of order four.

### Example of Magic Carpet Construction.

This sequence of Carpets show the production of one square by this technique:

 0 0 8 8 8 8 0 0 0 0 8 8 8 8 0 0
+
 0 4 4 0 4 0 0 4 0 4 4 0 4 0 0 4
+
 0 2 0 2 0 2 0 2 2 0 2 0 2 0 2 0
+
 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1
=
 0 7 12 11 13 10 1 6 3 4 15 8 14 9 2 5

### 4 x 4 Latin Squares and Patterns.

The 4x4 Pan-Magic Squares are associated with interesting Alphabetical Squares and Patterns. This information is put on a separate page to save space here.

# Only Three Possible Pan-Magic Squares

### Only Three Squares.

Because Latin squares make only a limited contribution to understanding order 4 pan-magic squares, the magic squares are analyzed here in numerical form. The four Carpets above yield 24 different Pan-Magic Squares using all the possible substitutions of 8, 4, 2, and 1. However, translocation, rotation and reflection reduces the twenty-four potential squares to only three.

### Standard Orientation.

To check this, every square was rotated, reflected and translocated using the same rules: put the zero at top left; put the next lowest possible number (always 7) beside the zero; then reflect if necessary so that the square beneath the zero is the lowest of the two options. With the squares so arranged, inspection confirms that only three truly different squares are possible. The 24 are made up of the eight copies of the three basic squares produced by rotation and reflection.

#### Names for the Carpets.

Their names correspond to the red squares - the "1"s.

 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0
S
 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1
A
 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0
N
 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1
C

#### The Three 4x4 Pan-Magic Squares

 0 7 9 14 11 12 2 5 6 1 15 8 13 10 4 3
"S" = 8
"A" = 1
"N" = 4
"C" = 2
 0 7 10 13 11 12 1 6 5 2 15 8 14 9 4 3
"S" = 8
"A" = 2
"N" = 4
"C" = 1
 0 7 12 11 13 10 1 6 3 4 15 8 14 9 2 5
"S" = 8
"A" = 4
"N" = 2
"C" = 1

### Derivation of the Three Possible Squares.

The table on the right shows which numerical substitutions in the Carpets create the three possible squares. The values 8, 4, 2, and 1 are substituted according to the legend under each Magic square.

### The 384 Pan-Magic Squares

From these three possible squares all of the other 4x4 variations can be produced. There are sixteen cells in each square so, just by translocation, there are sixteen variations of each square. For each of these translocations there are four different rotations, and each rotation can be reflected. Therefore, 3 x 16 x 4 x 2 = 384 regular, order four, pan-magic squares can be derived from these three possible squares.

### Historical Note

Attempts to provide complete listings of magic squares go back to at least 1693 when Frenicle in France concluded there were 880 squares of order 4. He was including all types of magic square - not just the pan-magic ones. This is reported by Henry Dudeney in his book which was first published in 1917; he claims that these results have been ". . . verified over and over again". On the next page Dudeney goes on to provide an analysis and classification which he attributes to "Mr. Frost" - one of the earlier students of magic squares. He describes "Nasik" squares - the only type which he describes as having properties we now call "Pan-Magic". ("Nasik" was the name of the town in India in which Mr. Frost lived.)

The example of the Nasik square shown by Dudeney corresponds to an example of Type 3 above. Dudeney states there are 48 Nasik Squares and adds that each square can produce seven more by "reversals and reflections". This number, 48, implies that he and other early workers might have failed to recognize that they were reproducing the 16 translocations of three basic squares - the ones described here.

The reduction to just three fundamental squares has, however, not been mentioned by Dudeney, or by other readily accessible texts.

# The 4x4 Pan-Magic Square Animated

Finally, on this page, a game which allows you to create 64 versions of an order 4 Magic Square:

8
1

Use Left and
Right Arrow Keys
or Click on the
Red Buttons

Of the 64
options this
is square
number 1

2
 4

 The 4x4 Magic Square Index

 Size: