Office Applications and Entertainment, Magic Squares  
Index  About the Author 
14.0 Special Magic Squares, Prime Numbers
Prime Number Magic Squares with Consecutive Primes can be generated with comparable routines as described in Section 14, however based on
consecutive prime variable values {a_{i}} with i = 1 ... n.
Based on the equations defining a Magic Square of the fourth order: a(13) = s1  a(14)  a(15)  a(16) a( 9) = s1  a(10)  a(11)  a(12) a( 7) = a( 8)  a(10) + a(12)  a(13) + a(16) a( 6) = s1  a( 8)  a(11)  a(12) + a(13)  a(16) a( 5) =  a( 8) + a(10) + a(11) a( 4) = s1  a( 7)  a(10)  a(13) a( 3) = s1  a( 8) + a( 9) + 2 * a(10) + 2 * a(13) + a(14) a( 2) = a( 8)  a( 9)  2 * a(10) + a(15) + 2 * a(16) a( 1) = a( 8) + a(12)  a(13)
and preselected ranges of consecutive primes, routine Priem4b2 can be used to generate order 4
Prime Number Magic Squares with Consecutive Prime Numbers.
Based on the equations defining a Magic Square of the fifth order: a(21) = s1  a(22)  a(23)  a(24)  a(25) a(16) = s1  a(17)  a(18)  a(19)  a(20) a(11) = s1  a(12)  a(13)  a(14)  a(15) a( 9) = a(10)  a(13) + a(15)  a(17) + a(20)  a(21) + a(25) a( 7) = (s1  a( 8)  a( 9)  a(10) + a(11)  a(13) + a(16)  a(19) + a(21)  a(25))/2 a( 6) = s1  a( 7)  a( 8)  a( 9)  a(10) a( 5) = s1  a( 9)  a(13)  a(17)  a(21) a( 4) = s1  a( 9)  a(14)  a(19)  a(24) a( 3) = s1  a( 8)  a(13)  a(18)  a(23) a( 2) = s1  a( 7)  a(12)  a(17)  a(22) a( 1) = s1  a( 2)  a( 3)  a( 4)  a( 5)
and preselected ranges of consecutive primes, routine Priem5b2 can be used to generate order 5
Prime Number Magic Squares with Consecutive Prime Numbers.
14.13.3 Pan Magic Squares (6 x 6)
Based on the equations defining a Pan Magic Square of the sixth order: a(31) = s1  a(32)  a(33)  a(34)  a(35)  a(36) a(25) = s1  a(26)  a(27)  a(28)  a(29)  a(30) a(19) = s1  a(20)  a(21)  a(22)  a(23)  a(24) a(17) = 2/3 * s1  a(18) + a(20) + a(21)  a(23)  a(24) + a(26) + a(27)  a(29)  a(30)  a(35)  a(36) a(16) = 2 * s1 + a(18)  a(20)  2*a(21)  2*a(22)  a(23)  a(26)  2*a(27)  2*a(28)  a(29)  a(34) + a(36) a(15) = 2/3 * s1  a(18)  a(33)  a(36) a(14) = a(18)  a(20)  a(21) + a(23) + a(24)  a(26)  a(27) + a(29) + a(30)  a(32) + a(36) a(13) = 4/3 * s1  a(18) + a(20) + 2*a(21) + 2*a(22) + a(23) + a(26) + 2*a(27) + 2*a(28) + a(29)  a(31)  a(36) a(12) = 11/6 * s1  a(20)  a(21)  a(22)  a(26)  2*a(27)  a(28)  a(32)  a(33)  a(34) a(11) = 7/6 * s1 + a(22) + a(23) + a(24)  a(26) + a(28) + a(29) + a(30) + a(34) + a(35) + a(36) a(10) = 7/6 * s1 + a(21) + a(22) + a(23)  a(25) + a(27) + a(28) + a(29) + a(33) + a(34) + a(35) a(9) = 7/6 * s1 + a(20) + a(21) + a(22) + a(26) + a(27) + a(28)  a(30) + a(32) + a(33) + a(34) a(8) = 11/6 * s1  a(22)  a(23)  a(24)  a(28)  2*a(29)  a(30)  a(34)  a(35)a(36) a(7) = 11/6 * s1  a(21)  a(22)  a(23)  a(27)  2*a(28)  a(29)  a(33)  a(34)a(35) a(6) = 5/6 * s1  a(18) + a(20) + a(21) + a(22)  a(24) + a(26) + 2*a(27) + a(28)a(30)+a(32)+a(33)+a(34)a(36) a(5) = 1/2 * s1 + a(18) + a(19) + a(24)  a(27)  a(28)  a(29)  a(34)  a(35) a(4) = 1/6 * s1  a(18) + a(20) + a(21)  a(28)  a(29)  a(30) + a(31) + a(32) a(3) = 1/2 * s1 + a(18)  a(20)  2*a(21)  a(22)  a(26)  2*a(27)  a(28) + a(30) + a(31) + a(35) + 2*a(36) a(2) = 1/6 * s1  a(18) + a(21) + a(22)  a(25)  a(26)  a(30) + a(34) + a(35) a(1) = 1/2 * s1 + a(18) + a(23) + a(24)  a(25)  a(26)  a(27)  a(31)  a(32)
and preselected ranges of consecutive primes, routine Priem6b1 can be used to generate order 6
Prime Number Magic Squares with Consecutive Prime Numbers.
Subject square corresponds with numerous Prime Number Pan Magic Squares with the same Magic Sum and variable values.
14.13.4 Simple Magic Squares (6 x 6)
Prime Number Simple Magic Squares of order 6 can be constructed very efficiently with the Generator Principle, as applied for the construction of Bimagic Squares.
For the Consecutive Prime Numbers used in Section 14.13.3 above (MC6 = 930), 12980 Magic Series could be generated, resulting in numerous Generators.
The method described above has been applied for miscellaneous Magic Sums, for which
the first occurring Simple Magic Squares are shown in Attachment 14.13.4.
14.13.5 Simple Magic Squares (7 x 7)
Prime Number Simple Magic Squares of order 7 can be constructed with the Generator Principle, as discussed in Section 14.13.4 above.
The Generator Method has been applied for miscellaneous Magic Sums, for which
the first occurring Simple Magic Squares are shown in Attachment 14.13.5.
14.13.6 Simple Magic Squares (8 x 8)
Also Prime Number Simple Magic Squares of order 8 can be constructed with the Generator Principle, as applied in previous sections.
The Generator Method has been applied for miscellaneous Magic Sums, for which
the first occurring Simple Magic Squares are shown in Attachment 14.13.6.
The obtained results regarding the miscellaneous types of Prime Number Magic Squares as deducted and discussed in previous sections are summarized in following table: 
Order
Main Characteristics
Subroutine
Results
4
Consecutive Primes, Simple Magic
5
Consecutive Primes, Simple Magic
6
Consecutive Primes, Simple Magic
Consecutive Primes, Pan Magic

7
Consecutive Primes, Simple Magic

8
Consecutive Primes, Simple Magic

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

Index  About the Author 