|
Given a magic square, magic cube, etc., the sum of any row, column or diagonal is called the magic constant of that magic square, cube, etc.
In the case of a standard $n \times n$ magic square that uses the integers from 1 to $n^2$ the magic constant is $$\frac{1}{n}\sum_{i = 1}^{n^2} i,$$ while that for a magic cube is $$\frac{1}{n^2}\sum_{i = 1}^{n^3} i.$$ We can then generalize to higher dimensions $d$ thus: $$\frac{1}{n^{d - 1}}\sum_{i = 1}^{n^d} i.$$
So, for dimension $d$ the magic constant is $\frac{n(n^d + 1)}{2}$ For instance, a Franklin magic square ($n = 8,d = 2$ has magic constant $\frac{8(8^2 + 1)}{2} = 260$
In a trivial sense, an $n \times n$ sudoku puzzle has a magic constant of $n^2$
|