16.3 Prime Numbers, Sum of Squares
16.3.1 Magic Squares (4 x 4)
In another article Christian Boyer mentions an interesting method to construct Prime Number Magic Squares, using sums of squares, as published by André Gérardin early 1916 (SphinxOedipe).
The elements of two latin squares A1 (MC = 50) and B1 (MC = 120), with latin main diagoanls, result in a Prime Number Magic Square C (MC = 7588)
with elements
c_{i} = a_{i}^{2} + b_{i}^{2},
i = 1 ... 16 (ref. Attachment 16.3.1).
The key to possible solutions is to find Correlated Magic Lines {a_{i}, i = 1 ... 4} and {b_{j}, j = 1 ... 4} such that
c_{ij} = a_{i}^{2} + b_{j}^{2} (i,j = 1 ... 4) are distinct prime numbers (16 ea).
Attachment 16.3.2 shows Correlated Magic Lines for a_{i}, b_{j} = 1 ... 58 (i,j = 1 ... 4) and the related Magic Sums of {a_{i}}, {b_{i}}, {a_{i}^{2}}, {b_{i}^{2}} and {a_{i}^{2} + b_{i}^{2}}, i = 1 ... 4.
Attachment 16.3.3 shows the resulting unique Prime Number Magic Squares (68 ea) with the related Magic Sums. Each square shown corresponds with 1152 Prime Number Magic Squares.
Although the construction method described above does not return 4^{th} order Prime Number Pan Magic Squares,
such squares can be generated based on the occurring Prime Numbers for a_{i}, b_{j} = 1 ... 58.
Attachment 16.3.4 shows for the applicable variable ranges {c_{i}} and related Magic Sums the first occurring Prime Number Pan Magic Square (297 ea). Each square shown corresponds with 384 Prime Number Pan Magic Squares.
16.3.2 Pan Magic Squares (5 x 5)
The same method can be used to construct Prime Number (Pan) Magic Squares of order 5 (ref. Attachment 16.3.1).
The key to possible solutions is now to find Correlated Magic Lines {a_{i}, i = 1 ... 5} and {b_{j}, j = 1 ... 5} such that c_{ij} = a_{i}^{2} + b_{j}^{2} (i,j = 1 ... 5) are distinct prime numbers (25 ea).
Attachment 16.3.5 shows Correlated Magic Lines for a_{i}, b_{j} = 1 ... 115 (i,j = 1 ... 5) and the related Magic Sums of {a_{i}}, {b_{i}}, {a_{i}^{2}}, {b_{i}^{2}} and {a_{i}^{2} + b_{i}^{2}}, i = 1 ... 5.
Attachment 16.3.6 shows the resulting unique Prime Number Pan Magic Squares (48 ea) with the related Magic Sums. Each square shown corresponds with 28800 Prime Number Pan Magic Squares.
16.3.3 Pan Magic Squares (7 x 7)
The same method can be used to construct Prime Number (Pan) Magic Squares of order 7 (ref. Attachment 16.3.1).
Correlated Magic Lines {a_{i}, i = 1 ... 7} and {b_{j}, j = 1 ... 7} should be found such that c_{ij} = a_{i}^{2} + b_{j}^{2} (i,j = 1 ... 7) are distinct prime numbers (49 ea).
Attachment 16.3.7 shows Correlated Magic Lines for a_{i}, b_{j} = 1 ... 550 (i,j = 1 ... 7) and the related Magic Sums of {a_{i}}, {b_{i}}, {a_{i}^{2}}, {b_{i}^{2}} and {a_{i}^{2} + b_{i}^{2}}, i = 1 ... 7.
Attachment 16.3.8 shows the resulting unique Prime Number Pan Magic Squares (48 ea) with the related Magic Sums. Each square shown corresponds with 304.819.200 Prime Number Pan Magic Squares.
16.3.4 Magic Squares (8 x 8)
The same method can be used to construct Prime Number Magic Squares of order 8 (ref. Attachment 16.3.1).
Correlated Magic Lines {a_{i}, i = 1 ... 8} and {b_{j}, j = 1 ... 8} should be found such that c_{ij} = a_{i}^{2} + b_{j}^{2} (i,j = 1 ... 8) are distinct prime numbers (64 ea).
Attachment 16.3.9 shows some Correlated Magic Lines for a_{i}, b_{j} = 1 ... 1500 (i,j = 1 ... 8) and the related Magic Sums of {a_{i}}, {b_{i}}, {a_{i}^{2}}, {b_{i}^{2}} and {a_{i}^{2} + b_{i}^{2}}, i = 1 ... 8.
Attachment 16.3.10 shows the resulting unique Prime Number Magic Squares (16 ea) with the related Magic Sums. Each square shown corresponds with numerous Prime Number Magic Squares.
16.3.5 Summary
The obtained results regarding the miscellaneous types of Prime Number Magic Squares,
as constructed and discussed in previous sections are summarized in following table:
