Here's a 4 by 4 square:
-8 |
6 |
5 |
-5 |
3 |
-3 |
-2 |
0 |
-1 |
1 |
2 |
-4 |
4 |
-6 |
-7 |
7 |
METHOD
There's a formula for determining how big the magic square has to be in order to satisfy the condition that the constant sum is -2. This formula also determines the range of consecutive numbers to be used to fill the square. To derive this formula we start with a series of consecutive numbers starting with a:
a, a+1, a+2, a+3, ... If there are p terms the sum of the series is pa+(0+1+2+3+...).
We can write this as pa+0+1+2+...+(p-2)+(p-1) = pa+[(0+p-1)+(1+p-2)+(2+p-3)+...]
So by taking pairs of terms, we have a constant sum=p-1, and we have p/2 of these because we have paired the parenthesised terms (in square brackets). So the sum S is pa+p(p-1)/2.
Now, in a number square with n numbers per side, p=n2, S=n2a+n2(n2-1)/2. But S is also the sum of the row sums. If the row sums are equal, then ns=S, where s is the constant row sum:
ns=n2a+n2(n2-1)/2, s=na+n(n2-1)/2.
When s=-2, na+n(n2-1)/2=-2.
When n=4, this is: 4a+30=-2, so a=-8, and the numbers -8, -7, ..., 6, 7 make up the range of numbers to be fitted into a 4 by 4 magic square. The next step is to find out where they all fit so as to make row, column and diagonal sum to -2.
We start by writing -8 in the top left cell of the square, and adding on 1 as we move to the right we come to -5 in the top right cell. We are now going to fill cells in the square diagonals only as we go from row to row. So we have:
top row corners: -8 and -5; second row: -3 and -2, third row: 1 and 2 (central pair); bottom row corners 4 and 7.
Counting backwards from 7 we fill in cells left to right, top to bottom, with unused numbers, to give us the magic square.