PDA

View Full Version : OT - Prime square puzzle


Brillig
03-12-2003, 12:01 PM
Most of us are familiar with the concept of magic squares: the arrangement of the numbers from 1 to n^2 into a square such that the sum of the numbers on each row and each main diagonal is equal to the same number. E.g., a 3x3 magic square is



2 9 4
7 5 3
6 1 8



A concept I've been twiddling with lately is that of prime squares: the arrangement of the numbers from 1 to n^2 into a square such that the sum of the numbers on each row and each main diagonal is a prime number.

For n=1 and n=2, it is trivial to prove that a prime square does not exist. (1 is not a prime number). I think that I have a proof that n=3 is not possible as well.

I have, however, constructed a prime square of size 4. Can you?

Bee
03-12-2003, 12:42 PM
7 8 3 16
15 9 6 4
2 5 14 13
10 12 11 1

Anrhydeddu
03-12-2003, 12:47 PM
34 is a prime number?

Bee
03-12-2003, 12:51 PM
Did I misunderstand? I thought the diagonals had to be a prime number, but the rest was supposed to be a normal magic square.

SplitPersonality1
03-12-2003, 01:04 PM
edit: false alarm

cool puzzle Brillig. Have you solved 5x5 yet?


re-edit: got it


3 7 9 10
5 4 13 15
1 6 8 2
14 12 11 16

Aylmar
03-12-2003, 01:06 PM
Response to false alarm. :)

Brillig
03-12-2003, 01:07 PM
Sorry if I was unclear, Bee - all the columns and rows are supposed to add up to prime numbers.

Sp1, nope, haven't even started yet :)

Bee
03-12-2003, 01:22 PM
ok. If I understand it correctly this time...:D

is this correct?


1 2 5 11
6 4 7 12
9 8 10 14
13 3 15 16

Vince
03-12-2003, 01:25 PM
39 isn't prime...11+7+8+13 on the upper right to lower left diagonal.

Bee
03-12-2003, 01:38 PM
Originally posted by Vince
39 isn't prime...11+7+8+13 on the upper right to lower left diagonal.

you sure that doesn't add up to 37? ;)

Brillig
03-12-2003, 01:40 PM
SP1's looks good to me - it's different from mine, but I expected multiple solutions anyway.

5x5 wasn't that difficult at all, I think these are actually easier the bigger the matrix gets...

Bee
03-12-2003, 01:42 PM
I got the same one that SP1 has, but he beat me to it. :(

Anrhydeddu
03-12-2003, 01:43 PM
Originally posted by Bee
you sure that doesn't add up to 37? ;)

Pretty sure (one of my very favorite movie lines).

SplitPersonality1
03-12-2003, 01:43 PM
Originally posted by Brillig
SP1's looks good to me - it's different from mine, but I expected multiple solutions anyway.

5x5 wasn't that difficult at all, I think these are actually easier the bigger the matrix gets...

I agree and was about to post the same thing. I found a solution for 5x5 in about four minutes.