Find a 3x3 magic square that is composed of 9 prime numbers (not the numbers from 1-9) and show how you found it.
(A magic square, as you may already know, is one in which the respective sums of the numbers in all the rows, columns, and both major diagonals all add up to the same number.)
Since "Magic Square" is a term used outside the scope of this problem, I'm sure you can find an answer on the internet. Please find a solution independently.
(In reply to re: More Solutions
I found the first two by hand using the matrix equation from my first post. The other three were found using a computer program searching all primes up to 300. I got lucky when I found the twin prime squares.
Extending the algorithm found 159 prime magic squares with all entries less than 1000. If the number 1 is included, there are four more.
After modifying the algorithm slightly, I found that there were 15,858 solutions with all entries less than 10,000. There are 41 more solutions when 1 is included.
The program I used is below. It is written for UBASIC 8.74. P is the largest prime in a solution, and B and C are solution parameters:
Solution generated by p,b,c
[P -6B-12C P P-12B -6C]
[P-12B P -6B -6C P -12C]
[P -6C P-12B-12C P- 6B ]
40 while P<Limit
60 for Bcsum=3 to Bcmax
70 for B=2 to (Bcsum-1)
85 if C>=B then 190
90 if not fnIsPrime(P-6*B) then 190
100 if not fnIsPrime(P-12*B) then 190
110 if not fnIsPrime(P-6*C) then 190
120 if not fnIsPrime(P-12*C) then 190
130 if not fnIsPrime(P-6*B-6*C) then 190
140 if not fnIsPrime(P-12*B-6*C) then 190
150 if not fnIsPrime(P-6*B-12*C) then 190
160 if not fnIsPrime(P-12*B-12*C) then 190
170 if B=(2*C) then 190
180 print P,B,C,
184 if (P-12*B-12*C)>1 then 189
186 print "*";
189 print " "
190 next B
200 next Bcsum
225 print Solutions,One
340 if nxtprm(Number-1)-Number=0 then Returnvalue=1
345 if Number=1 then Returnvalue=1