Office Applications and Entertainment, Magic Squares | ||
Index | About the Author |
14.0 Special Magic Squares, Prime Numbers
Comparable routines as discussed in previous sections can be written to generate Prime Number Magic Squares of order 7,
however such routines are not very feasible due to the high number of independent variables,
e.g. 24 ea for Pan Magic Squares and 12 ea for Ultra Magic Squares.
14.5.1 Concentric Magic Squares (7 x 7)
A 7th order Prime Number Concentric Magic Square consists of a Prime Number Concentric Magic Square of the 5th order, as discussed in Section 14.3.2, with a border around it.
Based on the equations defining the border of a Concentric Magic Square (7 x 7): a(43) = s1 - a(44) - a(45) - a(46) - a(47) - a(48) - a(49) a(36) = 2 * s1/7 - a(42) a(29) = 2 * s1/7 - a(35) a(22) = 2 * s1/7 - a(28) a(15) = 2 * s1/7 - a(21) a(14) = -3 * s1/7 + a(15) + a(22) + a(29) + a(36) + a(43) - a(49) a( 8) = 2 * s1/7 - a(14) a( 7) = 2 * s1/7 - a(43) a( 6) = 2 * s1/7 - a(48) a( 5) = 2 * s1/7 - a(47) a( 4) = 2 * s1/7 - a(46) a( 3) = 2 * s1/7 - a(45) a( 2) = 2 * s1/7 - a(44) a( 1) = 2 * s1/7 - a(49)
a routine can be written to generate Prime Number Concentric Magic Squares of order 7
(ref. Priem7a1).
Each square shown corresponds with numerous squares for the same Magic Sum, depending from the selected variable values {ai} and the related number of possible Embedded Magic Squares.
Note:
This results in following alternative border equations:
which enable the development of a much faster routine to generate Prime Number Concentric Magic Squares of order 7 (ref. Priem7a2).
14.5.2 Bordered Magic Squares (7 x 7) Based on the collections of 5th order Ultra Magic and Inlaid Magic Squares, as deducted in Section 14.3.5 thru 14.3.9, also following Bordered Magic Squares can be generated with routine Priem7a1:
Each square shown corresponds with numerous squares for the same Magic Sum, depending from the selected variable values {ai} and the related number of possible Center Squares.
14.5.3 Eccentric Magic Squares (7 x 7)
Based on the equations defining the supplementary rows and columns of an Eccentric Magic Square (7 x 7):
a(43) = 2 * s1/7 - a(44)
a(36) = 2 * s1/7 - a(37)
a(29) = 2 * s1/7 - a(30)
a(22) = 2 * s1/7 - a(23)
a(15) = 2 * s1/7 - a(16)
a(13) = 5 * s1/7 + a(14) - a(19) - a(25) - a(31) - a(37) - a(43)
a( 8) = -5 * s1/7 + a( 9) + a(16) + a(23) + a(30) + a(37) + a(44)
a( 9) = 6 * s1/7 - 0.5 * (a(10) + a(11) + a(12) + a(13) + a(14) + a(16) + a(23) + a(30) + a(37) + a(44))
a( 7) = 2 * s1/7 - a(14)
a( 6) = 2 * s1/7 - a(13)
a( 5) = 2 * s1/7 - a(12)
a( 4) = 2 * s1/7 - a(11)
a( 3) = 2 * s1/7 - a(10)
a( 2) = 2 * s1/7 - a( 8)
a( 1) = 2 * s1/7 - a( 9)
a routine can be written to generate Prime Number Eccentric Magic Squares of order 7
(ref. Priem7b).
Note:
These principles have been applied successfully in Section 14.8.5, Composed Magic Squares of order 13, for the completion of one of the Embedded Eccentric Magic Squares of order 7 (ref. PriemI7).
14.5.4 Eccentric Magic Squares, Overlapping Sub Squares
Prime Number Eccentric Magic Squares of order 7 with a Magic Sum s1 might contain:
as shown below.
A dedicated procedure (Priem7e) can be used:
Attachment 14.6.10 shows for miscellaneous Magic Sums the first occurring order 7 Prime Number Eccentric Magic Square with Overlapping Sub Squares.
14.5.5 Associated Magic Squares, Overlapping Sub Squares
Prime Number Magic Squares of order 7 with a Magic Sum s1 can also be composed out of:
as shown below.
Associated Magic Squares of order 7 can be constructed based on:
A (Semi) Magic Anti Symmetric Square of order n is a (Semi) Magic Square for which ai + aj ≠ 2 * sn / n for any i and j (i,j = 1 ... n2; i ≠ j).
Attachment 14.6.9b shows for miscellaneous Magic Sums the first occurring order 7 Prime Number Associated Magic Square with Overlapping Sub Squares.
14.5.6 Associated Magic Squares, Diamond Inlays Order 3 and 4
Based on the equations defining Associated Magic Squares (Diamond Inlays) of the seventh order: a(46) = 4 * s1/7 - a(40) - a(34) - a(28) a(45) = s1/7 + a(47) - 2 * a(27) + a(26) - a(20) + a(46) + a(40) - a(28) a(43) = s1 - a(44) - a(45) - a(47) - a(48) - a(49) - a(46) a(39) = 3 * s1/7 - a(33) - a(27) a(38) = a(20) - a(46) + a(28) a(37) = - 3 * s1/7 + a(41) - a(44) + a(48) + a(27) + a(20) + a(34) a(36) = s1 - 2 * a(41) - a(42) + a(44) - a(48) + a(33) - 2 * a(20) + a(46) - a(40) - a(34) - a(28) a(35) = (17 * s1/7 - 2 * a(41) - 2*a(42) - 2*a(47) - 2 * a(48) - 2 * a(49) - a(33) + 2 * a(20) - 2 * a(46) + - 2 * a(40) - 2 * a(34)) / 2 a(32) = 4 * s1/7 - a(26) - 2 * a(20) + a(46) - a(28) a(29) = 3 * s1/7 - a(35) - 2 * a(33) - 2 * a(27) + a(26) + 3 * a(20) - a(46) - a(34) + a(28) a(26) = 4 * s1/7 - a(20) - a(34) - a(28) a(25) = s1/7 a(19) = 4 * s1/7 - a(33) - 2 * a(27)
a routine can be written to generate subject Associated Magic Squares of order 7 (ref. Priem7e1).
14.5.7 Associated Magic Squares, Square Inlays Order 3 and 4
Based on the equations defining Associated Magic Squares (Square Inlays) of the seventh order: a(44) = s1 - a(46) - a(48) - a(43) - a(45) - a(47) - a(49) a(43) = 4 * s1/7 - a(45) - a(47) - a(49) a(37) = 3 * s1/7 - a(39) - a(41) a(36) = 4 * s1/7 - a(38) - a(40) - a(42) a(33) = 2 * s1/7 - a(35) + 0.5 * a(43) + 0.5 * a(45) - 0.5 * a(47) - 0.5 * a(49) a(32) = 6 * s1/7 - 2 * a(34) - a(46) - 2 * a(48) a(31) = a(33) - a(45) + a(47) a(30) = 3 * s1/7 - a(32) - a(34) a(29) = 4 * s1/7 - 2 * a(33) - a(35) + a(45) - a(47) a(28) = 5 * s1/7 - a(38) - a(40) - 2 * a(42) a(27) = 4 * s1/7 - a(39) - 2 * a(41) a(26) = s1/7 + a(38) - a(40) a(25) = s1/7
a routine can be written to generate subject Associated Magic Squares of order 7 (ref. Priem7e2).
|
MC7 = 10409
2963 17 1481 2927 1097 311 1613 5 1487 2969 173 701 2273 2801 1493 2957 11 1361 2663 1877 47 1451 317 2693 911 887 1373 2777 2213 1277 971 1997 2153 1667 131 2003 1697 761 2843 1307 821 977 281 2657 1523 197 1601 2087 2063 = > MC7 = 10409
911 1451 887 317 1373 2693 2777 2927 2963 1097 17 311 1481 1613 1997 2213 2153 1277 1667 971 131 173 5 701 1487 2273 2969 2801 2843 2003 1307 1697 821 761 977 1361 1493 2663 2957 1877 11 47 197 281 1601 2657 2087 1523 2063
The Magic Square shown at the left side above is composed out of:
Based on this definition a routine can be developed to generate subject Composed Magic Squares (ref. Priem7e3).
14.5.8 Ultra Magic Squares (7 x 7)
Based on the equations defining an Associated Pan Magic Square (Ultra Magic) of the seventh order: a(43) = s1 - a(44) - a(45) - a(46) - a(47) - a(48) - a(49) a(36) = s1 - a(37) - a(38) - a(39) - a(40) - a(41) - a(42) a(35) = 6 * s1/7 - a(41) - a(42) - a(47) - a(48) - a(49) a(34) = a(35) + a(37) - a(40) + a(44) + a(45) - a(46) - a(48) a(33) = 6 * s1/7 + a(38) - a(39) - a(40) - a(41) + a(44) - 2 * a(47) - a(48) - a(49) a(32) = 6 * s1/7 - a(38) - a(40) - a(44) - a(46) - a(48) a(31) = 12 * s1/7 - a(33) - a(37) - 2 * a(39) - a(41) - a(43) - 2 * a(45) - 2 * a(47) - a(49) a(30) = - 8 * s1/7 + a(39) + a(40) + 2 * a(41) + a(42) - a(44) + 2 * a(47) + 2 * a(48) + a(49) a(29) = - 8 * s1/7 + a(38) + a(39) + a(40) + a(41) + a(42) + a(46) + a(47) + a(48) + a(49) a(28) = s1/7 - a(37) + a(41) - a(44) - a(45) + a(47) + a(48) a(27) = -13 * s1/7 + a(39) + 2*a(40) + 2*a(41) + 2*a(42) - a(44) - a(45) + a(46) + 3*a(47) + 3*a(48) + 2*a(49) a(26) = a(27) + a(36) - a(42) + a(45) - a(47) a(25) = s1/7
a routine can be written to generate Ultra Magic Squares of order 7 (ref. Priem7c).
14.5.9 Ultra Magic Squares, Order 3 Concentric Square and Square Inlay (a)
Based on the equations defining seventh order Ultra Magic Squares with Order 3 Concentric Square and Square Inlay (a): a(45) = ( s1 - 2 * a(48) - a(32) - 2 * a(33)) / 2 a(44) = 4 * s1/7 - a(45) - a(47) - a(48) a(43) = 3 * s1/7 - a(46) - a(49) a(40) = (9 * s1/7 - 2 * a(48) - 2 * a(32) - 2 * a(33) - a(46)) / 2 a(39) = 3 * s1/7 - a(41) - 2 * a(47) + a(32) + a(33) - a(49) a(38) = - s1 + a(40) + a(45) + a(47) + 2 * a(48) + a(32) + 2 * a(33) a(37) = - s1 + a(41) + 2 * a(47) + 2 * a(48) + a(46) + 2 * a(49) a(36) = 9 * s1/7 - a(41) - a(42) - a(45) - a(47) - 2 * a(48) - a(33) - a(49) a(35) = 6 * s1/7 - a(41) - a(42) - a(47) - a(48) - a(49) a(34) = 3 * s1/7 - a(40) - a(42) - a(48) + a(49) a(31) = 3 * s1/7 - a(32) - a(33) a(30) = -9 * s1/7 + a(40) + a(41) + a(42) + a(45) + a(47) + 3 * a(48) + a(32) + a(33) a(29) = -3 * s1/7 + a(42) + a(45) + a(48) + a(33) a(28) = 4 * s1/7 - a(46) - 2 * a(49) a(27) = -5 * s1/7 + a(41) + 2 * a(42) + 2 * a(47) + 2 * a(48) - a(32) - a(33) + a(49) a(26) = 4 * s1/7 - a(32) - 2 * a(33) a(25) = s1/7
a routine can be written to generate subject Ultra Magic Squares of order 7 (ref. Priem7f1).
14.5.10 Ultra Magic Squares, Order 3 Concentric Square and Square Inlay (b)
Based on the equations defining seventh order Ultra Magic Squares with Order 3 Concentric Square and Square Inlay (b): a(46) = s1 - 2 * a(48) - a(49) - a(32) - a(33) - a(41) a(44) = -6 * s1/7 + a(45) + a(47) + a(48) + a(49) + a(33) + a(39) + a(41) a(43) = 6 * s1/7 - 2 * a(45) - 2 * a(47) - a(49) + a(32) - a(39) a(42) = (- s1/7 + 2 * a(45) + a(32) + 2 * a(33) - 2 * a(41))/2 a(40) = ( 5 * s1/7 - 2 * a(47) - a(39))/2 a(38) = a(40) - a(45) + a(47) a(37) = 3 * s1/7 - a(39) - a(41) a(36) = - s1/7 - a(42) + a(45) + a(47) + a(39) a(35) = 6 * s1/7 - a(42) - a(47) - a(48) - a(49) - a(41) a(34) = 3 * s1/7 - a(35) - a(40) - a(47) + a(41) a(31) = 3 * s1/7 - a(32) - a(33) a(30) = -3 * s1/7 - a(36) + a(38) + a(45) + a(47) + a(48) - a(33) + a(39) + a(41) a(29) = 4 * s1/7 - a(30) - a(34) - a(35) a(28) = 4 * s1/7 - 2 * a(45) - a(49) - a(33) + a(41) a(27) = 4 * s1/7 - a(39) - 2 * a(41) a(26) = 4 * s1/7 - a(32) - 2 * a(33) a(25) = s1/7
a routine can be written to generate subject Ultra Magic Squares of order 7 (ref. Priem7f2).
14.5.11 Ultra Magic Squares, Order 3 Square Inlays
Based on the equations defining seventh order Ultra Magic Squares with Order 3 Square Inlays: a(47) = (10 * s1/7 - 2 * a(48) - a(39) - 2 * a(41) - a(46) - 2 * a(49))/2 a(44) = 4 * s1/7 - a(45) - a(47) - a(48) a(43) = 3 * s1/7 - a(46) - a(49) a(40) = ( s1/7 - 2 * a(42) + a(46) + 2 * a(49))/2 a(37) = 3 * s1/7 - a(39) - a(41) a(36) = 4 * s1/7 - a(38) - a(40) - a(42) a(35) = 6 * s1/7 - a(42) - a(47) - a(48) - a(41) - a(49) a(34) = 3 * s1/7 - a(40) - a(42) - a(48) + a(49) a(33) = a(38) - a(40) - a(45) - a(47) + a(41) + a(46) + a(49) a(32) = s1/7 - a(38) + a(40) + 2 * a(42) + a(45) + a(47) - 2 * a(46) - 2 * a(49) a(31) = - 4 * s1/7 - a(38) + a(40) - a(45) + a(47) + 2 * a(48) + a(41) + a(46) + a(49) a(30) = - 2 * s1/7 + a(40) + a(42) + a(45) + a(47) + a(48) - a(46) - a(49) a(29) = 3 * s1/7 + a(38) - a(40) - a(42) - a(47) - a(48) - a(41) + a(46) + a(49) a(28) = 4 * s1/7 - a(46) - 2 * a(49) a(27) = 4 * s1/7 - a(39) - 2 * a(41) a(26) = 8 * s1/7 - a(38) - a(40) - 2 * a(42) + a(45) - a(47) - a(39) - 2 * a(41) a(25) = s1/7
a routine can be written to generate subject Ultra Magic Squares of order 7 (ref. Priem7e5).
14.5.12 Ultra Magic Squares, Order 3 Square and Diamond Inlay (a)
Based on the equations defining seventh order Ultra Magic Squares with Order 3 Square and Diamond Inlay: a(44) = 4 * s1/7 - a(45) - a(47) - a(48) a(43) = 3 * s1/7 - a(46) - a(49) a(41) = 6 * s1/7 - a(45) - 2 * a(47) - a(48) - a(49) a(40) = 4 * s1/7 - a(42) + a(45) - a(48) - a(39) - (a(33) + a(46))/2 a(37) = - s1/7 - a(45) + a(48) + a(46) + a(49) a(38) = - a(42) + a(45) + a(47) + (a(33) - a(46))/2 a(36) = - 2 * s1/7 + a(42) + a(47) + a(48) a(35) = - a(42) + a(45) + a(47) a(34) = - s1/7 - a(45) + a(39) + a(49) + (a(33) + a(46))/2 a(32) = - 2 * s1/7 + 2 * a(42) - a(45) + a(48) + a(39) a(31) = 4 * s1/7 - a(33) - 2 * a(39) a(30) = 4 * s1/7 - a(47) - a(49) - (a(33) + a(46))/2 a(29) = 2 * s1/7 - a(42) + a(45) - a(48) a(28) = 4 * s1/7 - a(46) - 2 * a(49) a(27) = 3 * s1/7 - a(33) - a(39) a(26) = s1/7 + a(45) + a(48) - a(33) - a(39) a(25) = s1/7
a routine can be written to generate subject Ultra Magic Squares of order 7 (ref. Priem7g1).
14.5.13 Ultra Magic Squares, Order 3 Square and Diamond Inlay (b)
Based on the equations defining seventh order Ultra Magic Squares with Order 3 Square and Diamond Inlay: a(44) = 2 * s1/7 + a(45) - a(46) + a(47) - a(48) - a(39) a(43) = 5 * s1/7 - 2 * a(45) - 2 * a(47) - a(49) + a(39) a(40) = (19 * s1/7 - 2 * a(42) + 2 * a(45) - 2 * a(46) - 2*a(47) - 4*a(48) - 2*a(49) - 3*a(39) - 4*a(41))/2 a(38) = ( s1/7 - 2 * a(42) + a(39) + 2 * a(41))/2 a(37) = 3 * s1/7 - a(39) - a(41) a(36) = - 6 * s1/7 + a(42) - a(45) + a(46) + a(47) + 2 * a(48) + a(49) + a(39) + a(41) a(35) = 6 * s1/7 - a(42) - a(47) - a(48) - a(49) - a(41) a(34) = 2 * s1/7 - a(38) - a(42) + a(45) - a(46) + a(47) - a(48) + a(41) a(33) = - s1/7 + 2 * a(41) a(32) = - 6 * s1/7 + 2 * a(42) - 2 * a(45) + a(46) + 2 * a(48) + a(49) + 2 * a(39) + a(41) a(31) = 5 * s1/7 - 2 * a(39) - 2 * a(41) a(30) = - s1/7 + a(38) + a(42) + a(48) - a(41) a(29) = 2 * s1/7 - a(42) + a(45) - a(48) a(28) = - 4 * s1/7 - 2 * a(45) + a(46) + 2 * a(48) + 2 * a(39) + 2 * a(41) a(27) = 4 * s1/7 - a(39) - 2 * a(41) a(26) = - 2 * s1/7 + a(46) + 2 * a(48) + a(49) - a(41) a(25) = s1/7
a routine can be written to generate subject Ultra Magic Squares of order 7 (ref. Priem7g2).
14.5.14 Ultra Magic Squares, Order 3 Concentric Square and Diamond Inlay
Based on the equations defining seventh order Ultra Magic Squares with Order 3 Concentric Square and Diamond Inlay: a(43) = s1 - a(44) - a(45) - a(46) - a(47) - a(48) - a(49) a(42) = (-3 * s1/7 + 2 * a(45) + a(33) + 2 * a(39))/2 a(41) = 6 * s1/7 + a(44) - a(45) - a(47) - a(48) - a(49) - a(33) - a(39) a(40) = ( s1 - a(44) + a(45) - a(46) - a(47) - a(48) - 2 * a(39))/2 a(38) = a(40) - a(45) + a(47) a(37) = - 5 * s1/7 + a(46) + 2 * a(48) + a(49) + a(33) + a(39) a(36) = ( s1/7 + 2 * a(47) - a(33)) / 2 a(35) = 3 * s1/7 + a(42) - a(44) - a(45) - a(39) a(34) = - 2 * s1/7 - a(40) + a(42) + a(48) + a(49) + a(33) a(32) = - s1/7 + 2 * a(39) a(31) = 4 * s1/7 - a(33) - 2 * a(39) a(30) = 8 * s1/7 - a(40) - a(42) + a(45) - a(46) - a(47) - a(48) - a(49) - a(33) - a(39) a(29) = ( s1 - 2 * a(48) - a(33) - 2 * a(39))/2 a(28) = 12 * s1/7 - 2 * a(45) - a(46) - 2 * a(48) - 2 * a(49) - 2 * a(33) - 2 * a(39) a(27) = 3 * s1/7 - a(33) - a(39) a(26) = 5 * s1/7 - 2 * a(33) - 2 * a(39) a(25) = s1/7
a routine can be written to generate subject Ultra Magic Squares of order 7 (ref. Priem7h).
14.5.15 Ultra Magic Squares, Three Cell Patterns
Based on the equations defining seventh order Ultra Magic Squares, for which all Three Cell patterns sum to 3*s1/7: a(33) = 3*s1 / 7 - a(34) - a(40) a(30) = 3*s1 / 7 - a(31) - a(38) a(46) = -2*s1 / 7 + a(31) + 2 * a(38) a(32) = 5*s1 / 7 - a(39) - a(31) - 2 * a(38) a(28) = s1 / 7 + a(34) - a(40) a(26) = 2*s1 / 7 - a(27) - a(34) + a(40) a(47) = 3*s1 / 7 - a(48) - a(49) a(45) = 7*s1 / 7 - a(48) - a(49) - a(27) - a(31) - a(38) - 2 * a(34) + a(40) a(44) = 3*s1 / 7 - a(48) + a(39) - a(38) - a(40) a(43) = -4*s1 / 7 + 2 * a(48) + a(49) + a(27) - a(39) + 2 * a(34) a(42) = 8*s1 / 7 - a(48) - a(49) - a(31) - 2 * a(38) - 2 * a(34) a(41) = a(49) + a(34) - a(40) a(37) = -7*s1 / 7 + 2 * a(48) + a(49) + a(27) - a(39) + a(31) + 2 * a(38) + 2 * a(34) a(36) = 6*s1 / 7 - a(48) - a(49) - a(27) - a(38) - a(34) a(35) = -5*s1 / 7 + a(48) + a(31) + 2 * a(38) + a(34) + a(40) a(29) = s1 / 7 - a(48) + a(39) + a(38) - a(34) a(25) = s1 / 7
a routine can be written to generate subject Ultra Magic Squares of order 7 (ref. Priem7d).
The obtained results regarding the miscellaneous types of order 7 Prime Number Magic Squares as deducted and discussed in previous sections are summarized in following table: |
Type
Characteristics
Subroutine
Results
Concentric
-
Bordered
Miscellaneous Inlays
Eccentric
General
Overlapping Sub Squares
Associated
Overlapping Sub Squares (4 x 4)
Diamond Inlays Order 3 and 4
Square Inlays Order 3 and 4
Composed
Associated Crnr Sqrs and - Rectangles
Ultra Magic
General
Concentric, Square Inlay (a)
Concentric, Square Inlay (b)
Order 3 Square Inlays
Order 3 Square and Diamond Inlay (a)
Order 3 Square and Diamond Inlay (b)
Concentric, Diamond Inlay
Three Cell Patterns
Comparable routines as listed above, can be used to generate Prime Number Magic Squares of order 8, which will be described in following sections.
|
Index | About the Author |