Magic sum

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

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:

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

With this result it is easy to calculate the magic sum

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.

magisches Quadrat der Ordnung 8