0

How can I find all the different possibilities for the sum of rows/columns/diagonals for a $4\times4$ magic square? I am not sure how to proceed, except by brute force, which is entirely inelegant.

I should mention that I am looking at a $4\times 4$ magic square with symbols from $0$ to $15$ inclusive.

MJD
  • 65,394
  • 39
  • 298
  • 580
  • Do you really mean that you want the possibilities for the sum of the rows? If a magic square contains the integers 1–16, then there is only one possibility, namely $\frac14(1+\ldots+16) = 34$; if the square is allowed to contain any positive integers, then any sum is possible. And do you mean a magic square, or a Latin square? They are not the same thing. – MJD Jul 18 '12 at 22:08
  • See the edit on the question. As I said I could not find he magic square tag. – Xuan Huang Jul 18 '12 at 22:34
  • Also how might we go about proving that 34 is the only possibility? – Xuan Huang Jul 18 '12 at 22:38
  • The numbers from 0 to 15 add up to 120. In a magic square, all the rows have the same sum. The four row sums must add up to that 120, so each must be 30. As noted, a Latin square is an entirely different thing. – Gerry Myerson Jul 18 '12 at 22:52
  • @DanielleHuang Count the same thing two different ways: if the row sum is $r$, then the sum of all the entries in the square must be the sum of row 1, row 2, row 3, and row 4: $r+r+r+r=4r$. Meanwhile, if the square contains each of the numbers from 0 through 15 (or 1 through 16) exactly once, then the sum of all the entries is... – Steven Stadnicki Jul 18 '12 at 22:53

1 Answers1

1

There is only 1 possible sum : What are the possible sums of an $n \times n$ magic square? That sum would be 30 in a 4x4 magic square with numbers 0-15

EX:

| 0 | 7 |11|12|

|13|10| 6 | 1 |

|14| 9 | 5 | 2 |

| 3 | 4 | 8 |15|

Eric Lee
  • 929