Can you fill a 4x4 grid with every number from 1 to 16, such that every row, every column and every 2x2 sub-grid of numbers sum to the same value?
3 Answers
$\begingroup$
$\endgroup$
2
Solution:
1 15 2 16 14 4 13 3 7 9 8 10 12 6 11 5
Notes:
A B C D E F G H I J K L M N O P
Must have
A+B = G+H = I+J = O+P
C+D = E+F = K+L = M+N
A+E = J+N = C+G = L+P
I+M = B+F = K+O = D+H
B+C = J+K = E+H = M+P
F+G = N+O = A+D = I+L
E+I = G+K = B+N = D+P
F+J = H+L = A+M = C+O
which are enough constraints to make it manageable by trial and error.
-
-
$\begingroup$ For more information on this topic see this: en.wikipedia.org/wiki/Most-perfect_magic_square $\endgroup$ Commented Apr 8, 2021 at 3:04
$\begingroup$
$\endgroup$
2
This one has a kind of rhythm I find cool:
1 | 16 | 2 | 15 |
14 | 3 | 13 | 4 |
12 | 5 | 11 | 6 |
7 | 10 | 8 | 9 |
-
1$\begingroup$ The central 2x2 appears to sum to 32 only. $\endgroup$ Commented Apr 6, 2021 at 17:22
-
$\begingroup$ @loopywalt thats correct, my mistake, I forgot to consider this one. It appears that exchanging rows 3 and 4 fixes it. Then it is interesting to note that it gives a solution similar to yours but with columns 2 and 4 exchanged. So it seems there are not plenty of solutions... $\endgroup$– FredCommented Apr 12, 2021 at 15:05
$\begingroup$
$\endgroup$
2
1 | 16 | 5 | 12 |
8 | 9 | 4 | 13 |
3 | 14 | 7 | 10 |
15 | 2 | 11 | 6 |
Each 2x2 square should be (largest + smallest) * 4 / 2. In this case that would be 34.
-
6$\begingroup$ You forgot the columns, they don't add up properly. $\endgroup$ Commented Apr 6, 2021 at 14:22
-
$\begingroup$ Ah yes, I didn't notice that. $\endgroup$ Commented Apr 7, 2021 at 2:25