# Sum of Terms of Magic Square

## Theorem

The total of all the entries in a magic square of order $n$ is given by:

$T_n = \dfrac {n^2 \paren {n^2 + 1} } 2$

## Proof

Let $M_n$ denote a magic square of order $n$.

$M_n$ is by definition a square matrix of order $n$ containing the positive integers from $1$ upwards.

Thus there are $n^2$ entries in $M_n$, going from $1$ to $n^2$.

Thus:

 $\displaystyle T_n$ $=$ $\displaystyle \sum_{k \mathop = 1}^{n^2} k$ $\displaystyle$ $=$ $\displaystyle \frac {n^2 \paren {n^2 + 1} } 2$ Closed Form for Triangular Numbers

$\blacksquare$

### Sequence

The sequence of the sum totals of all the entries in magic squares of order $n$ begins:

$1, \paren {10,} \, 45, 136, 325, 666, 1225, 2080, 3321, 5050, 7381, 10 \, 440, 14 \, 365, 19 \, 306, 25 \, 425, 32 \, 896, \ldots$

However, note that while $10 = \dfrac {2^2 \paren {2^2 + 1} } 2$, a magic square of order $2$ does not actually exist.