Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

#1) Create a 3x3 square of single digits 1 through 9 such that all 3 rows add up to a prime number and all 3 columns add up to a prime number.

#2a) How many unique ways can you do this type of square for? Unique means that the numbers being added in the 3 rows and 3 columns are different, so just rearranging the same square is no good. I don't have the answer to this question.

#2b) Is it possible to make a square like this where the rows, columns AND diagonals all add up to a prime number? I believe it's not, but haven't been able to prove it yet. Obviously, the answer to #2a would provide the answer to #2b. So, I don't have the answer to this one either yet. I'm close though, but figured I'd let you all figure it out if you could beat me to it.

Edited by rhapsodize
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I don't know whether there is any restriction to use the same number twice. However I came up with the following answer. I think that way there are numerous ways to solve this problem.

Answer:

1 2 8

9 6 2

3 5 9

Link to comment
Share on other sites

  • 0

These is nice twist on magic squares :) I cheated and brute forced it. Would love to see someone get it with logic or math though...

1152 non-unique solutions divide by 3 for column shifts, 3 for row shifts, 4 for rotations, 4 for reflection over axis. gives 8 unique solutions.

and 0 with row/col/dia = prime

All Solutions: magics.txt

Link to comment
Share on other sites

  • 0
These is nice twist on magic squares :) I cheated and brute forced it. Would love to see someone get it with logic or math though...

Here's what I have. I'd hope there was a simpler way than brute force computer program or what I have, but I haven't got it.

Your magic square, if all rows, columns and diagonals add up to a prime number, must obviously all add up to an odd number. 3 numbers add up to an odd number if all 3 are odd (O+O+O) or if exactly one is odd (E+E+O or E+O+E or O+E+E).

The only way you could even possibly configure a 3x3 square like this with the digits 1-9 is if it looked like this:

EOE

OOO

EOE

With both diagonals going E+O+E, there is only so many possibilities that give you diagonals that add to primes.

---With 1, 3, 7, and 9 in the middle, the 2 and 8 must be in opposite corners, and the 4 and the 6 must be in opposite corners. With 5 in the middle, it's the opposite, where 2 and 8 cannot be in opposite corners, and neither can 4 and 6.

So, let's look at 1, 3, 7 and 9 first, which means those numbers (2,8 and 4,6) are in opposite corners.

---With 1 in the middle, the only way to have O+O+O in your middle row/column to give you primes contradicts primes with E+O+E in the other 4 rows/columns. (3,1,9 and 5,1,7 give impossible ways for the outside)

---With 3 in the middle, the only way to have O+O+O in your middle row/column to give you primes contradicts primes with E+O+E in the other 4 rows/columns. (1,3,7 and 5,3,9 give impossible ways for the outside)

---With 7 in the middle, the only way to have O+O+O in your middle row/column to give you primes contradicts primes with E+O+E in the other 4 rows/columns. (1,7,5 and 3,7,9 give impossible ways for the outside)

---With 9 in the middle, the only way to have O+O+O in your middle row/column to give you primes contradicts primes with E+O+E in the other 4 rows/columns. (1,9,7 and 3,9,5 give impossible ways for the outside)

So, the only possibility left is 5 in the middle.

---With 5 in the middle, the only possible way to do O+O+O in your middle row/column to give your primes would be 1, 5, 7 and 3,5,9. There's no way to have this one either. If the 2 is across from the 6 or the 8, it doesn't work.

Therefore, there are no possibilities.

I wish I could easily post my scratch work up here, but unless anyone really challenges me on it, I'm not going into more detail. Basically, the scratch work I did shows that no matter how you configure the evens, you really need 1's or 7's across from 3's or 9's, and none of the O+O+O ways ever gives you that option.

Thanks Acacia, for giving the confidence to prove there were no solutions once I knew there was no solutions!

Link to comment
Share on other sites

  • 0

YEp that's what I got to for 2b as well but it was so much scratch work crossing off the possible combos I didn't bother trying to explain it lol. 2a would take forever to prove :\

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...