The magic constant or magic sum of a magic square is the sum of numbers in any row, column, or diagonal of the magic square. For example, the magic square shown below has a magic constant of 15. For a normal magic square of order n – that is, a magic square which contains the numbers 1, 2, ..., n2 – the magic constant is .
For normal magic squares of orders n = 3, 4, 5, 6, 7, and 8, the magic constants are, respectively: 15, 34, 65, 111, 175, and 260 (sequence A006003 in the OEIS). For example, a normal 8 × 8 square will always equate to 260 for each row, column, or diagonal. The normal magic constant of order n is n3 + n/2. The largest magic constant of normal magic square which is also a:
Note that 0 and 1 are the only normal magic constants of rational order which are also rational squares.
However, there are infinitely many rational triangular numbers, rational generalized pentagonal numbers and rational tetrahedral numbers which are also magic constants of rational order.
The term magic constant or magic sum is similarly applied to other "magic" figures such as magic stars and magic cubes. Number shapes on a triangular grid divided into equal polyiamond areas containing equal sums give polyiamond magic constant.[1]