Office Applications and Entertainment, Magic Squares  
Index  About the Author 
14.0 Special Magic Squares, Prime Numbers
14.18 Magic Squares of Twin Primes
Twin Primes are paired prime numbers {a_{i}, b_{i}}
with the property {b_{i}} = {a_{i}} + d
for i = 1 ... n and d >= 2. This section will consider Twin Primes for d = 2.
14.18.1 Pan Magic Squares (4 x 4)
Possible conditions, which will result in Pan Magic Squares composed of Twin Pairs, are defined below:
The selected conditions have to be added to the defining equations of a Pan Magic Square (ref. Section 14.2.2), which results in following set of linear equations: a(15) = 0.5 * s1  a(16) + a(17) a(13) = 0.5 * s1  a(14)  a(17) a(11) = 0.5 * s1  a(12)  a(17) a(10) = a(12)  a(14) + a(16) a( 9) = 0.5 * s1  a(12) + a(14)  a(16) + a(17) a( 8) = 0.5 * s1  a(14) a( 7) = a(14) + a(17) a( 6) = 0.5 * s1  a(16) a( 5) = a(16)  a(17) a( 4) = 0.5 * s1  a(12) + a(14)  a(16) a( 3) = a(12)  a(14) + a(16)  a(17) a( 2) = 0.5 * s1  a(12) a( 1) = a(12) + a(17)
with a(17) = 2 and a(16), a(14) and a(12) the independent variables.
14.18.2 Simple Magic Squares (4 x 4)
For Simple Magic Squares composed of Twin Pairs the conditions as defined in Section 14.18.1 above can be applied.
The selected conditions have to be added to the defining equations of a Simple Magic Square (ref. Section 14.2.1), which results in following set of linear equations: a(13) = s1  a(14)  a(15)  a(16) a(11) = s1  a(12)  a(15)  a(16) a(10) = a(12)  a(14) + a(16) a( 9) =  a(12) + a(14) + a(15) a( 8) = s1  a(14)  a(15)  a(16) + a(17) a( 7) = a(14) + a(17) a( 6) = a(15)  a(17) a( 5) = a(16)  a(17) a( 4) =  a(12) + a(14) + a(15)  a(17) a( 3) = a(12)  a(14) + a(16)  a(17) a( 2) = s1  a(12)  a(15)  a(16) + a(17) a( 1) = a(12) + a(17)
with a(17) = 2 and a(16), a(15), a(14), and a(12) the independent variables.
14.18.3 Associated Magic Squares (4 x 4)
Possible conditions, which will result in Associated Magic Squares composed of Twin Pairs, are defined below:
The selected conditions have to be added to the defining equations of an Associated Magic Square (ref. Section 14.2.3), which results in following set of linear equations: a(13) = s1  a(14)  a(15)  a(16) a(12) = 0.5 * s1  a(16)  a(17) a(11) = 0.5 * s1  a(15) + a(17) a(10) = 0.5 * s1  a(14) + a(17) a( 9) = 0.5 * s1 + a(14) + a(15) + a(16)  a(17) a( 8) = 0.5 * s1  a( 9) a( 7) = 0.5 * s1  a(10) a( 6) = 0.5 * s1  a(11) a( 5) = 0.5 * s1  a(12) a( 4) = 0.5 * s1  a(13) a( 3) = 0.5 * s1  a(14) a( 2) = 0.5 * s1  a(15) a( 1) = 0.5 * s1  a(16)
with a(17) = 2 and a(16), a(15) and a(14) the independent variables.
14.18.4 Composed Magic Squares (8 x 8)
In Section 14.6.1 was discussed how Prime Number Magic Squares of order 8  with Magic Sum 2 * s1  can be composed out of 4^{th} order Prime Number Magic Squares with Magic Sum s1.

MC8 = 14280
199 3373 179 3389 1489 2083 1427 2141 11 3557 31 3541 41 3527 103 3469 3391 181 3371 197 2143 1429 2081 1487 3539 29 3559 13 3467 101 3529 43 1021 2551 857 2711 1303 2269 1229 2339 107 3461 271 3301 239 3329 313 3259 2713 859 2549 1019 2341 1231 2267 1301 3299 269 3463 109 3257 311 3331 241
Attachment 14.18.5
contains a few more sets of Pan Magic Squares composed of Twin Pairs, which can be used to construct order 8 Twin Pair based Magic Squares
 composed of order 4 Pan Magic Sub Squares  (ref. Priem4b2).
14.18.5 Associated Magic Squares (8 x 8)
Associated Magic Squares of order 8  with Magic Sum 2 * s1  can be composed out of 4^{th} order Semi Magic Squares with Magic Sum s1.
a(13) = s1  a(14)  a(15)  a(16) a(10) = s1  a(11)  a(14)  a(15) a( 9) =  a(12) + a(14) + a(15) a( 8) = s1  a(14)  a(15)  a(16) + a(17) a( 7) = a(14) + a(17) a( 6) = a(15)  a(17) a( 5) = a(16)  a(17) a( 4) =  a(12) + a(14) + a(15)  a(17) a( 3) = s1  a(11)  a(14)  a(15)  a(17) a( 2) = a(11) + a(17) a( 1) = a(12) + a(17)
with a(17) = 2 and a(16), a(15), a(14), a(12) and a(11) the independent variables.
14.18.6 Pan Magic Squares (8 x 8)
The order 8 Twin Pair based Associated Magic Squares obtained in Section 14.18.5 above can be transformed into order 8 Twin Pair based Pan Magic Squares as shown below (Eulers Transformation):
Attachment 14.18.8
shows for prime number range (11 ... 7561) the first occurring order 8 Twin Pair based Pan Magic Squares for a few Magic Sums.
The resulting Pan Magic Square is Complete, 4 x 4 Compact and Four Way V type Zig Zag (ref. Section 14.15.5) and has following additional properties:
Attachment 14.18.12 shows the Twin Pair based Pan Magic Squares,
which can be obtained by transformation of
the Composed Magic Squares as shown in Attachment 14.18.6.
14.18.7 Composed Magic Squares (12 x 12)
Prime Number Magic Squares of order 12  with Magic Sum 3 * s1  can be composed out of 4^{th} order Prime Number Magic Squares with Magic Sum s1.
14.18.8 Associated Magic Squares (12 x 12)
Order 12 Twin Pair based Associated Magic Squares might be composed of:
as illustrated in the example below: MC12 = 99540
Subject square corresponds with numerous Associated Magic Squares with the same Magic Sums and variable values {a_{i}}.
The obtained results regarding the miscellaneous types of Prime Number Magic Squares composed of Twin Pairs, as deducted and discussed in previous sections are summarized in following table: 
Order
Main Characteristics
Subroutine
Results
4
Pan Magic
Simple Magic
Associated
8
Composed of Pan Magic Squares
Composed of Associated Magic Squares
Associated
Pan Magic (1)
Euler
Pan Magic (2)
Alternative
12
Composed of Pan Magic Squares
Composed of Associated Magic Squares




Following sections will explain the concept of Prime Number Magic Twin Squares and illustrate how
Magic Twin Squares can be generated with comparable routines as described in previous sections.

Index  About the Author 