Recall that in a normal 3x3 magic square, the value of each row, column, and diagonal is 15:
In a 3x3 magic square, the highest number in the puzzle sequence is 9, or 32.
Similarly, the highest number in a 4x4 magic square is 16, or 42.
Therefore, in an nxn magic square, the highest number in the puzzle sequence is n2.
Recall the formula for the sum of the first k integers:
Now let k = n2, which is the highest value in the puzzle sequence
This equals the sum of all of the numbers 1, 2, 3,..., n2, which are used in an nxn magic square.
To find the value of each row, column, and diagonal, divide this sum by the total number of rows or columns
(as in the 3x3 magic square example)
This is the sum of all the numbers in any given row, column, or diagonal in an nxn magic square.