Office Applications and Entertainment, Magic Squares  Index About the Author

8.8   Concentric and Eccentric Magic Squares

8.8.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.

An 8th order Concentric Magic Square consists of an embedded Magic Square of the 6th order with an embedded (Pan) Magic Square of the 4th order.

 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(37) a(38) a(39) a(40) a(41) a(42) a(43) a(44) a(45) a(46) a(47) a(48) a(49) a(50) a(51) a(52) a(53) a(54) a(55) a(56) a(57) a(58) a(59) a(60) a(61) a(62) a(63) a(64)

With the inner 4 x 4 square pan magic, the embedded Magic Squares can be described by following linear equations:

a(50) =  195 - a(51) - a(52) - a(53) - a(54) - a(55)
a(43) =  130 - a(44) - a(45) - a(46)
a(42) =   65 - a(47)
a(37) =  130 - a(38) - a(45) - a(46)
a(36) =        a(38) - a(44) + a(46)
a(35) =      - a(38) + a(44) + a(45)
a(34) =   65 - a(39)
a(30) =   65 - a(44)
a(29) = - 65 + a(44) + a(45) + a(46)
a(28) =   65 - a(46)
a(27) =   65 - a(45)
a(26) =   65 - a(31)
a(23) =  130 - a(31) - a(39) - a(47) + a(50) - a(55)
a(22) =   65 - a(38) + a(44) - a(46)
a(21) =   65 + a(38) - a(44) - a(45)
a(20) =   65 - a(38)
a(19) = - 65 + a(38) + a(45) + a(46)
a(18) = -260 + a(31) + a(39) + a(47) + a(51) + a(52) + a(53) + a(54) + 2 * a(55)
a(15) = -130 + a(51) + a(52) + a(53) + a(54) + a(55)
a(14) =   65 - a(54)
a(13) =   65 - a(53)
a(12) =   65 - a(52)
a(11) =   65 - a(51)
a(10) =   65 - a(55)

which can be completed with the equations describing the outer border, which results in following linear equations:

a(57) =  260 - a(58) - a(59) - a(60) - a(61) - a(62) - a(63) - a(64)
a(50) =  195 - a(51) - a(52) - a(53) - a(54) - a(55)
a(49) =   65 - a(56)
a(43) =  130 - a(44) - a(45) - a(46)
a(42) =   65 - a(47)
a(41) =   65 - a(48)
a(37) =  130 - a(38) - a(45) - a(46)
a(36) =        a(38) - a(44) + a(46)
a(35) =      - a(38) + a(44) + a(45)
a(34) =   65 - a(39)
a(33) =   65 - a(40)
a(30) =   65 - a(44)
a(29) = - 65 + a(44) + a(45) + a(46)
a(28) =   65 - a(46)
a(27) =   65 - a(45)
a(26) =   65 - a(31)
a(25) =   65 - a(32)
a(23) =  130 - a(31) - a(39) - a(47) + a(50) - a(55)
a(22) =   65 - a(38) + a(44) - a(46)
a(21) =   65 + a(38) - a(44) - a(45)
a(20) =   65 - a(38)
a(19) = - 65 + a(38) + a(45) + a(46)
a(18) = -260 + a(31) + a(39) + a(47) + a(51) + a(52) + a(53) + a(54) + 2 * a(55)
a(17) =   65 - a(24)
a(16) =  195 - a(24) - a(32) - a(40) - a(48) - a(56) + a(57) - a(64)
a(15) = -130 + a(51) + a(52) + a(53) + a(54) + a(55)
a(14) =   65 - a(54)
a(13) =   65 - a(53)
a(12) =   65 - a(52)
a(11) =   65 - a(51)
a(10) =   65 - a(55)
a( 9) =   65 - a(16)
a( 8) =   65 - a(57)
a( 7) =   65 - a(63)
a( 6) =   65 - a(62)
a( 5) =   65 - a(61)
a( 4) =   65 - a(60)
a( 3) =   65 - a(59)
a( 2) =   65 - a(58)
a( 1) =   65 - a(64)

Note: The Embedded Magic Square is based on the consecutive integers 15, 16, ... 50.

With the exterior border variables constant, an optimized guessing routine (MgcSqr8i), might produce the 4,54 109 possible Magic Squares, of which 1728, based on one interior Magic Square of the 4th order and the variables a(23) and a(31) constant, are shown in Attachment 8.6.1.

With the embedded Magic Square and the variables a(58) thru a(64) constant, the same optimized guessing routine, produced 1440 Magic Squares within 127 seconds, which are shown in Attachment 8.6.2.

8.8.2 Concentric Magic Squares (2)

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

a(58) = 260 - a(57) - a(59) - a(60) - a(61) - a(62) - a(63) - a(64)
a(16) = 260 - a( 8) - a(16) - a(24) - a(32) - a(40) - a(48) - a(64)

a( 8) = 65 - a(57)    a( 9) = 65 - a(16)
a( 7) = 65 - a(63)    a(17) = 65 - a(24)
a( 6) = 65 - a(62)    a(25) = 65 - a(32)
a( 5) = 65 - a(61)    a(33) = 65 - a(40)
a( 4) = 65 - a(60)    a(41) = 65 - a(48)
a( 3) = 65 - a(59)    a(49) = 65 - a(56)
a( 2) = 65 - a(58)
a( 1) = 65 - a(64)

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

a( 8) < a(57) < a(64)                         prevent rotation and reflection
a(59) < a(60) < a(61) < a(62) < a(63) < a(64) prevent permutation of non corner variables
a(16) < a(24) < a(32) < a(40) < a(48) < a(64)

An optimized guessing routine (MgcSqr8i2) counted, based on the integers 1 ... 14 and 51 ... 64, 28490 unique borders in 138 seconds.

The total number of borders will be 28490 * 8 * (6!)2 = 1,18154 1011.

8.8.3 Bordered Magic Squares

Also other Magic Squares of the 6th order, as described and constructed in Section 6.2 thru Section 6.11, can be used as Center Squares for 8th order Bordered Magic Squares.

The Embedded Magic Squares will have a Magic Sum s6 = 195 and might be based on the consecutive integers 15, 16, ... 50.

Attachment 8.6.4 contains - based on some of the described Magic Squares of order 6 - examples of Bordered Magic Squares for the first occurring border.

8.8.4 Eccentric Magic Squares (1)

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 8th order Eccentric Magic Square consists of one Magic Corner Square of the 6th 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(37) a(38) a(39) a(40) a(41) a(42) a(43) a(44) a(45) a(46) a(47) a(48) a(49) a(50) a(51) a(52) a(53) a(54) a(55) a(56) a(57) a(58) a(59) a(60) a(61) a(62) a(63) a(64)

Rather than starting with the equations of the Magic Corner Square, the equations of the supplementary rows and columns can be used as a starting point for the generation of Eccentric Magic Squares.

The supplementary rows and columns can be described by following linear equations:

a( 1) + a( 2) + a( 3) + a( 4) + a( 5) + a( 6) + a( 7) + a( 8) = 260
a( 9) + a(10) + a(11) + a(12) + a(13) + a(14) + a(15) + a(16) = 260
a( 1) + a( 9) + a(17) + a(25) + a(33) + a(41) + a(49) + a(57) = 260
a( 2) + a(10) + a(18) + a(26) + a(34) + a(42) + a(50) + a(58) = 260
a( 8) + a(15) + a(22) + a(29) + a(36) + a(43) + a(50) + a(57) = 260
a( 1) + a(10) = 65
a( 3) + a(11) = 65
a( 4) + a(12) = 65
a( 5) + a(13) = 65
a( 6) + a(14) = 65
a( 7) + a(15) = 65
a( 8) + a(16) = 65
a(17) + a(18) = 65
a(25) + a(26) = 65
a(33) + a(34) = 65
a(41) + a(42) = 65
a(49) + a(50) = 65
a(57) + a(58) = 65

Which can be reduced, by means of row and column manipulations, to:

a(57) =  65 - a(58)
a(49) =  65 - a(50)
a(41) =  65 - a(42)
a(33) =  65 - a(34)
a(25) =  65 - a(26)
a(17) =  65 - a(18)
a(15) = 195 + a(16) - a(22) - a(29) - a(36) - a(43) - a(50) - a(57)
a(10) = 0.5 * ( 65  - a(11) - a(12) - a(13) - a(14) - a(15) - a(16) + a(17) + a(25) + a(33) + a(41) + a(49) + a(57))
a( 9) = 260 - a(10) - a(11) - a(12) - a(13) - a(14) - a(15) - a(16)
a( 8) =  65 - a(16)
a( 7) =  65 - a(15)
a( 6) =  65 - a(14)
a( 5) =  65 - a(13)
a( 4) =  65 - a(12)
a( 3) =  65 - a(11)
a( 2) =  65 - a( 9)
a( 1) =  65 - a(10)

Note: The Magic Corner Square is based on the consecutive integers 15, 16, ... 50.

It is obvious that the number of Eccentric Magic Squares is determined by the sum of the values of the key variables
a(43), a(36), a(29) and a(22).

An optimized guessing routine (MgcSqr8j) counted, based on one (Eccentric) Magic Corner Square of the sixth order,
a(16) = 64 and a(50) = 51, 1518336 Eccentric Magic Squares within 1,5 hours (printing statement disabled), of which
3024 are shown in Attachment 8.6.3.

8.8.5 Eccentric Magic Squares (2)

Alternatively the supplementary rows and columns - further referred to as 'border' - of an 8th order Eccentric Magic Square can be described by following equations:

a( 8) = 260 - a(15) - s2 - a(50) - a(57)
a(18) = 260 - a(58) - a(50) - a(42) - a(34) - a(26) - a(10) - a(2)
a(11) = 260 - a(16) - a(15) - a(14) - a(13) - a(12) - a(10) - a(9)

a(16) = 65 - a( 8)    a(18) = 65 - a(17)
a( 7) = 65 - a(15)    a(26) = 65 - a(25)
a( 6) = 65 - a(14)    a(34) = 65 - a(23)
a( 5) = 65 - a(13)    a(42) = 65 - a(41)
a( 4) = 65 - a(12)    a(50) = 65 - a(49)
a( 3) = 65 - a(11)    a(58) = 65 - a(57)
a( 2) = 65 - a( 9)
a( 1) = 65 - a(10)

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

a( 2) < a( 9)                 prevent mirroring around diagonal a(1) ... a(64)
a(18) < a(26) < a(34) < a(42) prevent permutation of subject variables
a(11) < a(12) < a(13) < a(14)

An optimized guessing routine (MgcSqr8j2) produced, based on the integers 1 ... 14 and 51 ... 64, while varying s2, 83756336 unique borders. The breakdown of these borders as a function of s2 is shown in the graph below. The actual number of borders Nb can be obtained by multiplication with 2 * (4!)2 (= 1152).

8.8.6 Inlaid Magic Squares

On Holger Danielsson's site I found following 8th order Inlaid Magic Square:

 46 41 44 47 23 20 17 22 3 32 50 5 40 10 61 59 27 2 29 56 58 37 16 35 51 53 8 26 13 64 34 11 54 25 55 4 33 15 60 14 30 7 28 49 63 36 9 38 6 52 1 31 12 57 39 62 43 48 45 42 18 21 24 19
 87 111 84 108

This 8th order Magic Square is composed out of an Associated Border and four each 3th order Magic Center Squares A, B, C and D with Magic Sums s(1) = 87, s(2) = 111, s(3) = 84 and s(4) = 108.

The relation between the Magic Sums s(1), s(2), s(3) and s(4) is:

s(1) = 3 * s8 / 4 - s(4)
s(2) = 3 * s8 / 4 - s(3)

With s8 = 260 the Magic Sum of the 8th order Inlaid Magic Square.

Based on the general equations defining a Magic Square of the third order:

```a'(7) =     s1'     - a'(8)     - a'(9)
a'(6) = 4 * s1' / 3 - a'(8) - 2 * a'(9)
a'(5) =     s1' / 3
a'(4) = 2 * s1' / 3 - a'(6)
a'(3) = 2 * s1' / 3 - a'(7)
a'(2) = 2 * s1' / 3 - a'(8)
a'(1) = 2 * s1' / 3 - a'(9)
```

and the distinct integers 1 ... 64, 35280 Magic Squares of order 3 can be found (= 4410 Unique Squares) with 56 different Magic Sums (s1' = 15 ... 180). The frequency of the Magic Sums is summarised in the graph below (Unique Squares): The Associated Border can be described by following linear equations:

```a(60) =             a(61) - s(3) + s(4)
a(59) =             a(62) - s(3) + s(4)
a(58) =             a(63) - s(3) + s(4)
a(57) =      s8 - 2*a(61) - 2*a(62) - 2*a(63) - a(64) + 3*s(3) - 3*s(4)
a(41) =      s8   - a(48) - s(3) - s(4)
a(40) =  2 * s8   - a(48) - a(56) - a(61) - a(62) - a(63) - a(64) - 3*s(4)
a(33) =      s8   - a(40) - s(3) - s(4)
a(32) =      s8/4 - a(33)
a(25) = -    s8/2 - a(32) + s(3) + s(4)
a(24) = -3 * s8/4 + a(48) + s(3) + s(4)
a(17) =      s8/4 - a(48)
a(16) = -3 * s8/4 + a(56) + s(3) + s(4)
a( 9) =      s8/4 - a(56)
a( 8) =      s8/4 - a(57)
a( 7) =      s8/4 - a(63) + s(3) - s(4)
a( 6) =      s8/4 - a(62) + s(3) - s(4)
a( 5) =      s8/4 - a(61) + s(3) - s(4)
a( 4) =      s8/4 - a(61)
a( 3) =      s8/4 - a(62)
a( 2) =      s8/4 - a(63)
a( 1) =      s8/4 - a(64)
```

Which can be incorporated in an optimised guessing routine MgcSqr8k, together with the defining equations of the four 3th order inlays.

Attachment 8.6.14 shows a few 8th order Inlaid Magic Squares for miscellaneous possible Magic Sums s(3) and s(4).

Numerous solutions can be obtained by rotation and reflection of the four inlays (n3 = 84 = 4096) and variation of the borders. It should be noted that the number of possible borders (n8) is dependant of s(3) and s(4):

 s(3) s(4) n3 n8 Total s(3) s(4) n3 n8 Total 54 57 81 84 84 105 102 111 108 114 4096 4096 4096 4096 4096 144 144 144 1008 144 589824 589824 589824 4128768 589824 87 87 90 90 93 105 111 108 141 138 4096 4096 4096 4096 4096 144 1008 144 144 144 589824 4128768 589824 589824 589824

which results for the Inlaid Magic Squares as shown in Attachment 8.6.14 in 8 * 12976128 = 103809024 solutions.