In its most basic form an
magic square is
an arrangement of the numbers from
to
on a square grid in such a way
the entries on the rows, columns and two main diagonals have the same sum.
Magic squares exists for every positive and the common sum, which
we can call magic constant is .
For example, and magic squares like these
have magic constant
and
.
The first magic constants are
1, 5, 15, 34, 65, 111, 175, 260, 369, 505, 671, 870, 1105, 1379, 1695, 2056, 2465, 2925, 3439 more terms
Pictorial representation of remainders (mod 2, 3, ...,11) frequency. For a table of values and more details
click here
A graph displaying how many magic constants are multiples of the primes
p from 2 to 71. In black the ideal line 1/
p.