Office Applications and Entertainment, Magic Squares  
Index  About the Author 
14.0 Special Magic Squares, Prime Numbers
14.6 Magic Squares (8 x 8), Part I
14.6.1 Magic Squares (8 x 8), Composed of Pan Magic Sub Squares (4 x 4)
Prime Number Magic Squares of order 8  with Magic Sum 2 * s1  can be composed out of 4^{th} order Prime Number Pan Magic Squares with Magic Sum s1.
In section 14.2, procedures were developed to generate 4^{th} order Prime Number Pan Magic Squares with Magic Sum s1.
14.6.2 Magic Squares (8 x 8), Composed of Magic Sub Squares (4 x 4)
With procedure Priem4a respectively 4672 , 4224 , 4224 and 4224 Magic Squares of the 4^{th} order can be generated, based on the distinct integers contained in the 4 Pan Magic Squares with MC = 1680.
14.6.3 Magic Squares (8 x 8), Composed of (Pan) Magic Sub Squares (4 x 4)
Alternatively Prime Number Magic Squares composed of Magic Sub Squares can be constructed based on Prime Number Simple Magic Cubes,
as deducted in the relevant sections of 'Magic Cubes'.

Composed Magic Square
Based on Magic Cube
Attachment
Type
Sub Squares
Ref.
Attachment
Type
Hor. Planes
Simple
Simple
Associated
Simple
Pan Magic
Associated
Magic
Magic
Simple
Simple
Associated
Pantriagonal,
Complete
Pan Magic
Associated
Magic
Magic
Typical for these cube based squares is that the corner points of all 5 x 5 sub squares sum to half the Magic Sum.
14.6.4 Concentric Magic Squares (8 x 8)
An 8^{th} order Prime Number Concentric Magic Square consists of a Prime Number Concentric Magic Square of the 6^{th} order, as discussed in Section 14.4.3, with a border around it.
Based on the equations defining the border of a Concentric Magic Square (8 x 8) with Enclosed Magic Square (6 x 6): a(57) = s1  a(58)  a(59)  a(60)  a(61)  a(62)  a(63)  a(64) a(49) = s1/4  a(56) a(41) = s1/4  a(48) a(33) = s1/4  a(40) a(25) = s1/4  a(32) a(17) = s1/4  a(24) a(16) = s1  a( 8)  a(24)  a(32)  a(40)  a(48)  a(56)  a(64) a( 9) = s1/4  a(16) a( 8) = s1/4  a(57) a( 7) = s1/4  a(63) a( 6) = s1/4  a(62) a( 5) = s1/4  a(61) a( 4) = s1/4  a(60) a( 3) = s1/4  a(59) a( 2) = s1/4  a(58) a( 1) = s1/4  a(64)
a routine can be written to generate Prime Number Concentric Magic Squares of order 8 (ref. Priem8a).
More Prime Number Concentric Magic Squares of order 8 can be generated with routine Priem8a based on the collections of 6^{th} order Magic Squares, as deducted in Section 14.4.2 and 14.4.4:
Each square shown corresponds with numerous squares for the same Magic Sum, depending from the selected variable values {a_{i}} and the related number of possible Embedded Magic Squares.
14.6.5 Bordered Magic Squares (8 x 8) Based on the collections of 6^{th} order Magic Squares, as deducted in Section 14.4.7 thru 14.4.11, also following Bordered Magic Squares can be generated with routine Priem8a:
Each square shown corresponds with numerous squares for the same Magic Sum, depending from the selected variable values {a_{i}} and the related number of possible Center Squares.
14.6.6 Eccentric Magic Squares (8 x 8)
For Prime Number Eccentric Magic Squares of order 8 with Magic Sum s8 it is convenient to split the supplementary rows and columns into two equal parts each summing to s4 = s8/2:
This enables the development of a fast procedure to construct Prime Number Eccentric Magic Squares of order 8
based on collections of order 6 Magic Corner Squares
(ref. Priem8a2).
Attachment 14.7.8 shows one Prime Number Eccentric Magic Square for some of the occurring Magic Sums.
14.6.7 Composed Magic Squares (8 x 8) The order 8 Magic Square shown below, with magic Sum s1, is composed out of:
Based on this definition a dedicated procedure (ref. Priem8g2) can be used:
Attachment 14.6.32 shows for miscellaneous Magic Sums the first occurring Prime Number Composed Magic Square.
14.6.8 Pan Magic Squares (8 x 8), Composed of Pan Magic Sub Squares (4 x 4)
For Compact Pan Magic Squares of order 8 composed of Pan Magic Sub Squares of order 4, known as
Most Perfect Franklin Pan Magic Squares, also the Bent Diagonals sum to the Magic Sum.
a(61) = 0.50 * s1  a(62)  a(63)  a(64) a(58) =  a(60) + a(62) + a(64) a(57) = 0.50 * s1  a(59)  a(62)  a(64) a(55) = 0.50 * s1  a(56)  a(63)  a(64) a(54) = a(56)  a(62) + a(64) a(53) =  a(56) + a(62) + a(63) a(52) = a(56)  a(60) + a(64) a(51) = 0.50 * s1  a(56)  a(59)  a(64) a(50) = a(56) + a(60)  a(62) a(49) =  a(56) + a(59) + a(62) a(48) = 0.25 * s1  a(62) a(47) = 0.25 * s1 + a(62) + a(63) + a(64) a(46) = 0.25 * s1  a(64) a(45) = 0.25 * s1  a(63) a(44) = 0.25 * s1 + a(60)  a(62)  a(64) a(43) = 0.25 * s1 + a(59) + a(62) + a(64) a(42) = 0.25 * s1  a(60) a(41) = 0.25 * s1  a(59) a(40) = 0.25 * s1  a(56) + a(62)  a(64) a(39) = 0.25 * s1 + a(56)  a(62)  a(63) a(38) = 0.25 * s1  a(56) a(37) = 0.25 * s1 + a(56) + a(63) + a(64) a(36) = 0.25 * s1  a(56)  a(60) + a(62) a(35) = 0.25 * s1 + a(56)  a(59)  a(62) a(34) = 0.25 * s1  a(56) + a(60)  a(64) a(33) = 0.25 * s1 + a(56) + a(59) + a(64) a(31) =  a(32) + a(63) + a(64) a(30) = a(32) + a(62)  a(64) a(29) = 0.50 * s1  a(32)  a(62)  a(63) a(28) = a(32) + a(60)  a(64) a(27) =  a(32) + a(59) + a(64) a(26) = a(32)  a(60) + a(62) a(25) = 0.50 * s1  a(32)  a(59)  a(62) a(23) = 0.50 * s1  a(24)  a(63)  a(64) a(22) = a(24)  a(62) + a(64) a(21) =  a(24) + a(62) + a(63) a(20) = a(24)  a(60) + a(64) a(19) = 0.50 * s1  a(24)  a(59)  a(64) a(18) = a(24) + a(60)  a(62) a(17) =  a(24) + a(59) + a(62) a(16) = 0.25 * s1  a(32)  a(62) + a(64) a(15) = 0.25 * s1 + a(32) + a(62) + a(63) a(14) = 0.25 * s1  a(32) a(13) = 0.25 * s1 + a(32)  a(63)  a(64) a(12) = 0.25 * s1  a(32) + a(60)  a(62) a(11) = 0.25 * s1 + a(32) + a(59) + a(62) a(10) = 0.25 * s1  a(32)  a(60) + a(64) a( 9) = 0.25 * s1 + a(32)  a(59)  a(64) a( 8) = 0.25 * s1  a(24) + a(62)  a(64) a( 7) = 0.25 * s1 + a(24)  a(62)  a(63) a( 6) = 0.25 * s1  a(24) a( 5) = 0.25 * s1 + a(24) + a(63) + a(64) a( 4) = 0.25 * s1  a(24)  a(60) + a(62) a( 3) = 0.25 * s1 + a(24)  a(59)  a(62) a( 2) = 0.25 * s1  a(24) + a(60)  a(64) a( 1) = 0.25 * s1 + a(24) + a(59) + a(64)
a routine can be written to generate Prime Number Most Perfect Franklin Pan Magic Squares of order 8 (ref. Priem8b).
14.6.9 Most Perfect Pan Magic Squares (8 x 8)
The first Most Perfect Pan Magic Square of Prime Numbers occurs for MC = 24024, which was found by Natalia Makarova (June 01, 2015).
a(59) = 0.50 * s1  a(60)  a(63)  a(64) a(58) = a(60)  a(62) + a(64) a(57) = 0.50 * s1  a(60)  a(61)  a(64) a(55) = 0.50 * s1  a(56)  a(63)  a(64) a(54) = a(56)  a(62) + a(64) a(53) = 0.50 * s1  a(56)  a(61)  a(64) a(52) = a(56)  a(60) + a(64) a(51) =  a(56) + a(60) + a(63) a(50) = a(56)  a(60) + a(62) a(49) =  a(56) + a(60) + a(61) a(47) =  a(48) + a(63) + a(64) a(46) = a(48) + a(62)  a(64) a(45) =  a(48) + a(61) + a(64) a(44) = a(48) + a(60)  a(64) a(43) = 0.50 * s1  a(48)  a(60)  a(63) a(42) = a(48) + a(60)  a(62) a(41) = 0.50 * s1  a(48)  a(60)  a(61) a(39) = 0.50 * s1  a(40)  a(63)  a(64) a(38) = a(40)  a(62) + a(64) a(37) = 0.50 * s1  a(40)  a(61)  a(64) a(36) = a(40)  a(60) + a(64) a(35) =  a(40) + a(60) + a(63) a(34) = a(40)  a(60) + a(62) a(33) =  a(40) + a(60) + a(61) a(32) = 0.25 * s1  a(60) a(31) = 0.25 * s1 + a(60) + a(63) + a(64) a(30) = 0.25 * s1  a(60) + a(62)  a(64) a(29) = 0.25 * s1 + a(60) + a(61) + a(64) a(28) = 0.25 * s1  a(64) a(27) = 0.25 * s1  a(63) a(26) = 0.25 * s1  a(62) a(25) = 0.25 * s1  a(61) a(24) = 0.25 * s1  a(56) + a(60)  a(64) a(23) = 0.25 * s1 + a(56)  a(60)  a(63) a(22) = 0.25 * s1  a(56) + a(60)  a(62) a(21) = 0.25 * s1 + a(56)  a(60)  a(61) a(20) = 0.25 * s1  a(56) a(19) = 0.25 * s1 + a(56) + a(63) + a(64) a(18) = 0.25 * s1  a(56) + a(62)  a(64) a(17) = 0.25 * s1 + a(56) + a(61) + a(64) a(16) = 0.25 * s1  a(48)  a(60) + a(64) a(15) = 0.25 * s1 + a(48) + a(60) + a(63) a(14) = 0.25 * s1  a(48)  a(60) + a(62) a(13) = 0.25 * s1 + a(48) + a(60) + a(61) a(12) = 0.25 * s1  a(48) a(11) = 0.25 * s1 + a(48)  a(63)  a(64) a(10) = 0.25 * s1  a(48)  a(62) + a(64) a( 9) = 0.25 * s1 + a(48)  a(61)  a(64) a( 8) = 0.25 * s1  a(40) + a(60)  a(64) a( 7) = 0.25 * s1 + a(40)  a(60)  a(63) a( 6) = 0.25 * s1  a(40) + a(60)  a(62) a( 5) = 0.25 * s1 + a(40)  a(60)  a(61) a( 4) = 0.25 * s1  a(40) a( 3) = 0.25 * s1 + a(40) + a(63) + a(64) a( 2) = 0.25 * s1  a(40) + a(62)  a(64) a( 1) = 0.25 * s1 + a(40) + a(61) + a(64)
a routine can be written to generate Prime Number Most Perfect Pan Magic Squares of order 8 (ref. Priem8c).
14.6.10 Associated Magic Squares (8 x 8)
Prime Number Associated Magic Squares can be either generated based on the defining formula's (quite slow) or constructed based on:
Attachment 14.6.6a shows miscellaneous Prime Number Associated Magic Squares, composed out of 4 x 4 Compact Sub Squares, based on Most Perfect Pan Magic Squares with the corresponding Magic Sum.
A few examples of Prime Number Associated Magic Squares, based on Prime Number Associated Magic Cubes of half the Magic Sum, are summarized in following table: 
Associated Magic Square
Based on Associated Magic Cube
Attachment
Characteristic
Ref.
Attachment
Characteristic


Magic Sub Squares

3D Compact
Horizontal Magic Planes
Typical for these cube based squares is that the half rows, the half columns and
the corner points of all 5 x 5 sub squares sum to half the Magic Sum.
14.6.11 Ultra Magic Squares (8 x 8) Based on the equations defining Ultra Magic Squares, with the half rows and columns summing to half the Magic Sum and composed out of 16 Non Overlapping Sub Squares (2 x 2): a(61) = s1/2  a(62)  a(63)  a(64) a(57) = s1/2  a(58)  a(59)  a(60) a(55) = s1/2  a(56)  a(63)  a(64) a(54) = a(56)  a(62) + a(64) a(53) =  a(56) + a(62) + a(63) a(51) = s1/2  a(52)  a(59)  a(60) a(50) = a(52)  a(58) + a(60) a(49) =  a(52) + a(58) + a(59) a(47) =  a(48) + a(63) + a(64) a(45) = s1/2  a(46)  a(63)  a(64) a(44) = a(48)  a(52) + a(56) + a(58) + a(59)  a(62)  a(63) a(43) =  a(48) + a(52)  a(56)  a(58) + a(60) + a(62) + a(63) a(42) = a(46)  a(52) + a(56)  a(59)  a(60) + a(63) + a(64) a(41) = s1/2  a(46) + a(52)  a(56)  a(63)  a(64) a(40) = s1/2  a(48)  a(56)  a(64) a(39) = a(48) + a(56)  a(63) a(38) = s1/2  a(46)  a(56)  a(64) a(37) = s1/2 + a(46) + a(56) + a(63) + 2 * a(64) a(36) = s1/2  a(48)  a(56)  a(58)  a(59)  a(60) + a(62) + a(63) a(35) = a(48) + a(56) + a(58)  a(62)  a(63) a(34) = s1/2  a(46)  a(56) + a(59)  a(63)  a(64) a(33) = s1/2 + a(46) + a(56) + a(60) + a(63) + a(64)
a routine can be written to generate subject Prime Number Ultra Magic Squares of order 8 (ref. Priem8d).
14.6.12 Inlaid Magic Squares (8 x 8) The 8^{th} order Inlaid Magic Square shown below, is composed out of an Associated Border and four each 3^{th} order Magic Center Squares with Magic Sums s(1), s(2), s(3) and s(4).
The relation between the Magic Sums s(1), s(2), s(3) and s(4) is: s(1) = 3 * s8 / 4  s(4) s(2) = 3 * s8 / 4  s(3)
With s8 the Magic Sum of the 8^{th} order Inlaid Magic Square.
a(60) = a(61)  s(3) + s(4) a(59) = a(62)  s(3) + s(4) a(58) = a(63)  s(3) + s(4) a(57) = s8  2*a(61)  2*a(62)  2*a(63)  a(64) + 3*s(3)  3*s(4) a(41) = s8  a(48)  s(3)  s(4) a(40) = 2 * s8  a(48)  a(56)  a(61)  a(62)  a(63)  a(64)  3*s(4) a(33) = s8  a(40)  s(3)  s(4) a(32) = s8/4  a(33) a(25) =  s8/2  a(32) + s(3) + s(4) a(24) = 3 * s8/4 + a(48) + s(3) + s(4) a(17) = s8/4  a(48) a(16) = 3 * s8/4 + a(56) + s(3) + s(4) a( 9) = s8/4  a(56) a( 8) = s8/4  a(57) a( 7) = s8/4  a(63) + s(3)  s(4) a( 6) = s8/4  a(62) + s(3)  s(4) a( 5) = s8/4  a(61) + s(3)  s(4) a( 4) = s8/4  a(61) a( 3) = s8/4  a(62) a( 2) = s8/4  a(63) a( 1) = s8/4  a(64) a procedure can be developed
Attachment 14.6.40
shows for miscellaneous Magic Sums the first occurring Prime Number Inlaid Magic Square of order 8.
The obtained results regarding the miscellaneous types of order 8 Prime Number Magic Squares as deducted and discussed in previous sections are summarized in following table: 
Type
Characteristics
Subroutine
Results
Composed
Sets of Pan Magic Sub Squares
Miscellaneous Magic ConstantsCube Based

Concentric

Bordered
Miscellaneous Types
Eccentric
Split Border Lines
Composed
Non Symmetric Corner Square
Most Perfect
Franklin, Pan Magic
Pan Magic, Compact, Complete
Associated
Most Perfect Pan Magic Square Based
Associated Magic Cube Based
Ultra Magic
Non Overlapping Sub Squares
Inlaid
Sub Squares with Different Magic Sums
Comparable routines as listed above, can be used to generate Prime Number Magic Squares of order 8, as described in Part II of this Chapter.

Index  About the Author 