Office Applications and Entertaiment, Magic Squares

Vorige Pagina Volgende Pagina Index About the Author

10.4   Pan Magic Squares, Non Consecutive Integers

10.4.1 Introduction

As mentioned in Section 6.1 Pan Magic Squares of order (4n + 2) - based on consequtive distinct integers - don't exist.

However recently Natalia Makarova published following 10th order Pan Magic Square based on a series non consecutive distinct integers with the related Magic Constant 2250.

1 448 12 441 6 435 14 446 7 440
418 33 407 40 413 46 405 35 412 41
342 107 353 100 347 94 355 105 348 99
201 250 190 257 196 263 188 252 195 258
156 293 167 286 161 280 169 291 162 285
15 436 4 443 10 449 2 438 9 444
404 45 415 38 409 32 417 43 410 37
356 95 345 102 351 108 343 97 350 103
187 262 198 255 192 249 200 260 193 254
170 281 159 288 165 294 157 283 164 289

It should be noted that this Pan Magic Square has also following properties:

1. Each 2 × 2 sub square sums to 900 (2/5 * Magic Constant);
2. All pairs of integers distant 10/2 along each diagonal sum to 450 (1/5 * Magic Constant).

Which makes the square comparable with Most Perfect Pan Magic Squares as defined in Section 2.6.

10.4.2 Analysis (Most Perfect Pan Magic)

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

All rows and columns sum to the Magic Constant:

a( 1)+a( 2)+a( 3)+a( 4)+a( 5)+a( 6)+a( 7)+a( 8)+a( 9)+a( 10) = s1
a(11)+a(12)+a(13)+a(14)+a(15)+a(16)+a(17)+a(18)+a(19)+a( 20) = s1
a(21)+a(22)+a(23)+a(24)+a(25)+a(26)+a(27)+a(28)+a(29)+a( 30) = s1
a(31)+a(32)+a(33)+a(34)+a(35)+a(36)+a(37)+a(38)+a(39)+a( 40) = s1
a(41)+a(42)+a(43)+a(44)+a(45)+a(46)+a(47)+a(48)+a(49)+a( 50) = s1
a(51)+a(52)+a(53)+a(54)+a(55)+a(56)+a(57)+a(58)+a(59)+a( 60) = s1
a(61)+a(62)+a(63)+a(64)+a(65)+a(66)+a(67)+a(68)+a(69)+a( 70) = s1
a(71)+a(72)+a(73)+a(74)+a(75)+a(76)+a(77)+a(78)+a(79)+a( 80) = s1
a(81)+a(82)+a(83)+a(84)+a(85)+a(86)+a(87)+a(88)+a(89)+a( 90) = s1
a(91)+a(92)+a(93)+a(94)+a(95)+a(96)+a(97)+a(98)+a(99)+a(100) = s1

a( 1)+a(11)+a(21)+a(31)+a(41)+a(51)+a(61)+a(71)+a(81)+a( 91) = s1
a( 2)+a(12)+a(22)+a(32)+a(42)+a(52)+a(62)+a(72)+a(82)+a( 92) = s1
a( 3)+a(13)+a(23)+a(33)+a(43)+a(53)+a(63)+a(73)+a(83)+a( 93) = s1
a( 4)+a(14)+a(24)+a(34)+a(44)+a(54)+a(64)+a(74)+a(84)+a( 94) = s1
a( 5)+a(15)+a(25)+a(35)+a(45)+a(55)+a(65)+a(75)+a(85)+a( 95) = s1
a( 6)+a(16)+a(26)+a(36)+a(46)+a(56)+a(66)+a(76)+a(86)+a( 96) = s1
a( 7)+a(17)+a(27)+a(37)+a(47)+a(57)+a(67)+a(77)+a(87)+a( 97) = s1
a( 8)+a(18)+a(28)+a(38)+a(48)+a(58)+a(68)+a(78)+a(88)+a( 98) = s1
a( 9)+a(19)+a(29)+a(39)+a(49)+a(59)+a(69)+a(79)+a(89)+a( 99) = s1
a(10)+a(20)+a(30)+a(40)+a(50)+a(60)+a(70)+a(80)+a(90)+a(100) = s1

Each 2 × 2 sub square sums to 2/5 * Magic Constant:

a(i) + a(i+1) + a(i+10) + a(i+11) = 2 * s1/5 with 1 =< i < 90 and i ≠ 10 * n for n = 1, 2 ... 9

a(i) + a(i+1) + a(i+10) + a(i- 9) = 2 * s1/5 with i = 10 * n for n = 1, 2 ... 9

a(i) + a(i+1) + a(i+90) + a(i+91) = 2 * s1/5 with i = 1, 2 ... 9

a(1) + a(10)  + a(91)   + a(100)  = 2 * s1/5

Consequently all (Pan) Diagonals will sum to the Magic Constant.

In addition to this, all pairs of integers distant 10/2 along each diagonal sum to 1/5 * Magic Constant:

a(50) + a(95) = s1/5
a(49) + a(94) = s1/5
a(48) + a(93) = s1/5
a(47) + a(92) = s1/5
a(46) + a(91) = s1/5
a(45) + a(100) = s1/5
a(44) + a(99) = s1/5
a(43) + a(98) = s1/5
a(42) + a(97) = s1/5
a(41) + a(96) = s1/5

a(40) + a(85) = s1/5
a(39) + a(84) = s1/5
a(38) + a(83) = s1/5
a(37) + a(82) = s1/5
a(36) + a(81) = s1/5
a(35) + a(90) = s1/5
a(34) + a(89) = s1/5
a(33) + a(88) = s1/5
a(32) + a(87) = s1/5
a(31) + a(86) = s1/5

a(30) + a(75) = s1/5
a(29) + a(74) = s1/5
a(28) + a(73) = s1/5
a(27) + a(72) = s1/5
a(26) + a(71) = s1/5
a(25) + a(80) = s1/5
a(24) + a(79) = s1/5
a(23) + a(78) = s1/5
a(22) + a(77) = s1/5
a(21) + a(76) = s1/5

a(20) + a(65) = s1/5
a(19) + a(64) = s1/5
a(18) + a(63) = s1/5
a(17) + a(62) = s1/5
a(16) + a(61) = s1/5
a(15) + a(70) = s1/5
a(14) + a(69) = s1/5
a(13) + a(68) = s1/5
a(12) + a(67) = s1/5
a(11) + a(66) = s1/5

a(10) + a(55) = s1/5
a( 9) + a(54) = s1/5
a( 8) + a(53) = s1/5
a( 7) + a(52) = s1/5
a( 6) + a(51) = s1/5
a( 5) + a(60) = s1/5
a( 4) + a(59) = s1/5
a( 3) + a(58) = s1/5
a( 2) + a(57) = s1/5
a( 1) + a(56) = s1/5

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

           
   AB * a = s

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

a(95) =       s1 - 2 * a(96) - 2 * a(97) - 2 * a(98) - 2 * a(99) - a(100)
a(94) =     - s1 + 2 * a(96) + 2 * a(97) + 2 * a(98) + 3 * a(99) + 2 * a(100)
a(93) =       s1 - 2 * a(96) - 2 * a(97) - a(98) - 2 * a(99) - 2 * a(100)
a(92) =     - s1 + 2 * a(96) + 3 * a(97) + 2 * a(98) + 2 * a(99) + 2 * a(100)
a(91) =       s1 - a(96) - 2 * a(97) - 2 * a(98) - 2 * a(99) - 2 * a(100)
a(89) = 0.4 * s1 - a(90) - a(99) - a(100)
a(88) =            a(90) - a(98) + a(100)
a(87) = 0.4 * s1 - a(90) - a(97) - a(100)
a(86) =            a(90) - a(96) + a(100)
a(85) =-0.6 * s1 - a(90) + 2 * a(96) + 2 * a(97) + 2 * a(98) + 2 * a(99)
a(84) =       s1 + a(90) - 2 * a(96) - 2 * a(97) - 2 * a(98) - 3 * a(99) - a(100)
a(83) =-0.6 * s1 - a(90) + 2 * a(96) + 2 * a(97) + a(98) + 2 * a(99) + a(100)
a(82) =       s1 + a(90) - 2 * a(96) - 3 * a(97) - 2 * a(98) - 2 * a(99) - a(100)
a(81) =-0.6 * s1 - a(90) + a(96) + 2 * a(97) + 2 * a(98) + 2 * a(99) + a(100)
a(79) =          - a(80) + a(99) + a(100)
a(78) =            a(80) + a(98) - a(100)
a(77) =          - a(80) + a(97) + a(100)
a(76) =            a(80) + a(96) - a(100)
a(75) =       s1 - a(80) - 2 * a(96) - 2 * a(97) - 2 * a(98) - 2 * a(99)
a(74) =     - s1 + a(80) + 2 * a(96) + 2 * a(97) + 2 * a(98) + 3 * a(99) + a(100)
a(73) =       s1 - a(80) - 2 * a(96) - 2 * a(97) - a(98) - 2 * a(99) - a(100)
a(72) =     - s1 + a(80) + 2 * a(96) + 3 * a(97) + 2 * a(98) + 2 * a(99) + a(100)
a(71) =       s1 - a(80) - a(96) - 2 * a(97) - 2 * a(98) - 2 * a(99) - a(100)
a(69) = 0.4 * s1 - a(70) - a(99) - a(100)
a(68) =            a(70) - a(98) + a(100)
a(67) = 0.4 * s1 - a(70) - a(97) - a(100)
a(66) =            a(70) - a(96) + a(100)
a(65) =-0.6 * s1 - a(70) + 2 * a(96) + 2 * a(97) + 2 * a(98) + 2 * a(99)
a(64) =       s1 + a(70) - 2 * a(96) - 2 * a(97) - 2 * a(98) - 3 * a(99) - a(100)
a(63) =-0.6 * s1 - a(70) + 2 * a(96) + 2 * a(97) + a(98) + 2 * a(99) + a(100)
a(62) =       s1 + a(70) - 2 * a(96) - 3 * a(97) - 2 * a(98) - 2 * a(99) - a(100)
a(61) =-0.6 * s1 - a(70) + a(96) + 2 * a(97) + 2 * a(98) + 2 * a(99) + a(100)
a(60) = 0.9 * s1 - a(70) - a(80) - a(90) - a(96) - a(97) - a(98) - a(99) - a(100)
a(59) =-0.9 * s1 + a(70) + a(80) + a(90) + a(96) + a(97) + a(98) + 2 * a(99) + 2 * a(100)
a(58) = 0.9 * s1 - a(70) - a(80) - a(90) - a(96) - a(97) - a(99) - 2 * a(100)
a(57) =-0.9 * s1 + a(70) + a(80) + a(90) + a(96) + 2 * a(97) + a(98) + a(99) + 2 * a(100)
a(56) = 0.9 * s1 - a(70) - a(80) - a(90) - a(97) - a(98) - a(99) - 2 * a(100)
a(55) = 0.1 * s1 + a(70) + a(80) + a(90) - a(96) - a(97) - a(98) - a(99) + a(100)
a(54) =-0.1 * s1 - a(70) - a(80) - a(90) + a(96) + a(97) + a(98) + 2 * a(99)
a(53) = 0.1 * s1 + a(70) + a(80) + a(90) - a(96) - a(97) - a(99)
a(52) =-0.1 * s1 - a(70) - a(80) - a(90) + a(96) + 2 * a(97) + a(98) + a(99)
a(51) = 0.1 * s1 + a(70) + a(80) + a(90) - a(97) - a(98) - a(99)

a(50) = s1/5 - a(95)
a(49) = s1/5 - a(94)
a(48) = s1/5 - a(93)
a(47) = s1/5 - a(92)
a(46) = s1/5 - a(91)
a(45) = s1/5 - a(100)
a(44) = s1/5 - a(99)
a(43) = s1/5 - a(98)
a(42) = s1/5 - a(97)
a(41) = s1/5 - a(96)

a(40) = s1/5 - a(85)
a(39) = s1/5 - a(84)
a(38) = s1/5 - a(83)
a(37) = s1/5 - a(82)
a(36) = s1/5 - a(81)
a(35) = s1/5 - a(90)
a(34) = s1/5 - a(89)
a(33) = s1/5 - a(88)
a(32) = s1/5 - a(87)
a(31) = s1/5 - a(86)

a(30) = s1/5 - a(75)
a(29) = s1/5 - a(74)
a(28) = s1/5 - a(73)
a(27) = s1/5 - a(72)
a(26) = s1/5 - a(71)
a(25) = s1/5 - a(80)
a(24) = s1/5 - a(79)
a(23) = s1/5 - a(78)
a(22) = s1/5 - a(77)
a(21) = s1/5 - a(76)

a(20) = s1/5 - a(65)
a(19) = s1/5 - a(64)
a(18) = s1/5 - a(63)
a(17) = s1/5 - a(62)
a(16) = s1/5 - a(61)
a(15) = s1/5 - a(70)
a(14) = s1/5 - a(69)
a(13) = s1/5 - a(68)
a(12) = s1/5 - a(67)
a(11) = s1/5 - a(66)

a(10) = s1/5 - a(55)
a( 9) = s1/5 - a(54)
a( 8) = s1/5 - a(53)
a( 7) = s1/5 - a(52)
a( 6) = s1/5 - a(51)
a( 5) = s1/5 - a(60)
a( 4) = s1/5 - a(59)
a( 3) = s1/5 - a(58)
a( 2) = s1/5 - a(57)
a( 1) = s1/5 - a(56)

The solutions can be obtained by guessing a(100), a(99), a(98), a(97), a(96), a(90), a(80) and a(70) and filling out these guesses in the abovementioned equations.

A routine can be written to generate Most Perfect Pan Magic Squares of order 10 (ref. MgcSqr10d).

Subject routine applied on the defined variable range {ai} and related MC = 2250, counted 115200 (= 100 * 1152) Most Perfect Pan Magic Squares.

Attachment 10.3.2 shows 1152 of the possible Most Perfect Pan Magic Squares of order 10 for MC = 2250 and a(100) = 1.

10.4.3 Analysis (Associated, Compact, Pan Magic)

For Associated Compact Pan Magic Squares, only the equations defining the pairs of integers distant 10/2 along each diagonal have to be replaced by the equations ensuring the Center Symmetry.

This will, after deduction, result in following linear equations:

a(95) =        s1 - a(96) - 2 * a(97) - 2 * a(98) - 2 * a(99) - 2 * a(100)
a(94) =      - s1 + 2 * a(96) + 3 * a(97) + 2 * a(98) + 2 * a(99) + 2 * a(100)
a(93) =        s1 - 2 * a(96) - 2 * a(97) - a(98) - 2 * a(99) - 2 * a(100)
a(92) =      - s1 + 2 * a(96) + 2 * a(97) + 2 * a(98) + 3 * a(99) + 2 * a(100)
a(91) =        s1 - 2 * a(96) - 2 * a(97) - 2 * a(98) - 2 * a(99) - a(100)
a(89) =  0.4 * s1 - a(90) - a(99) - a(100)
a(88) =             a(90) - a(98) + a(100)
a(87) =  0.4 * s1 - a(90) - a(97) - a(100)
a(86) =             a(90) - a(96) + a(100)
a(85) = -0.6 * s1 - a(90) + a(96) + 2 * a(97) + 2 * a(98) + 2 * a(99) + a(100)
a(84) =        s1 + a(90) - 2 * a(96) - 3 * a(97) - 2 * a(98) - 2 * a(99) - a(100)
a(83) = -0.6 * s1 - a(90) + 2 * a(96) + 2 * a(97) + a(98) + 2 * a(99) + a(100)
a(82) =        s1 + a(90) - 2 * a(96) - 2 * a(97) - 2 * a(98) - 3 * a(99) - a(100)
a(81) = -0.6 * s1 - a(90) + 2 * a(96) + 2 * a(97) + 2 * a(98) + 2 * a(99)
a(79) =           - a(80) + a(99) + a(100)
a(78) =             a(80) + a(98) - a(100)
a(77) =           - a(80) + a(97) + a(100)
a(76) =             a(80) + a(96) - a(100)
a(75) =        s1 - a(80) - a(96) - 2 * a(97) - 2 * a(98) - 2 * a(99) - a(100)
a(74) =      - s1 + a(80) + 2 * a(96) + 3 * a(97) + 2 * a(98) + 2 * a(99) + a(100)
a(73) =        s1 - a(80) - 2 * a(96) - 2 * a(97) - a(98) - 2 * a(99) - a(100)
a(72) =      - s1 + a(80) + 2 * a(96) + 2 * a(97) + 2 * a(98) + 3 * a(99) + a(100)
a(71) =        s1 - a(80) - 2 * a(96) - 2 * a(97) - 2 * a(98) - 2 * a(99)
a(69) =  0.4 * s1 - a(70) - a(99) - a(100)
a(68) =             a(70) - a(98) + a(100)
a(67) =  0.4 * s1 - a(70) - a(97) - a(100)
a(66) =             a(70) - a(96) + a(100)
a(65) = -0.6 * s1 - a(70) + a(96) + 2 * a(97) + 2 * a(98) + 2 * a(99) + a(100)
a(64) =        s1 + a(70) - 2 * a(96) - 3 * a(97) - 2 * a(98) - 2 * a(99) - a(100)
a(63) = -0.6 * s1 - a(70) + 2 * a(96) + 2 * a(97) + a(98) + 2 * a(99) + a(100)
a(62) =        s1 + a(70) - 2 * a(96) - 2 * a(97) - 2 * a(98) - 3 * a(99) - a(100)
a(61) = -0.6 * s1 - a(70) + 2 * a(96) + 2 * a(97) + 2 * a(98) + 2 * a(99)
a(60) =  0.9 * s1 - a(70) - a(80) - a(90) - a(96) - a(97) - a(98) - a(99) - a(100)
a(59) = -0.9 * s1 + a(70) + a(80) + a(90) + a(96) + a(97) + a(98) + 2 * a(99) + 2 * a(100)
a(58) =  0.9 * s1 - a(70) - a(80) - a(90) - a(96) - a(97) - a(99) - 2 * a(100)
a(57) = -0.9 * s1 + a(70) + a(80) + a(90) + a(96) + 2 * a(97) + a(98) + a(99) + 2 * a(100)
a(56) =  0.9 * s1 - a(70) - a(80) - a(90) - a(97) - a(98) - a(99) - 2 * a(100)
a(55) =  0.1 * s1 + a(70) + a(80) + a(90) - a(97) - a(98) - a(99)
a(54) = -0.1 * s1 - a(70) - a(80) - a(90) + a(96) + 2 * a(97) + a(98) + a(99)
a(53) =  0.1 * s1 + a(70) + a(80) + a(90) - a(96) - a(97) - a(99)
a(52) = -0.1 * s1 - a(70) - a(80) - a(90) + a(96) + a(97) + a(98) + 2 * a(99)
a(51) =  0.1 * s1 + a(70) + a(80) + a(90) - a(96) - a(97) - a(98) - a(99) + a(100)

a(50) = S1/5 - a(51)
a(49) = S1/5 - a(52)
a(48) = S1/5 - a(53)
a(47) = S1/5 - a(54)
a(46) = S1/5 - a(55)
a(45) = S1/5 - a(56)
a(44) = S1/5 - a(57)
a(43) = S1/5 - a(58)
a(42) = S1/5 - a(59)
a(41) = S1/5 - a(60)

a(40) = S1/5 - a(61)
a(39) = S1/5 - a(62)
a(38) = S1/5 - a(63)
a(37) = S1/5 - a(64)
a(36) = S1/5 - a(65)
a(35) = S1/5 - a(66)
a(34) = S1/5 - a(67)
a(33) = S1/5 - a(68)
a(32) = S1/5 - a(69)
a(31) = S1/5 - a(70)

a(30) = S1/5 - a(71)
a(29) = S1/5 - a(72)
a(28) = S1/5 - a(73)
a(27) = S1/5 - a(74)
a(26) = S1/5 - a(75)
a(25) = S1/5 - a(76)
a(24) = S1/5 - a(77)
a(23) = S1/5 - a(78)
a(22) = S1/5 - a(79)
a(21) = S1/5 - a(80)

a(20) = S1/5 - a(81)
a(19) = S1/5 - a(82)
a(18) = S1/5 - a(83)
a(17) = S1/5 - a(84)
a(16) = S1/5 - a(85)
a(15) = S1/5 - a(86)
a(14) = S1/5 - a(87)
a(13) = S1/5 - a(88)
a(12) = S1/5 - a(89)
a(11) = S1/5 - a(90)

a(10) = S1/5 - a( 91)
a( 9) = S1/5 - a( 92)
a( 8) = S1/5 - a( 93)
a( 7) = S1/5 - a( 94)
a( 6) = S1/5 - a( 95)
a( 5) = S1/5 - a( 96)
a( 4) = S1/5 - a( 97)
a( 3) = S1/5 - a( 98)
a( 2) = S1/5 - a( 99)
a( 1) = S1/5 - a(100)

The solutions can be obtained by guessing a(100), a(99), a(98), a(97), a(96), a(90), a(80) and a(70) and filling out these guesses in the abovementioned equations.

A routine can be written to generate Assiciated Compact Pan Magic Squares of order 10 (ref. MgcSqr10e).

Subject routine applied for MC = 3510 and related variable range {ai}, counted 115200 (= 100 * 1152) Associated Compact Pan Magic Squares.

Attachment 10.3.3 shows 1152 of the possible Associated Compact Pan Magic Squares of order 10 for MC = 3510 and a(100) = 1.

10.4.4 Spreadsheet Solution

The linear equations deducted in Section 10.4.2 and 10.4.3 above, have been applied in following Excel Spread Sheets:

The red figures have to be “guessed” to construct a Pan Magic Square of the 10th order (wrong solutions are obvious).


Vorige Pagina Volgende Pagina Index About the Author