Magic sum

This constant sum, the so-called magic sum is given by

math2

This means that n2 numbers are placed in a grid with n rows and n columns. There is a wellknown formula for the sum of first n consecutive numbers:

math3

If we now add up to n2, this formula will change to

math4

With this result it is easy to calculate the magic sum

math5

The following table shows some magic sums:

nM(n)
315
434
565
6111

For a magic square of order n=8 we will get therefore M(8)=260.

magic square of order 8