In a 4x4 magic square all rows, columns and the two main diagonals are distinct 4digit prime numbers when read in either direction.
Create such a square.
Bonus (d4): same for order5 magic square and 5digit primes.
Based on
L. E. Card,Patterns in Primes, JRM 1:2, 1968, pp .9399,
(In reply to
re(3): From the computer semispoiler by Charlie)
I saw this only after responding to your email in which I did make a note that I had implemented the square root concept, but I hadn't gone further.
The SUB primetest code was an abridgement of code offered @ http://javascriptsource.com/mathrelated/primenumber.html
which did test everything.

Posted by brianjn
on 20120121 20:39:19 