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 6, however such routines are not very feasible due to the high number of independent variables, 23 ea for Magic Squares and 16 ea for Pan Magic Squares.
14.4.1 Concentric Pan Magic Squares (6 x 6)
The variable values {ai} on which a Prime Number Concentric Pan Magic Square with Embedded Magic Square might be based should contain at least 10 pairs (border).
Based on the equations defining a Concentric Pan Magic Square (6 x 6) with Magic Center Square (4 x 4): a(31) = s1 - a(32) - a(33) - a(34) - a(35) - a(36) a(27) = 2 * s1/3 - a(28) - a(33) - a(34) a(26) = - a(29) + a(33) + a(34) a(25) = s1/3 - a(30) a(23) = 5 * s1/3 - a(24) - a(28) - 2 * a(29) - a(30) - a(34) - a(35) - 2 * a(36) a(22) = - s1/3 + a(24) + a(34) + a(36) a(21) = s1 - a(24) - a(32) - a(34) - a(35) - a(36) a(20) = 2 * s1/3 - a(21) - a(22) - a(23) a(19) = s1/3 - a(24) a(18) = s1/6 + a(29) - a(33) a(17) = - s1 - a(18) + a(28) + 2 * a(29) + a(30) + a(34) + a(35) + 2 * a(36) a(16) =-2 * s1/3 + a(18) + a(32) + a(33) + a(35) + a(36) a(15) = - a(16) + a(32) + a(35) a(14) = 2 * s1/3 - a(15) - a(16) - a(17) a(13) = s1/3 - a(18) a(12) = s1/3 + a(13) - a(24) - a(30) + a(31) - a(36) a(11) = s1/3 - a(13) + a(24) - a(29) a(10) = 2 * s1/3 - a(11) - a(28) - a(29) + a(31) - a(36) a( 9) = - a(10) + a(33) + a(34) a( 8) = 2 * s1/3 - a( 9) - a(10) - a(11) a( 7) = s1/3 - a(12) a( 6) = s1/3 - a(31) a( 5) = s1/3 - a(35) a( 4) = s1/3 - a(34) a( 3) = s1/3 - a(33) a( 2) = s1/3 - a(32) a( 1) = s1/3 - a(36)
a routine can be written to generate Prime Number Concentric Pan Magic Squares of order 6 (ref. Priem6a).
14.4.2 Concentric Pan Magic Squares (6 x 6) The equations defining a Concentric Pan Magic Square (6 x 6) with Associated Center Square (4 x 4) can be written as: a(36) = 5 * s1/6 - a(23) - a(28) - 2 * a(29) a(33) = 2 * s1/3 - a(34) - a(27) - a(28) a(32) = -2 * s1/3 - a(35) + 2 * a(23) + a(27) + a(28) + 2 * a(29) a(31) = s1/6 - a(23) + a(28) a(30) = - s1/6 - a(35) + a(23) + a(28) + a(29) a(26) = 2 * s1/3 - a(27) - a(28) - a(29) a(25) = s1/2 + a(35) - a(23) - a(28) - a(29) a(24) = s1/6 - a(34) + a(29) a(22) = 2 * s1/3 - a(23) - a(28) - a(29) a(21) = 2 * s1/3 - a(23) - a(27) - a(29) a(20) = -2 * s1/3 + a(23) + a(27) + a(28) + 2 * a(29) a(19) = s1/6 + a(34) - a(29) a(18) = - s1/2 + a(34) + a(27) + a(28) + a(29) a(17) = s1 - a(23) - a(27) - a(28) - 2 * a(29) a(16) = - s1/3 + a(23) + a(27) + a(29) a(15) = - s1/3 + a(23) + a(28) + a(29) a(14) = s1/3 - a(23) a(13) = 5 * s1/6 - a(34) - a(27) - a(28) - a(29) a(12) = s1/2 + a(35) - a(23) - a(27) - a(29) a(11) = - s1/3 + a(27) + a(28) + a(29) a(10) = s1/3 - a(27) a( 9) = s1/3 - a(28) a( 8) = s1/3 - a(29) a( 7) = - s1/6 - a(35) + a(23) + a(27) + a(29) a( 6) = s1/6 + a(23) - a(28) a( 5) = s1/3 - a(35) a( 4) = s1/3 - a(34) a( 3) = - s1/3 + a(34) + a(27) + a(28) a( 2) = s1 + a(35) - 2 * a(23) - a(27) - a(28) - 2 * a(29) a( 1) = - s1/2 + a(23) + a(28) + 2 * a(29)
with a(29), a(28) a(27) and a(23) the independent center square variables and a(35), a(34) the independent border variables.
14.4.3 Concentric Magic Squares (6 x 6)
A 6th order Prime Number Concentric Magic Square consists of a Prime Number Embedded Magic Square of the 4th order with a border around it.
Based on the equations defining a Concentric Magic Square (6 x 6) with Pan Magic Center Square (4 x 4): a(31) = s1 - a(32) - a(33) - a(34) - a(35) - a(36) a(26) = 2 * s1/3 - a(27) - a(28) - a(29) a(25) = s1/3 - a(30) a(22) = 2 * s1/3 - a(23) - a(28) - a(29) a(21) = a(23) - a(27) + a(29) a(20) = - a(23) + a(27) + a(28) a(19) = s1/3 - a(24) a(17) = s1/3 - a(27) a(16) = - s1/3 + a(27) + a(28) + a(29) a(15) = s1/3 - a(29) a(14) = s1/3 - a(28) a(13) = s1/3 - a(18) a(12) = 2 * s1/3 - a(18) - a(24) - a(30) + a(31) - a(36) a(11) = s1/3 - a(23) + a(27) - a(29) a(10) = s1/3 + a(23) - a(27) - a(28) a( 9) = s1/3 - a(23) a( 8) = - s1/3 + a(23) + a(28) + a(29) a( 7) = -4 * s1/3 + a(18) + a(24) + a(30) + a(32) + a(33) + a(34) + a(35) + 2 * a(36) a( 6) = -2 * s1/3 + a(32) + a(33) + a(34) + a(35) + a(36) a( 5) = s1/3 - a(35) a( 4) = s1/3 - a(34) a( 3) = s1/3 - a(33) a( 2) = s1/3 - a(32) a( 1) = s1/3 - a(36)
a routine can be written to generate Prime Number Concentric Magic Squares of order 6 (ref. Priem6b).
14.4.4 Concentric Magic Squares (6 x 6) Based on the equations defining a Concentric Magic Square (6 x 6), composed out of 9 Non Overlapping Sub Squares (2 x 2), with Pan Magic Center Square (4 x 4): a(31) = s1 - a(32) - a(33) - a(34) - a(35) - a(36) a(29) = 2 * s1/3 - a(30) - a(35) - a(36) a(27) = 2 * s1/3 - a(28) - a(33) - a(34) a(26) = s1/3 + a(30) - a(31) - a(32) a(25) = s1/3 - a(30) a(22) = 2 * s1/3 - a(23) - a(28) - a(29) a(21) = a(23) - a(27) + a(29) a(20) = 2 * s1/3 - a(23) - a(33) - a(34) a(19) = s1/3 - a(24) a(18) = s1/3 - a(23) - a(24) + a(27) a(17) = - s1/3 + a(28) + a(33) + a(34) a(16) = - a(30) + a(31) + a(32) a(15) = - s1/3 + a(30) + a(35) + a(36) a(14) = s1/3 - a(28) a(13) = a(23) + a(24) - a(27) a(12) = 2 * s1/3 + a(23) + a(28) - a(30) - a(32) - a(35) - 2 * a(36) a(11) = 2 * s1/3 - a(17) - a(23) - a(29) a(10) = - s1/3 + a(23) + a(33) + a(34) a( 9) = s1/3 - a(23) a( 8) = 2 * s1/3 - a(11) - a(33) - a(34) a( 7) = s1/3 - a(12) a( 6) = s1/3 - a(31) a( 5) = s1/3 - a(35) a( 4) = s1/3 - a(34) a( 3) = s1/3 - a(33) a( 2) = s1/3 - a(32) a( 1) = s1/3 - a(36)
a comparable routine can be written to generate Prime Number Concentric Magic Squares of order 6, composed out of 2 x 2 Non Overlapping Sub Squares (ref. Priem6c).
14.4.5 Eccentric Magic Squares (6 x 6)
Based on the equations defining an Eccentric Magic Square (6 x 6) with Pan Magic Border Square (4 x 4): a(33) = 2 * s1/3 - a(34) - a(35) - a(36) a(31) = s1/3 - a(32) a(29) = 2 * s1/3 - a(30) - a(35) - a(36) a(28) = a(30) - a(34) + a(36) a(27) = - a(30) + a(34) + a(35) a(25) = s1/3 - a(26) a(24) = s1/3 - a(34) a(23) = - s1/3 + a(34) + a(35) + a(36) a(22) = s1/3 - a(36) a(21) = s1/3 - a(35) a(19) = s1/3 - a(20) a(18) = s1/3 - a(30) + a(34) -a(36) a(17) = s1/3 + a(30) - a(34) -a(35) a(16) = s1/3 - a(30) a(15) = - s1/3 + a(30) + a(35) + a(36) a(13) = s1/3 - a(14) a(11) = 2 * s1/3 + a(12) - a(16) - a(21) - a(26) - a(31) a( 8) = (s1/3 - a( 9) - a(10) - a(11) - a(12) + a(13) + a(19) + a(25) + a(31))/2 a( 7) = s1 - a( 8) - a( 9) - a(10) - a(11) - a(12) a( 6) = s1/3 - a(12) a( 5) = s1/3 - a(11) a( 4) = s1/3 - a(10) a( 3) = s1/3 - a( 9) a( 2) = s1 - a( 8) - a(14) - a(20) - a(26) - a(32) a( 1) = s1/3 - a( 8)
a comparable routine can be written to generate Prime Number Eccentric Magic Squares of order 6
(ref. Priem6d1).
Note:
Subject routine produced, based on 2236 previously generated Pan Magic Squares of order 4, 2236 Prime Number Eccentric Magic Square of order 6 within 340 seconds (one square per Magic Sum).
14.4.6 Associated Pan Magic Squares (6 x 6)
Based on the equations defining an Associated Pan Magic Square (Ultra Magic) of the sixth order: a(31) = s1 - a(32) - a(33) - a(34) - a(35) - a(36) a(27) = 2 * s1 - a(28) - 2 * a(29) - 2 * a(30) + a(32) - 2 * a(34) - 3 * a(35) - 2 * a(36) a(26) = s1 - 2 * a(27) - a(29) - 2 * a(30) a(25) = a(27) - a(28) + a(30) a(24) = 3 * s1/2 - a(29) - 2 * a(30) - a(34) - 2 * a(35) - 2 * a(36) a(23) = s1/2 - a(25) - a(28) - a(29) + a(32) a(22) = 3 * s1/2 - 2 * a(28) - a(29) - 2 * a(34) - 2 * a(35) - a(36) a(21) = s1 - a(24) - a(32) - a(33) - a(35) - a(36) a(20) = a(22) + a(28) - a(30) + a(32) - a(36) a(19) = - a(20) + a(28) - a(30) + a(32) + a(33)
a comparable routine can be written to generate Associated Pan Magic Squares of order 6 (ref. Priem6i).
14.4.7 Associated Pan Magic Squares (6 x 6) Based on the equations defining an Associated Pan Magic Square (Ultra Magic) of the sixth order, composed out of 9 Non Overlapping Sub Squares (2 x 2): a(32) = - a(33) + a(34) + a(35) a(31) = s1 - 2 * a(34) - 2 * a(35) - a(36) a(29) = 2 * s1 / 3 - a(30) - a(35) - a(36) a(27) = 2 * s1 / 3 - a(28) - a(33) - a(34) a(26) = - s1 + 2 * a(28) - a(30) + 2 * a(33) + 2 * a(34) + a(35) + a(36) a(25) = 2 * s1 / 3 - 2 * a(28) + a(30) - a(33) - a(34) a(24) = 5 * s1 / 6 - a(30) - a(34) - a(35) - a(36) a(23) = -5 * s1 / 6 + a(28) + 2 * a(34) + 2 * a(35) + a(36) a(22) = 5 * s1 / 6 - 2 * a(28) + a(30) - 2 * a(34) - a(35) a(21) = s1 / 6 + a(30) - a(35) a(20) = 5 * s1 / 6 - a(28) - a(33) - a(34) - a(36) a(19) = -5 * s1 / 6 + 2 * a(28) - a(30) + a(33) + 2 * a(34) + a(35) + a(36)
a comparable routine can be written to generate subject Associated Pan Magic Squares of order 6 (ref. Priem6f).
14.4.8 Associated Pan Magic Squares (6 x 6) Based on the equations defining a Compact Ultra Magic Square of the sixth order: a(33) = s1 - a(34) - 2 * a(35) - 2 * a(36) a(32) = - s1 + 2 * a(34) + 3 * a(35) + 2 * a(36) a(31) = s1 - 2 * a(34) - 2 * a(35) - a(36) a(29) = 2 * s1/3 - a(30) - a(35) - a(36) a(28) = a(30) - a(34) + a(36) a(27) = - s1/3 - a(30) + a(34) + 2 * a(35) + a(36) a(26) = s1 + a(30) - 2 * a(34) - 3 * a(35) - a(36) a(25) = - s1/3 - a(30) + 2 * a(34) + 2 * a(35) a(24) = 5 * s1/6 - a(30) - a(34) - a(35) - a(36) a(23) = -5 * s1/6 + a(30) + a(34) + 2 * a(35) + 2 * a(36) a(22) = 5 * s1/6 - a(30) - a(35) - 2 * a(36) a(21) = s1/6 + a(30) - a(35) a(20) = - s1/6 - a(30) + a(34) + 2 * a(35) a(19) = s1/6 + a(30) - a(34) - a(35) + a(36)
a comparable routine can be written to generate Compact Ultra Magic Squares of order 6 (ref. Priem6h).
14.4.9 Most Perfect Pan Magic Squares (6 x 6)
Based on the equations defining a Most Perfect Pan Magic Square (6 x 6): a(33) = s1 - 2 * a(34) - 2 * a(35) - a(36) a(32) = - s1 + 2 * a(34) + 3 * a(35) + 2 * a(36) a(31) = s1 - a(34) - 2 * a(35) - 2 * a(36) a(29) = 4 * s1/6 - a(30) - a(35) - a(36) a(28) = a(30) - a(34) + a(36) a(27) = -2 * s1/6 - a(30) + 2 * a(34) + 2 * a(35) a(26) = s1 + a(30) - 2 * a(34) - 3 * a(35) - a(36) a(25) = -2 * s1/6 - a(30) + a(34) + 2 * a(35) + a(36) a(24) = 5 * s1/6 - a(30) - a(34) - a(35) - a(36) a(23) = -5 * s1/6 + a(30) + a(34) + 2 * a(35) + 2 * a(36) a(22) = 5 * s1/6 - a(30) - a(35) - 2 * a(36) a(21) = s1/6 + a(30) - a(34) - a(35) + a(36) a(20) = - s1/6 - a(30) + a(34) + 2 * a(35) a(19) = s1/6 + a(30) - a(35)
a comparable routine can be written to generate Prime Number Most Perfect Pan Magic Squares of order 6 (ref. Priem6e).
14.4.10 Simple Magic Squares (6 x 6) composed of Semi Magic Sub Squares (3 x 3)
Prime Number Magic Squares of order 6 - with Magic Sum 2 * s1 - can be composed out of Prime Number Semi Magic Squares of order 3 with Magic Sum s1.
a(7) = s1 - a(8) - a(9) a(5) = - s1 + a(6) + a(8) + 2 * a(9) a(4) = 2 * s1 - 2 * a(6) - a(8) - 2 * a(9) a(3) = s1 - a(6) - a(9) a(2) = 2 * s1 - a(6) - 2 * a(8) - 2 * a(9) a(1) = -2 * s1 + 2 * a(6) + 2 * a(8) + 3 * a(9)
With some minor modifications subject procedure can be used to find a set of 4 (or more) Prime Number Semi Magic Squares with Magic Sum s1 - each containing 9 different Prime Numbers.
14.4.11 Associated Magic Squares (6 x 6) composed of Semi Magic Anti Symmetric Sub Squares (3 x 3)
Comparable as in Section 14.4.10 above, Prime Number Associated Magic Squares of order 6 - with Magic Sum 2 * s1 - can be composed out of Prime Number Semi Magic Anti Symmetric Squares of order 3 with Magic Sum s1.
14.4.12 Pan Magic Squares (6 x 6) composed of Semi Magic Sub Squares (3 x 3)
Based on the equations defining order 6 Pan Magic Squares composed of order 3 Semi Magic Sub Squares (Six Magic Lines): a(34) = s1 / 2 - a(35) - a(36) a(15) = -s1 / 6 + a(34) + a(35) a(14) = 5 * s1 / 6 - a(34) - 2 * a(35) - a(36) a(13) = -s1 / 6 + a(35) + a(36) a(18) = 5 * s1 / 6 - a(33) - a(34) - a(35) - a(36) a(31) = s1 / 2 - a(32) - a(33) a(17) = -s1 / 6 - a(32) + a(34) + a(35) + a(36) a(16) = -s1 / 6 + a(32) + a(33) a(24) = s1 / 2 - a(30) - a(36) a( 9) = s1 / 3 - a(30) a( 3) = s1 / 3 + a(30) - a(34) - a(35) a(28) = s1 / 2 - a(29) - a(30) a(23) = s1 / 2 - a(29) - a(35) a(22) = a(29) + a(30) - a(34) a( 8) = s1 / 3 - a(29) a( 7) = -s1 / 6 + a(29) + a(30) a( 2) = -2 * s1 / 3 + a(29) + a(34) + 2 * a(35) + a(36) a( 1) = 5 * s1 / 6 - a(29) - a(30) - a(35) - a(36) a(21) = s1 / 2 - a(27) - a(33) a(12) = s1 / 3 - a(27) a( 6) = -2 * s1 / 3 + a(27) + a(33) + a(34) + a(35) + a(36) a(25) = s1 / 2 - a(26) - a(27) a(20) = s1 / 2 - a(26) - a(32) a(19) = s1 / 2 - a(25) - a(31) a(11) = s1 / 3 - a(26) a(10) = -s1 / 6 + a(26) + a(27) a( 5) = s1 / 3 + a(26) + a(32) - a(34) - a(35) - a(36) a( 4) = 5 * s1 / 6 - a(26) - a(27) - a(32) - a(33)
a routine can be written to generate subject Prime Number Pan Magic Squares of order 6 (ref. Priem6e3).
a(34) = s1 / 2 - a(35) - a(36) a(31) = s1 / 2 - a(32) - a(33) a(28) = s1 / 2 - a(29) - a(30) a(25) = s1 / 2 - a(26) - a(27) a(24) = s1 / 2 - a(30) - a(36) a(23) = s1 / 2 - a(29) - a(35) a(22) = a(29) + a(30) - a(34) a(21) = s1 / 2 - a(27) - a(33) a(20) = s1 / 2 - a(26) - a(32) a(19) = s1 / 2 - a(25) - a(31)
Attachment 14.8.6 shows for miscellaneous Magic Sums (48 ea) the first occurring Prime Number Pan Magic Square
composed of Semi Magic Sub Squares, generated with procedure Priem6e3 in 56 seconds.
14.4.13 Inlaid Magic Squares (6 x 6)
An order 6 Magic Square might be composed out of:
As illustrated below:
Based on the defining equations of an order 4 Pan Magic Square, as deducted in Section 14.2.2, a dedicated procedure can be developed (ref. MgcSqr413):
Attachment 14.4.13
shows for miscellaneous Magic Sums (48 ea) the first occurring Prime Number Inlaid Magic Square.
Each square shown corresponds with miscellaneous Inlaid Magic Squares.
The obtained results regarding the miscellaneous types of order 6 Prime Number Magic Squares as deducted and discussed in previous sections are summarized in following table: |
Type
Characteristics
Subroutine
Results
Concentric Pan Magic
General
Associated Center Square
Concentric
General
Sub Squares 2 x 2
Eccentric
-
Associated Pan Magic
Sub Squares 2 x 2
Compact
Most Perfect
Compact and Complete
Composed
Semi Magic Sub Squares 3 x 3
Composed, Associated
Composed, Pan Magic
Inlaid
Overlapping Sub Squares
Comparable routines as listed above, can be used to generate less conventional Prime Number Magic Squares of order 6, which will be described in following sections.
|
Index | About the Author |