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 4th order Prime Number Pan Magic Squares with Magic Sum s1.

 a(1) a(2) a(3) a(4) a(5) a(6) a(7) a(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15) a(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) a(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31) a(32) a(33) a(34) a(35) a(36) a(37) a(38) a(39) a(40) a(41) a(42) a(43) a(44) a(45) a(46) a(47) a(48) a(49) a(50) a(51) a(52) a(53) a(54) a(55) a(56) a(57) a(58) a(59) a(60) a(61) a(62) a(63) a(64)

In section 14.2, procedures were developed to generate 4th order Prime Number Pan Magic Squares with Magic Sum s1.

With some minor modifications subject procedures can be used to find a set of 4 (or more) Prime Number Pan Magic Squares with Magic Sum s1 - each containing 16 different Prime Numbers.

Attachment 14.5.1 contains such sets for MC = 1680 (4 ea), MC = 1800 (5 ea) and MC = 1980 (4 ea) which were found by means of procedure Priem4c for the first 170 Prime Numbers (2 ... 1013).

Each set of four squares can be arranged in 24 ways into an 8th order Prime Number Magic Square with Magic Sum 2 * s1 as shown in Attachment 14.5.2 for MC = 2 * 1680 = 3360.

Further we should realize that each Pan Magic Square of the 4th order, based on a set of 16 distinct integers, is a member of a collection of 384 Pan Magic Square of the 4th order (ref. Attachment 14.5.3).

Consequently, based on one single set of 4 Prime Number Pan Magic Squares of the 4th order as shown in Attachment 14.5.1, 24 * 3844 = 0,5 1012 Prime Number Magic Squares of the 8th order can be constructed.

Attachment 14.6.44 contains miscellaneous Prime Number Magic Squares composed of Pan Magic Sub Squares as generated with procedure Priem4c.

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 4th order can be generated, based on the distinct integers contained in the 4 Pan Magic Squares with MC = 1680.

So the total number of Magic Squares of the 8th order, which can be constructed based on the distinct integers contained in one single set of 4 Pan Magic Squares of the 4th order with MC = 1680 is 24 * 4672 * 42243 = 8,45 1015.

Other sets of Prime Number Pan Magic Squares of the 4th order will result in other numbers, however of the same order of magnitude.

Magic Squares composed out of 4 ea Magic Sub Squares and containing additional Embedded Magic Squares will be discussed in Section 14.6.15.

14.6.3 Magic Squares (8 x 8), Composed of (Pan) Magic Sub Squares (4 x 4)
Magic Cube Based

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'.

A few examples of Prime Number Composed Magic Squares, based on Prime Number Magic Cubes of half the Magic Sum, are summarized in following table:

 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 8th order Prime Number Concentric Magic Square consists of a Prime Number Concentric Magic Square of the 6th order, as discussed in Section 14.4.3, with a border around it.

The variable values {ai} on which a Prime Number Concentric Magic Square of the 8th order might be based should contain at least 32 pairs.

Based on the possible pairs for the first 251 Prime Numbers (2 ... 1597) the corresponding Magic Sums of the outer - and embedded squares (MC8 and MC6) can be determined.

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).

Attachment 14.5.4 shows one Prime Number Concentric Magic Square for some of the occurring Magic Sums, based on the 6th order Concentric Magic Squares as dicussed in Section 14.4.3.

More Prime Number Concentric Magic Squares of order 8 can be generated with routine Priem8a based on the collections of 6th order Magic Squares, as deducted in Section 14.4.2 and 14.4.4:

• Concentric Pan Magic Center Square       (ref. Attachment 14.6.21)
(Embedded Associated Square)

• Concentric Partly Compact Center Square  (ref. Attachment 14.6.22)
(Embedded Pan Magic Square)

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.

14.6.5 Bordered Magic Squares (8 x 8)
Miscellaneous Inlays

Based on the collections of 6th 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 {ai} and the related number of possible Center Squares.

It should be noted that the Attachments listed above contain only those solutions which could be found within 100 seconds.

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:

 a(1) a(2) a(3) a(4) a(5) a(6) a(7) a(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15) a(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) a(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31) a(32) a(33) a(34) a(35) a(36) a(37) a(38) a(39) a(40) a(41) a(42) a(43) a(44) a(45) a(46) a(47) a(48) a(49) a(50) a(51) a(52) a(53) a(54) a(55) a(56) a(57) a(58) a(59) a(60) a(61) a(62) a(63) a(64)

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.

Each square shown corresponds with numerous squares for the same Magic Sum.

14.6.7 Composed Magic Squares (8 x 8)
Non Symmetric Corner Square, Composed Rectangles

The order 8 Magic Square shown below, with magic Sum s1, is composed out of:

• One 3th order Simple Magic Corner Square with Magic Sum s3 = 3 * s1 / 8 (top/left)
• One 5th order Non Symmetric Magic Corner Square with Magic Sum s5 = 5 * s1 / 8 (bottom/right)
• Two Composed Magic Rectangles order 3 x 5 with s3 = 3 * s1 / 8 and s5 = 5 * s1 / 8
 a(1) a(2) a(3) a(4) a(5) a(6) a(7) a(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15) a(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) a(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31) a(32) a(33) a(34) a(35) a(36) a(37) a(38) a(39) a(40) a(41) a(42) a(43) a(44) a(45) a(46) a(47) a(48) a(49) a(50) a(51) a(52) a(53) a(54) a(55) a(56) a(57) a(58) a(59) a(60) a(61) a(62) a(63) a(64)

Based on this definition a dedicated procedure (ref. Priem8g2) can be used:

• to read the Border Square from a collection of previously generated 5th order Non Symmetric Magic Squares (ref. Attachment 14.3.12);
• to calculate, based on the remainder of the available pairs, the 3th order Magic Corner Square;
• to complete the Main Diagonal and determine related 3 x 3 Semi Magic Corner Squares (blue);
• to complete the Composed Magic Square of order 9 with the two remaining 2 x 3 Magic Rectangles.

Attachment 14.6.32 shows for miscellaneous Magic Sums the first occurring Prime Number Composed Magic Square.

Each square shown corresponds with numerous squares for the same Magic Sum.

14.6.8 Pan Magic Squares (8 x 8), Composed of Pan Magic Sub Squares (4 x 4)
Compact, Bent Diagonals

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.

Based on the equations defining Most Perfect Franklin Pan Magic Squares (8 x 8):

```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).

Subject routine applied on the variable range {ai} and related MC = 24024, as described in Section 14.6.9 below, counted 294912 (= 64 * 12 * 384) Prime Number Most Perfect Franklin Pan Magic Squares.

Attachment 14.5.7 shows for miscellaneous Magic Sums the first occurring Prime Number Most Perfect Franklin Pan Magic Squares of order 8.

Magic Squares based on the characteristics of the original Franklin Square, will be discussed in Section 14.6.17.

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).

Based on the equations defining Most Perfect Pan Magic Squarse (8 x 8):

```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).

Subject routine applied on the variable range {ai} and related MC = 24024, counted 294912 (= 64 * 12 * 384) Prime Number Most Perfect Pan Magic Squares.

Attachment 14.5.8 shows for miscellaneous Magic Sums the first occurring Prime Number Most Perfect Pan Magic Squares of order 8.

An alternative method to find subject solutions, based on the sum of suitable selected Latin Squares, will be discussed in Section 14.12.5 (ref. Attachment 14.8.1b).

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:

• Prime Number Most Perfect Pan Magic Squares as deducted in previous section (ref. Attachment 14.5.8);
• Prime Number Simple Associated Magic Cubes as deducted in the relevant sections of 'Magic Cubes'.

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.

Composed Pan Magic Squares based on Attachment 14.6.6d mentioned above, will be discussed in Section 14.6.16.

14.6.11 Ultra Magic Squares (8 x 8)
Non Overlapping Sub Squares

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(32) = s1/4 - a(33) a(31) = s1/4 - a(34) a(30) = s1/4 - a(35) a(29) = s1/4 - a(36) a(28) = s1/4 - a(37) a(27) = s1/4 - a(38) a(26) = s1/4 - a(39) a(25) = s1/4 - a(40) a(24) = s1/4 - a(41) a(23) = s1/4 - a(42) a(22) = s1/4 - a(43) a(21) = s1/4 - a(44) a(20) = s1/4 - a(45) a(19) = s1/4 - a(46) a(18) = s1/4 - a(47) a(17) = s1/4 - a(48) a(16) = s1/4 - a(49) a(15) = s1/4 - a(50) a(14) = s1/4 - a(51) a(13) = s1/4 - a(52) a(12) = s1/4 - a(53) a(11) = s1/4 - a(54) a(10) = s1/4 - a(55) a( 9) = s1/4 - a(56) a(8) = s1/4 - a(57) a(7) = s1/4 - a(58) a(6) = s1/4 - a(59) a(5) = s1/4 - a(60) a(4) = s1/4 - a(61) a(3) = s1/4 - a(62) a(2) = s1/4 - a(63) a(1) = s1/4 - a(64)

a routine can be written to generate subject Prime Number Ultra Magic Squares of order 8 (ref. Priem8d).

Attachment 14.6.8 shows for miscellaneous Magic Sums the first occurring Prime Number Ultra Magic Squares of order 8.

14.6.12 Inlaid Magic Squares (8 x 8)
Sub Squares with Different Magic Sums

The 8th order Inlaid Magic Square shown below, is composed out of an Associated Border and four each 3th order Magic Center Squares with Magic Sums s(1), s(2), s(3) and s(4).

 a(1) a(2) a(3) a(4) a(5) a(6) a(7) a(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15) a(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) a(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31) a(32) a(33) a(34) a(35) a(36) a(37) a(38) a(39) a(40) a(41) a(42) a(43) a(44) a(45) a(46) a(47) a(48) a(49) a(50) a(51) a(52) a(53) a(54) a(55) a(56) a(57) a(58) a(59) a(60) a(61) a(62) a(63) a(64)

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 8th order Inlaid Magic Square.

Based on the equations describing the Associated Border:

```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

• to collect previously generated Magic Squares of the third order (ref. Section 14.1.1) and
• to complete subject 8th order Prime Number Inlaid Magic Squares (ref. Priem8k).

Attachment 14.6.40 shows for miscellaneous Magic Sums the first occurring Prime Number Inlaid Magic Square of order 8.

More unique solutions per Magic Sum s8 are possible, by variation of the magic sums s(1) ... s(4).

Each square shown corresponds with numerous solutions, which can be obtained by rotation and reflection of the four inlays and variation of the border.

14.6.13 Summary

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 Constants Cube 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.