Office Applications and Entertainment, Magic Squares Index About the Author

12.0   Special Squares, Higher Order

12.1   Pan Magic Squares (12 x 12) composed of Pan Magic Sub Squares

12.1.4 Hendricks Squares, Introduction

The 12th order Pan Magic Square shown below is constructed by John Hendricks.

 94 57 76 63 75 64 93 58 69 82 51 88 52 87 70 81
 142 9 124 15 123 16 141 10 21 130 3 136 4 135 22 129
 118 33 100 39 99 40 117 34 45 106 27 112 28 111 46 105
 96 59 74 61 73 62 95 60 71 84 49 86 50 85 72 83
 144 11 122 13 121 14 143 12 23 132 1 134 2 133 24 131
 120 35 98 37 97 38 119 36 47 108 25 110 26 109 48 107
 92 55 78 65 77 66 91 56 67 80 53 90 54 89 68 79
 140 7 126 17 125 18 139 8 19 128 5 138 6 137 20 127
 116 31 102 41 101 42 115 32 43 104 29 114 30 113 44 103

The square is composed out of nine 4th order Pan Magic Sub Squares and contains - in addition to this - sixteen 4th order Embeddeb Magic Squares.

12.1.5 Hendricks Squares, Analysis

The properties mentioned in section 12.1.4 above result in following set of linear equations:

Pan Magic Sub Squares (9 ea):

 a(i1) a(i2) a(i3) a(i4) a(i5) a(i6) a(i7) a(i8) a(i9) a(i10) a(i11) a(i12) a(i13) a(i14) a(i15) a(i16)

a(i13) = 290 - a(i14) - a(i15) - a(i16)
a(i11) = 290 - a(i12) - a(i15) - a(i16)
a(i10) =       a(i12) - a(i14) + a(i16)
a(i9 ) =     - a(i12) + a(i14) + a(i15)
a(i8 ) = 145 - a(i14)
a(i7 ) =-145 + a(i14) + a(i15) + a(i16)
a(i6 ) = 145 - a(i16)
a(i5 ) = 145 - a(i15)
a(i4 ) = 145 - a(i12) + a(i14) - a(i16)
a(i3 ) = 145 + a(i12) - a(i14) - a(i15)
a(i2 ) = 145 - a(i12)
a(i1 ) =-145 + a(i12) + a(i15) + a(i16)

with i1 ... i16 the indices in the main square for the applicable Pan Magic Sub Square.

Embedded Magic Square (16 ea):

 a(i1) a(i2) a(i3) a(i4) a(i5) a(i6) a(i7) a(i8) a(i9) a(i10) a(i11) a(i12) a(i13) a(i14) a(i15) a(i16)

a(i13) = 290 - a(i14) - a(i15) - a(i16)
a(i9 ) = 290 - a(i10) - a(i11) - a(i12)
a(i7 ) =       a(i8 ) - a(i10) + a(i12) - a(i13) + a(i16)
a(i6 ) = 290 - a(i8 ) - a(i11) - a(i12) + a(i13) - a(i16)
a(i5 ) =     - a(i8 ) + a(i10) + a(i11)
a(i4 ) = 290 - a(i7 ) - a(i10) - a(i13)
a(i3 ) =-290 - a(i8 ) + a(i9 ) + 2*a(i10) + 2*a(i13) + a(i14)
a(i2 ) =       a(i8 ) - a(i9 ) - 2*a(i10) + a(i15) + 2*a(i16)
a(i1 ) =       a(i8 ) + a(i12) - a(i13)

with i1 ... i16 the indices in the main square for the applicable Embedded Magic Square.

This includes that the numbers of the main diagonals sum to the Magic Constant. Following equations ensure that also the numbers of all the broken diagonals parallel to it sum to the Magic Constant as well:

a( 2) + a(15) + a(28) + a(41) + a(54) + a(67) + a(80) + a(93) + a(106) + a(119) + a(132) + a(133) = 870
a( 3) + a(16) + a(29) + a(42) + a(55) + a(68) + a(81) + a(94) + a(107) + a(120) + a(121) + a(134) = 870
a( 4) + a(17) + a(30) + a(43) + a(56) + a(69) + a(82) + a(95) + a(108) + a(109) + a(122) + a(135) = 870
a( 5) + a(18) + a(31) + a(44) + a(57) + a(70) + a(83) + a(96) + a( 97) + a(110) + a(123) + a(136) = 870
a( 6) + a(19) + a(32) + a(45) + a(58) + a(71) + a(84) + a(85) + a( 98) + a(111) + a(124) + a(137) = 870
a( 7) + a(20) + a(33) + a(46) + a(59) + a(72) + a(73) + a(86) + a( 99) + a(112) + a(125) + a(138) = 870
a( 8) + a(21) + a(34) + a(47) + a(60) + a(61) + a(74) + a(87) + a(100) + a(113) + a(126) + a(139) = 870
a( 9) + a(22) + a(35) + a(48) + a(49) + a(62) + a(75) + a(88) + a(101) + a(114) + a(127) + a(140) = 870
a(10) + a(23) + a(36) + a(37) + a(50) + a(63) + a(76) + a(89) + a(102) + a(115) + a(128) + a(141) = 870
a(11) + a(24) + a(25) + a(38) + a(51) + a(64) + a(77) + a(90) + a(103) + a(116) + a(129) + a(142) = 870
a(12) + a(13) + a(26) + a(39) + a(52) + a(65) + a(78) + a(91) + a(104) + a(117) + a(130) + a(143) = 870

a(11) + a(22) + a(33) + a(44) + a(55) + a(66) + a(77) + a(88) + a( 99) + a(110) + a(121) + a(144) = 870
a(10) + a(21) + a(32) + a(43) + a(54) + a(65) + a(76) + a(87) + a( 98) + a(109) + a(132) + a(143) = 870
a( 9) + a(20) + a(31) + a(42) + a(53) + a(64) + a(75) + a(86) + a( 97) + a(120) + a(131) + a(142) = 870
a( 8) + a(19) + a(30) + a(41) + a(52) + a(63) + a(74) + a(85) + a(108) + a(119) + a(130) + a(141) = 870
a( 7) + a(18) + a(29) + a(40) + a(51) + a(62) + a(73) + a(96) + a(107) + a(118) + a(129) + a(140) = 870
a( 6) + a(17) + a(28) + a(39) + a(50) + a(61) + a(84) + a(95) + a(106) + a(117) + a(128) + a(139) = 870
a( 5) + a(16) + a(27) + a(38) + a(49) + a(72) + a(83) + a(94) + a(105) + a(116) + a(127) + a(138) = 870
a( 4) + a(15) + a(26) + a(37) + a(60) + a(71) + a(82) + a(93) + a(104) + a(115) + a(126) + a(137) = 870
a( 3) + a(14) + a(25) + a(48) + a(59) + a(70) + a(81) + a(92) + a(103) + a(114) + a(125) + a(136) = 870
a( 2) + a(13) + a(36) + a(47) + a(58) + a(69) + a(80) + a(91) + a(102) + a(113) + a(124) + a(135) = 870
a( 1) + a(24) + a(35) + a(46) + a(57) + a(68) + a(79) + a(90) + a(101) + a(112) + a(123) + a(134) = 870

The resulting number of equations can be written in the matrix representation as:

AH * a = s

which can be reduced, by means of row and column manipulations, and results in following set of linear equations:

```a(141) = 290 - a(142) - a(143) - a(144)
a(139) =     - a(140) + a(143) + a(144)
a(138) =       a(140) + a(142) - a(144)
a(137) = 290 - a(140) - a(142) - a(143)
a(135) =     - a(136) + a(143) + a(144)
a(134) =       a(136) + a(142) - a(144)
a(133) = 290 - a(136) - a(142) - a(143)
a(131) = 290 - a(132) - a(143) - a(144)
a(130) =       a(132) - a(142) + a(144)
a(129) =     - a(132) + a(142) + a(143)
a(128) =       a(132) + a(140) - a(144)
a(127) = 290 - a(132) - a(140) - a(143)
a(126) =       a(132) + a(140) - a(142)
a(125) =     - a(132) - a(140) + a(142) + a(143) + a(144)
a(124) =       a(132) + a(136) - a(144)
a(123) = 290 - a(132) - a(136) - a(143)
a(122) =       a(132) + a(136) - a(142)
a(121) =     - a(132) - a(136) + a(142) + a(143) + a(144)
a(120) = 145 - a(142)
a(119) =-145 + a(142) + a(143) + a(144)
a(118) = 145 - a(144)
a(117) = 145 - a(143)
a(116) = 145 - a(140) - a(142) + a(144)
a(115) =-145 + a(140) + a(142) + a(143)
a(114) = 145 - a(140)
a(113) = 145 + a(140) - a(143) - a(144)
a(112) = 145 - a(136) - a(142) + a(144)
a(111) =-145 + a(136) + a(142) + a(143)
a(110) = 145 - a(136)
a(109) = 145 + a(136) - a(143) - a(144)
a(108) = 145 - a(132) + a(142) - a(144)
a(107) = 145 + a(132) - a(142) - a(143)
a(106) = 145 - a(132)
a(105) =-145 + a(132) + a(143) + a(144)
a(104) = 145 - a(132) - a(140) + a(142)
a(103) = 145 + a(132) + a(140) - a(142) - a(143) - a(144)
a(102) = 145 - a(132) - a(140) + a(144)
a(101) =-145 + a(132) + a(140) + a(143)
a(100) = 145 - a(132) - a(136) + a(142)
a(99)  = 145 + a(132) + a(136) - a(142) - a(143) - a(144)
a(98)  = 145 - a(132) - a(136) + a(144)
a(97)  =-145 + a(132) + a(136) + a(143)
a(95)  =       a(96) + a(143) - a(144)
a(94)  =     - a(96) + a(142) + a(144)
a(93)  = 290 - a(96) - a(142) - a(143)
a(92)  =       a(96) + a(140) - a(144)
a(91)  =       a(96) - a(140) + a(143)
a(90)  =     - a(96) + a(140) + a(142)
a(89)  = 290 - a(96) - a(140) - a(142) - a(143) + a(144)
a(88)  =       a(96) + a(136) - a(144)
a(87)  =       a(96) - a(136) + a(143)
a(86)  =     - a(96) + a(136) + a(142)
a(85)  = 290 - a(96) - a(136) - a(142) - a(143) + a(144)
a(84)  =     - a(96) + a(132) + a(144)
a(83)  = 290 - a(96) - a(132) - a(143)
a(82)  =       a(96) + a(132) - a(142)
a(81)  =       a(96) - a(132) + a(142) + a(143) - a(144)
a(80)  =     - a(96) + a(132) + a(140)
a(79)  = 290 - a(96) - a(132) - a(140) - a(143) + a(144)
a(78)  =       a(96) + a(132) + a(140) - a(142) - a(144)
a(77)  =       a(96) - a(132) - a(140) + a(142) + a(143)
a(76)  =     - a(96) + a(132) + a(136)
a(75)  = 290 - a(96) - a(132) - a(136) - a(143) + a(144)
a(74)  =       a(96) + a(132) + a(136) - a(142) - a(144)
a(73)  =       a(96) - a(132) - a(136) + a(142) + a(143)
a(72)  = 145 + a(96) - a(142) - a(144)
a(71)  =-145 + a(96) + a(142) + a(143)
a(70)  = 145 - a(96)
a(69)  = 145 - a(96) - a(143) + a(144)
a(68)  = 145 + a(96) - a(140) - a(142)
a(67)  =-145 + a(96) + a(140) + a(142) + a(143) - a(144)
a(66)  = 145 - a(96) - a(140) + a(144)
a(65)  = 145 - a(96) + a(140) - a(143)
a(64)  = 145 + a(96) - a(136) - a(142)
a(63)  =-145 + a(96) + a(136) + a(142) + a(143) - a(144)
a(62)  = 145 - a(96) - a(136) + a(144)
a(61)  = 145 - a(96) + a(136) - a(143)
a(60)  = 145 - a(96) - a(132) + a(142)
a(59)  = 145 - a(96) + a(132) - a(142) - a(143) + a(144)
a(58)  = 145 + a(96) - a(132) - a(144)
a(57)  =-145 + a(96) + a(132) + a(143)
a(56)  = 145 - a(96) - a(132) - a(140) + a(142) + a(144)
a(55)  = 145 - a(96) + a(132) + a(140) - a(142) - a(143)
a(54)  = 145 + a(96) - a(132) - a(140)
a(53)  =-145 + a(96) + a(132) + a(140) + a(143) - a(144)
a(52)  = 145 - a(96) - a(132) - a(136) + a(142) + a(144)
a(51)  = 145 - a(96) + a(132) + a(136) - a(142) - a(143)
a(50)  = 145 + a(96) - a(132) - a(136)
a(49)  =-145 + a(96) + a(132) + a(136) + a(143) - a(144)
a(47)  =       a(48) + a(143) - a(144)
a(46)  =     - a(48) + a(142) + a(144)
a(45)  = 290 - a(48) - a(142) - a(143)
a(44)  =       a(48) + a(140) - a(144)
a(43)  =       a(48) - a(140) + a(143)
a(42)  =     - a(48) + a(140) + a(142)
a(41)  = 290 - a(48) - a(140) - a(142) - a(143) + a(144)
a(40)  =       a(48) + a(136) - a(144)
a(39)  =       a(48) - a(136) + a(143)
a(38)  =     - a(48) + a(136) + a(142)
a(37)  = 290 - a(48) - a(136) - a(142) - a(143) + a(144)
a(36)  =     - a(48) + a(132) + a(144)
a(35)  = 290 - a(48) - a(132) - a(143)
a(34)  =       a(48) + a(132) - a(142)
a(33)  =       a(48) - a(132) + a(142) + a(143) - a(144)
a(32)  =     - a(48) + a(132) + a(140)
a(31)  = 290 - a(48) - a(132) - a(140) - a(143) + a(144)
a(30)  =       a(48) + a(132) + a(140) - a(142) - a(144)
a(29)  =       a(48) - a(132) - a(140) + a(142) + a(143)
a(28)  =     - a(48) + a(132) + a(136)
a(27)  = 290 - a(48) - a(132) - a(136) - a(143) + a(144)
a(26)  =       a(48) + a(132) + a(136) - a(142) - a(144)
a(25)  =       a(48) - a(132) - a(136) + a(142) + a(143)
a(24)  = 145 + a(48) - a(142) - a(144)
a(23)  =-145 + a(48) + a(142) + a(143)
a(22)  = 145 - a(48)
a(21)  = 145 - a(48) - a(143) + a(144)
a(20)  = 145 + a(48) - a(140) - a(142)
a(19)  =-145 + a(48) + a(140) + a(142) + a(143) - a(144)
a(18)  = 145 - a(48) - a(140) + a(144)
a(17)  = 145 - a(48) + a(140) - a(143)
a(16)  = 145 + a(48) - a(136) - a(142)
a(15)  =-145 + a(48) + a(136) + a(142) + a(143) - a(144)
a(14)  = 145 - a(48) - a(136) + a(144)
a(13)  = 145 - a(48) + a(136) - a(143)
a(12)  = 145 - a(48) - a(132) + a(142)
a(11)  = 145 - a(48) + a(132) - a(142) - a(143) + a(144)
a(10)  = 145 + a(48) - a(132) - a(144)
a( 9)  =-145 + a(48) + a(132) + a(143)
a( 8)  = 145 - a(48) - a(132) - a(140) + a(142) + a(144)
a( 7)  = 145 - a(48) + a(132) + a(140) - a(142) - a(143)
a( 6)  = 145 + a(48) - a(132) - a(140)
a( 5)  =-145 + a(48) + a(132) + a(140) + a(143) - a(144)
a( 4)  = 145 - a(48) - a(132) - a(136) + a(142) + a(144)
a( 3)  = 145 - a(48) + a(132) + a(136) - a(142) - a(143)
a( 2)  = 145 + a(48) - a(132) - a(136)
a( 1)  =-145 + a(48) + a(132) + a(136) + a(143) - a(144)
```

The solutions can be obtained by guessing a(48), a(96), a(132), a(136), a(140), a(142) ... a(144) and filling out these guesses in the abovementioned equations.

For distinct integers also following inequalities should be applied:

0 < a(i) =< 144       for i = 1, 2, ... 47, 49 ... 95, 97 ... 131, 133 ... 135, 137 ... 139 and 141
a(i) ≠ a(j)           for i ≠ j

With the bottom/left corner square constant, an optimized guessing routine (MgcSqr12d), produced 128 Composed Pan Magic Squares within 18,0 seconds, which are shown in Attachment 12.3.