In a 4x4 magic square all rows, columns and the two main diagonals are distinct 4-digit prime numbers when read in either direction.
Create such a square.
Bonus (d4): same for order-5 magic square and 5-digit primes.
L. E. Card,Patterns in Primes, JRM 1:2, 1968, pp .93-99,
I had been working on a problem when this was posted for review. I was surprised at how little I had to change my listing to resolve this.
The final output was 8 solutions but upon examination those were in fact rotations and reflections of just one.
My solution has 4x1, 1x2, 4x3, 2x5,1x7, 1x8 and 3x9.
(I trust my listing was correct).
I can't get anywhere with the 5-order as my QBasic won't compile to C++ under QB64
Edited on January 13, 2012, 7:19 pm
Posted by brianjn
on 2012-01-13 19:03:16