Verifying a magic square

Question Q6.1.9

Verify that the magic square created in Example E6.2 satisfies the conditions that it contains the numbers 1 to $N^2$ and that its rows, columns and main diagonals sum to $N(N^2+1)/2$.


Solution Q6.1.9