Office Applications and Entertainment, Magic Squares  Index About the Author

6.7   Concentric and Eccentric Magic Squares

6.7.1 Concentric Magic Squares (1)

In general an even Concentric Magic Square consists of a centre of 2 x 2 cells, around which borders can be constructed again and again.

A 6th order Concentric Magic Square consists of one Embedded (Pan) Magic Square with one border around it.

 a(1) a(2) a(3) a(4) a(5) a(6) a(7) a(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15) a(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) a(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31) a(32) a(33) a(34) a(35) a(36)

The Embedded Pan Magic Square can be described by following linear equations:

 a( 8) + a( 9) + a(10) + a(11) = 74 a(14) + a(15) + a(16) + a(17) = 74 a(20) + a(21) + a(22) + a(23) = 74 a(26) + a(27) + a(28) + a(29) = 74 a( 8) + a(14) + a(20) + a(26) = 74 a( 9) + a(15) + a(21) + a(27) = 74 a(10) + a(16) + a(22) + a(28) = 74 a(11) + a(17) + a(23) + a(29) = 74 a( 8) + a(15) + a(22) + a(29) = 74 a( 9) + a(16) + a(23) + a(26) = 74 a(10) + a(17) + a(20) + a(27) = 74 a(11) + a(14) + a(21) + a(28) = 74 a( 8) + a(17) + a(22) + a(27) = 74 a( 9) + a(14) + a(23) + a(28) = 74 a(10) + a(15) + a(20) + a(29) = 74 a(11) + a(16) + a(21) + a(26) = 74

Which can be combined with the equations describing a Magic Square of the sixth order for distinct integers (Section 6.2) and result in following linear equations:

a(31) =  111 - a(32) - a(33) - a(34) - a(35) - a(36)
a(26) =   74 - a(27) - a(28) - a(29)
a(25) =   37 - a(30)
a(22) =   74 - a(23) - a(28) - a(29)
a(21) =        a(23) - a(27) + a(29)
a(20) =      - a(23) + a(27) + a(28)
a(19) =   37 - a(24)
a(17) =   37 - a(27)
a(16) = - 37 + a(27) + a(28) + a(29)
a(15) =   37 - a(29)
a(14) =   37 - a(28)
a(13) =   37 - a(18)
a(12) =   74 - a(18) - a(24) - a(30) + a(31) - a(36)
a(11) =   37 - a(23) + a(27) - a(29)
a(10) =   37 + a(23) - a(27) - a(28)
a( 9) =   37 - a(23)
a( 8) = - 37 + a(23) + a(28) + a(29)
a( 7) = -148 + a(18) + a(24) + a(30) + a(32) + a(33) + a(34) + a(35) + 2 * a(36)
a( 6) = - 74 + a(32) + a(33) + a(34) + a(35) + a(36)
a( 5) =   37 - a(35)
a( 4) =   37 - a(34)
a( 3) =   37 - a(33)
a( 2) =   37 - a(32)
a( 1) =   37 - a(36)

Note: The Embedded Magic Square is based on the consecutive integers 11, 12, ... 26.

With the border variables constant, an optimized guessing routine (MgcSqr6e) produced 384 Magic Squares within 23 seconds, which are shown in Attachment 6.9.1.

With a(18), a(24) and the 4 x 4 square variables constant, the same optimized guessing routine, produced 1728 Magic Squares within 26,5 minutes, which are shown in Attachment 6.9.2.

Based on the Embedded Pan Magic Square shown above, 645120 solutions are possible (Counted, after disabling the printing statement, within 45,7 minutes), which results in following possible solutions:

- Total solutions for embedded Pan Magic Squares  384 * 645120 =  247 106.
- Total solutions for embedded     Magic Squares 7040 * 645120 = 4,54 109.

It should be noted that much more Concentric Magic Squares can be generated with routine MgcSqr6e, when the base for the Embedded Magic Squares is not limited to the consecutive integers 11, 12, ... 26.

6.7.2 Concentric Magic Squares (2)

Alternatively the border of a 6th order Concentric Magic Square can be described by following equations:

a(32) = 111 - a(31) - a(33) - a(34) - a(35) - a(36)
a(12) = 111 - a( 6) - a(18) - a(24) - a(30) - a(36)

a( 6) = 37 - a(31)    a( 7) = 37 - a(12)
a( 5) = 37 - a(35)    a(13) = 37 - a(18)
a( 4) = 37 - a(34)    a(19) = 37 - a(24)
a( 3) = 37 - a(33)    a(25) = 37 - a(30)
a( 2) = 37 - a(32)
a( 1) = 37 - a(36)

The resulting solutions will be unique when following conditions are added to the equations listed above:

a( 6) < a(31) < a(36)         prevent rotation and reflection
a(32) < a(33) < a(34) < a(35) prevent permutation of non corner variables
a(12) < a(18) < a(24) < a(30)

An optimized guessing routine (MgcSqr6e3) produced, based on the integers 1 ... 10 and 27 ... 36, 140 suitable unique borders within 6,8 seconds, which are shown in Attachment 6.9.3.

Consequently, the total number of borders will be 140 * 8 * (4!)2 = 645120 as found in Section 6.7.1 above.

6.7.3 Concentric Magic Squares (3)

A more controllable collection of Concentric Magic Squares can be obtained when the nine 2 x 2 sub squares - as shown below - sum to the same constant (H.B. Meyer).

 a(1) a(2) a(3) a(4) a(5) a(6) a(7) a(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15) a(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) a(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31) a(32) a(33) a(34) a(35) a(36)

As within the embedded Pan Magic Square all possible 2 x 2 sub squares sum already to this constant, this property results in following eight additional equations:

a( 1) + a( 2) + a( 7) + a( 8) = 74
a( 3) + a( 4) + a( 9) + a(10) = 74
a( 5) + a( 6) + a(11) + a(12) = 74
a(13) + a(14) + a(19) + a(20) = 74
a(17) + a(18) + a(23) + a(24) = 74
a(25) + a(26) + a(31) + a(32) = 74
a(27) + a(28) + a(33) + a(34) = 74
a(29) + a(30) + a(35) + a(36) = 74

Which can be combined with the equations describing a Concentric Magic Square of the sixth order for distinct integers, as deducted in Section 6.9.1 above, and results in following linear equations:

a(31) =  111 - a(32) - a(33) - a(34) - a(35) - a(36)
a(29) =   74 - a(30) - a(35) - a(36)
a(27) =   74 - a(28) - a(33) - a(34)
a(26) =   37 + a(30) - a(31) - a(32)
a(25) =   37 - a(30)
a(22) =   74 - a(23) - a(28) - a(29)
a(21) =        a(23) - a(27) + a(29)
a(20) =   74 - a(23) - a(33) - a(34)
a(19) =   37 - a(24)
a(18) =   37 - a(23) - a(24) + a(27)
a(17) = - 37 + a(28) + a(33) + a(34)
a(16) =      - a(30) + a(31) + a(32)
a(15) = - 37 + a(30) + a(35) + a(36)
a(14) =   37 - a(28)
a(13) =        a(23) + a(24) - a(27)
a(12) =   74 + a(23) + a(28) - a(30) - a(32) - a(35) - 2 * a(36)
a(11) =   74 - a(17) - a(23) - a(29)
a(10) = - 37 + a(23) + a(33) + a(34)
a( 9) =   37 - a(23)
a( 8) =   74 - a(11) - a(33) - a(34)
a( 7) =   37 - a(12)
a( 6) =   37 - a(31)
a( 5) =   37 - a(35)
a( 4) =   37 - a(34)
a( 3) =   37 - a(33)
a( 2) =   37 - a(32)
a( 1) =   37 - a(36)

Note: The Embedded Pan Magic Square is not based on the consecutive integers 11, 12, ... 26.

For consecutive integers, an optimized guessing routine (MgcSqr6e2) produced 1536 Concentric Magic Squares within 120 seconds, which are shown in Attachment 6.9.5.

It should be noted that much more Concentric Magic Squares can be generated with routine MgcSqr6e2, when the base for the Embedded Magic Squares is not limited to the consecutive integers 11, 12, ... 26.

6.7.4 Eccentric Magic Squares

An Eccentric Magic Square can be defined as a Magic Corner Square of order n, supplemented with two or more (i) rows and columns to a Magic Square of order (n + i).

A 6th order Eccentric Magic Square consists of one (Pan) Magic Corner Square of the 4th order, supplemented with two rows and two columns.

 a(1) a(2) a(3) a(4) a(5) a(6) a(7) a(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15) a(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) a(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31) a(32) a(33) a(34) a(35) a(36)

A Pan Magic Corner Square can be described by following linear equations:

 a(15) + a(16) + a(17) + a(18) = 74 a(21) + a(22) + a(23) + a(24) = 74 a(27) + a(28) + a(29) + a(30) = 74 a(33) + a(34) + a(35) + a(36) = 74 a(15) + a(21) + a(27) + a(33) = 74 a(16) + a(22) + a(28) + a(34) = 74 a(17) + a(23) + a(29) + a(35) = 74 a(18) + a(24) + a(30) + a(36) = 74 a(15) + a(22) + a(29) + a(36) = 74 a(16) + a(23) + a(30) + a(33) = 74 a(17) + a(24) + a(27) + a(34) = 74 a(18) + a(21) + a(28) + a(35) = 74 a(15) + a(24) + a(29) + a(34) = 74 a(16) + a(21) + a(30) + a(35) = 74 a(17) + a(22) + a(27) + a(36) = 74 a(18) + a(23) + a(28) + a(33) = 74

which can be combined with the equations describing a Magic Square of the 6th order for distinct integers (Section 6.2), and result in following linear equations:

a(33) =  74 - a(34) - a(35) - a(36)
a(31) =  37 - a(32)
a(29) =  74 - a(30) - a(35) - a(36)
a(28) =       a(30) - a(34) + a(36)
a(27) =     - a(30) + a(34) + a(35)
a(25) =  37 - a(26)
a(24) =  37 - a(34)
a(23) = -37 + a(34) + a(35) + a(36)
a(22) =  37 - a(36)
a(21) =  37 - a(35)
a(19) =  37 - a(20)
a(18) =  37 - a(30) + a(34) -a(36)
a(17) =  37 + a(30) - a(34) -a(35)
a(16) =  37 - a(30)
a(15) = -37 + a(30) + a(35) + a(36)
a(13) =  37 - a(14)
a(11) =  74 + a(12) - a(16) - a(21) - a(26) - a(31)
a( 8) =  18.5 - 0.5 * (a(9) + a(10) + a(11) + a(12) - a(13) - a(19) - a(25) - a(31))
a( 7) = 111 - a( 8) - a( 9) - a(10) - a(11) - a(12)
a( 6) =  37 - a(12)
a( 5) =  37 - a(11)
a( 4) =  37 - a(10)
a( 3) =  37 - a( 9)
a( 2) = 111 - a( 8) - a(14) - a(20) - a(26) - a(32)
a( 1) =  37 - a( 8)

Note: The Magic Corner Square is based on the consecutive integers 11, 12, ... 26.

The number of Eccentric Magic Squares is determined by the sum of the values of the key variables a(16) and a(21), which are determined by the generated Magic Corner Squares of the 4th order.

An optimized guessing routine (MgcSqr6f) produced, with the Corner Square variables constant and key variables
a(16) = 21 and a(21) = 23, 6592 Eccentric Magic Squares within 5,5 minutes, which are shown in Attachment 6.9.4.

Attachment 6.9.6 shows, as a function of the sum of the key variables (s2), the possible number of borders Nb and the related number of Simple - and Pan Magic Squares, which results in following possible solutions:

- Total solutions for Pan Magic Corner Squares  3357696
- Total solutions for     Magic Corner Squares 63345920

It should be noted that much more Eccentric Magic Squares can be generated with routine MgcSqr6f, when the base for the Magic Corner Squares is not limited to the consecutive integers 11, 12, ... 26.

6.7.5 Inlaid Magic Squares

A 6th order Magic Square might be composed out of:

• One 4th order Simple Magic Corner Square D with Magic Sum s4 (top/left);
• One 3th order Simple Magic Corner Square A with Magic Sum s31 (bottom/right);
• Two 2 x 3 Magic Rectangles B/C with Pair Sum Pr3 and Magic Sum s32.

As illustrated below:

 a(1) a(2) a(3) a(4) a(5) a(6) a(7) a(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15) a(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) a(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31) a(32) a(33) a(34) a(35) a(36)

Based on the defining equations of an order 4 Simple Magic Square, as deducted in Section 2.2, a dedicated procedure can be developed (ref. MgcSqr674):

• to read previously generated order 3 Simple Magic Squares A;
• to generate the order 4 Simple Magic Squares D;
• to complete the 6 x 6 Inlaid Magic Squares with the 2 x 3 Magic Rectangles B/C.

Attachment 6.7.4 shows the first occurring 6th order Inlaid Magic Squares, for each of the possible 3th order Magic Corner Squares (48 ea).

Each square shown corresponds with miscellaneous (16 ... 128) Inlaid Magic Squares, resuling in a total of 2240.