Office Applications and Entertainment, Magic Squares  Index About the Author

9.6   Concentric and Eccentric Magic Squares

9.6.1 Concentric Magic Squares (1)

In general an odd Concentric Magic Square consists of a centre of one cell around which borders can be constructed again and again.

A 9th order Concentric Magic Square consists of an embedded Magic Square of the 7th order with an embedded Magic Square of the 5th order with an embedded Magic Square of the 3th 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) a(65) a(66) a(67) a(68) a(69) a(70) a(71) a(72) a(73) a(74) a(75) a(76) a(77) a(78) a(79) a(80) a(81)

The embedded Magic Squares can be described by following linear equations:

a(65) =  287 - a(66) - a(67) - a(68) - a(69) - a(70) - a(71)
a(57) =  205 - a(58) - a(59) - a(60) - a(61)
a(56) =   82 - a(62)
a(49) =  123 - a(50) - a(51)
a(48) =   82 - a(52)
a(47) =   82 - a(53)
a(42) =  164 - a(50) - 2 * a(51)
a(41) =   41
a(40) =   82 - a(42)
a(39) =   82 - a(43)
a(38) =   82 - a(44)
a(34) =  123 - a(43) - a(52) + a(57) - a(61)
a(33) =   82 - a(49)
a(32) =   82 - a(50)
a(31) =   82 - a(51)
a(30) =   82 - a(34)
a(29) =   82 - a(35)
a(26) = -123 + a(29) + a(38) + a(47) + a(56) + a(65) - a(71)
a(25) =   82 - a(57)
a(24) =   82 - a(60)
a(23) =   82 - a(59)
a(22) =   82 - a(58)
a(21) =   82 - a(61)
a(20) =   82 - a(26)
a(17) =  287 - a(26) - a(35) - a(44) - a(53) - a(62) - a(71)
a(16) =   82 - a(70)
a(15) =   82 - a(69)
a(14) =   82 - a(68)
a(13) =   82 - a(67)
a(12) =   82 - a(66)
a(11) =   82 - a(71)

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

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

Note: The Embedded Magic Square is based on the consecutive integers 17, 18, ... 65.

With the variables of the two exterior borders and of the 3th order most inner Magic Square constant, an optimized guessing routine (MgcSqr9d), produced 2880 Magic Squares in 350 seconds which are shown in Attachment 9.5.1.

With the 7th order embedded Magic Square and the variables a(74) thru a(81) constant, the same optimized guessing routine, produced 5040 Magic Squares within 352 seconds, which are shown in Attachment 9.5.2.

9.6.2 Concentric Magic Squares (2)

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

a(74) = 369 - a(73) - a(75) - a(76) - a(77) - a(78) - a(79) - a(80) - a(81)
a(18) = 369 - a( 9) - a(27) - a(36) - a(45) - a(54) - a(63) - a(72) - a(81)

a( 9) = 82 - a(73)    a(10) = 82 - a(18)
a( 8) = 82 - a(80)    a(19) = 82 - a(27)
a( 7) = 82 - a(79)    a(28) = 82 - a(36)
a( 6) = 82 - a(78)    a(37) = 82 - a(45)
a( 5) = 82 - a(77)    a(46) = 82 - a(54)
a( 4) = 82 - a(76)    a(55) = 82 - a(63)
a( 3) = 82 - a(75)    a(64) = 82 - a(72)
a( 2) = 82 - a(74)
a( 1) = 82 - a(81)

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

a( 9) < a(73) < a(81)                                 prevent rotation and reflection
a(74) < a(75) < a(76) < a(77) < a(78) < a(79) < a(80) prevent permutation of non corner variables
a(18) < a(27) < a(36) < a(45) < a(54) < a(63) < a(72)

An optimized guessing routine (MgcSqr9d2) generated, based on the integers 1 ... 16 and 66 ... 81, 3568 unique borders in 600 seconds.

The total number of borders will be 3568 * 8 * (7!)2 = 7,25063 1011.

9.6.3 Bordered Magic Squares

Also Magic Squares of the 7th order with Inlays, as described and constructed in Section 7.6, can be used as Center Squares for 9th order Bordered Magic Squares.

The Embedded Magic Squares will have a Magic Sum s7 = 287 and might be based on the consecutive integers 17, 18, ... 65.

Attachment 9.5.8 contains for the first occurring border, one example of each of the possible Bordered Magic Squares with Inlayd Center Squares.

9.6.4 Bordered Magic Squares, Split Border

Alternatively 9th order Bordered Magic Squares with Magic Sum s9 = 369 can be constructed based on:

• an order 5 (Symmetric) Magic Center Square with Magic Sum s5 = 205;
• 28 pairs, each summing to 82, surrounding the (Symmetric) Magic Center Square;
• a split of the supplementary rows and columns into three equal parts, each summing to s3 = 123.

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) 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) a(65) a(66) a(67) a(68) a(69) a(70) a(71) a(72) a(73) a(74) a(75) a(76) a(77) a(78) a(79) a(80) a(81)

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

Typical Corner Section (3 x 3):

 a'(1) a'(2) a'(3) a'(4) a'(5) a'(6) a'(7) a'(8) -

a'(3) = 123 - a'(2) - a'(1)
a'(4) =  82 - a'(2)
a'(5) =  82 - a'(1)
a'(6) =  82 - a'(3)
a'(7) = 123 - a'(4) - a'(1)
a'(8) =  82 - a'(7)

Typical Border Rectangle (2 x 3):

 a'(1) a'(2) a'(3) a'(4) a'(5) a'(6)

a'(3) = 123 - a'(2) - a'(1)
a'(4) =  82 - a'(1)
a'(5) =  82 - a'(2)
a'(6) =  82 - a'(3)

Based on the equations above, procedures can be develloped to:

• generate, based on the distinct integers {1 ... 81}, four Corner Squares (3 x 3);
• complete the border with four Magic Rectangles (2 x 3);
• construct the Center Symmetric Magic Square of order 5 based on the remaining 25 integers.

The first occuring Bordered Magic Square is shown below:

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

The border shown above corresponds with (4! * 84) * (4! * 124) = 4,89 * 1010 borders as:

1. The Corner Squares can be arranged in 4! ways and belong each to a collection of 8 Corner Squares;
2. The Rectangles can be arranged in 4! ways and belong each to a collection of 2 * 3! = 12 Rectangles.

Based on the distinct integers applied in the border shown above, 20502 suitable sets of Corner Squares can be found.

9.6.5 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 9th order Eccentric Magic Square consists of one Magic Corner Square of the 7th 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) a(65) a(66) a(67) a(68) a(69) a(70) a(71) a(72) a(73) a(74) a(75) a(76) a(77) a(78) a(79) a(80) a(81)

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) + a( 9) = 369
a(10) + a(11) + a(12) + a(13) + a(14) + a(15) + a(16) + a(17) + a(18) = 369
a( 1) + a(10) + a(19) + a(28) + a(37) + a(46) + a(55) + a(64) + a(73) = 369
a( 2) + a(11) + a(20) + a(29) + a(38) + a(47) + a(56) + a(65) + a(74) = 369
a( 9) + a(17) + a(25) + a(33) + a(41) + a(49) + a(57) + a(65) + a(73) = 369
a( 1) + a(11) = 82
a(19) + a(20) = 82
a(28) + a(29) = 82
a(37) + a(38) = 82
a(46) + a(47) = 82
a(55) + a(56) = 82
a(64) + a(65) = 82
a(73) + a(74) = 82
a( 3) + a(12) = 82
a( 4) + a(13) = 82
a( 5) + a(14) = 82
a( 6) + a(15) = 82
a( 7) + a(16) = 82
a( 8) + a(17) = 82
a( 9) + a(18) = 82

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

a(73) =  82 - a(74)
a(64) =  82 - a(65)
a(55) =  82 - a(56)
a(46) =  82 - a(47)
a(37) =  82 - a(38)
a(28) =  82 - a(29)
a(19) =  82 - a(20)
a(17) = 287 + a(18) - a(25) - a(33) - a(41) - a(49) - a(57) - a(65) - a(73)
a(11) =  41 + 0.5*( - a(12) - a(13) - a(14) - a(15) - a(16) - a(17) - a(18) +
+ a(19) + a(28) + a(37) + a(46) + a(55) + a(64) + a(73))
a(10) = 369 - a(11) - a(12) - a(13) - a(14) - a(15) - a(16) - a(17) - a(18)
a( 9) =  82 - a(18)
a( 8) =  82 - a(17)
a( 7) =  82 - a(16)
a( 6) =  82 - a(15)
a( 5) =  82 - a(14)
a( 4) =  82 - a(13)
a( 3) =  82 - a(12)
a( 2) =  82 - a(10)
a( 1) =  82 - a(11)

Note: The Magic Corner Square is based on the consecutive integers 17, 18, ... 65.

Following typical cases have been considered:

- The 7th order Magic Corner Square is an Eccentric Magic Square itself (ref. CnstrSngl9d);
- The 7th order Magic Corner Square is a  Pan Magic Square (ref. CnstrSngl9e).

In both cases it is obvious that the number of Eccentric Magic Squares is determined by the sum s2 of the values of the key variables a(57), a(49), a(41), a(33) and a(25).

An optimized guessing routine (MgcSqr9e) produced, based on the Eccentric Magic Corner Square of the 7th order as shown in the first Spreadsheet Solution above and a(74), a(65), a(56), a(18), a(16) and a(15) constant, 1440 Eccentric Magic Squares within 126 minutes, of which 252 are shown in Attachment 9.5.3.

The same routine produced, based on óne Pan Magic Corner Square of the seventh order and a(74), a(65), a(56), a(18), a(16) and a(15) constant, 2304 Eccentric Magic Squares within 50 minutes, which are shown in Attachment 9.5.4.

Other examples of Pan Magic Squares of the 7th order, which can be used as Base Squares for Eccentric Magic Squares of the 9th order with the same sum s2 = 209, are shown in Attachment 9.5.5.

These 2496 squares are filtered from the 360 Classes defined by Collection {B} as described in Section 7.3, by means of an automatic filter (MgcSqr7f).

9.6.6 Eccentric Magic Squares, Overlapping Sub Squares

An order 9 Eccentric Magic Square with a Magic Sum s9 = 369 might contain:

• One 7th order (Pan) Magic Corner Square with Magic Sum s7 = 287 (bottom/right)
• One 3th order Semi Magic Corner Square with Magic Sum s3 = 123 (top/left)

as shown 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) 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) a(65) a(66) a(67) a(68) a(69) a(70) a(71) a(72) a(73) a(74) a(75) a(76) a(77) a(78) a(79) a(80) a(81)

Based on this definition a dedicated procedure can be used (Priem9g1):

• to generate a suitable 7th order Pan Magic Corner Square;
• to generate, based on the remainder of the available pairs, a 3th order Semi Magic Corner Square;
• to complete the Main Diagonal and determine the related Border Pairs;
• to complete the 9th order Eccentric Magic Square with the two remaining 2 x 3 Magic Rectangles.

The 7th order Pan Magic Corner Squares can be obtained by means of transformation of Ultra Magic Squares as discussed in Section 7.6.5, which has the advantage of a high generation speed.

The number of unique 3th order Semi Magic Squares, which can be found within the range {1 ... 81}, is 367 (= 2936/8).

Attachment 9.5.6 shows for each unique 3th order Semi Magic Corner Square the first occuring Eccentric Magic Square with Overlapping Sub Squares.

Each square shown corresponds with numerous squares for the same unique order 3 Semi Magic Corner Square.

9.6.7 Eccentric Magic Squares
Associated Magic Corner Squares, Composed Rectangles

The order 9 Eccentric Magic Square shown below, with magic Sum s9 = 369, is composed out of:

• One 3th order Simple Magic Corner Square with Magic Sum s3 = 123 (top/left)
• One 6th order Associated Magic Corner Square with Magic Sum s6 = 246 (bottom/right)
• Two Composed Magic Rectangles order 3 x 6 with s3 = 123 and s6 = 246
 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) a(65) a(66) a(67) a(68) a(69) a(70) a(71) a(72) a(73) a(74) a(75) a(76) a(77) a(78) a(79) a(80) a(81)

Based on this definition subject squares can be obtained by transformation of (Compact) Associated Pan Magic Squares with split rows and columns (ref. Section 9.4.2), as illustrated below:

Compact, Associated, Pan Magic
 81 32 10 40 21 62 2 70 51
 74 34 15 45 23 55 4 66 53
 76 30 17 38 25 60 9 68 46
 18 77 28 58 39 26 47 7 69
 11 79 33 63 41 19 49 3 71
 13 75 35 56 43 24 54 5 64
 36 14 73 22 57 44 65 52 6
 29 16 78 27 59 37 67 48 8
 31 12 80 20 61 42 72 50 1
= > Composed, Associated Corner
 11 79 33 63 41 19 49 3 71
 13 75 35 56 43 24 54 5 64
 18 77 28 58 39 26 47 7 69
 29 16 78 27 59 37 67 48 8
 31 12 80 20 61 42 72 50 1
 36 14 73 22 57 44 65 52 6
 74 34 15 45 23 55 4 66 53
 76 30 17 38 25 60 9 68 46
 81 32 10 40 21 62 2 70 51
 The Associated Corner Square can also be transformed into a Pan Magic and Complete Corner Square (Euler). Attachment 9.5.7 shows for miscellaneous unique 3th order Simple Magic Square: Page 1, the first occuring Compact Associated Pan Magic Squares with split rows an columns (Priem9g2); Page 2, the related Eccentric Magic Squares with Associated Corner Squares and Composed Rectangles; Page 3, the related Eccentric Magic Squares with Pan Magic and Complete Corner Square; Each square shown corresponds with numerous squares for the same unique order 3 Simple Magic Square. 9.6.8 Spreadsheet Solutions The linear equations deducted in previous sections, have been applied in following Excel Spread Sheets: CnstrSngl9c  Concentric Squares of order 9, Concentric Corner Square CnstrSngl9d  Eccentric  Squares of order 9, Eccentric Corner Square CnstrSngl9e  Eccentric  Squares of order 9, Pan Magic Corner Square CnstrSngl9g1 Eccentric  Squares of order 9, Overlapping Sub Squares CnstrSngl9g2 Eccentric  Squares of order 9, Associated Corner Squares Only the red figures have to be “guessed” to construct one of the applicable Magic Squares of the 9th order (wrong solutions are obvious).