Magic Squares for Odd, Singly Even, and Doubly Even Orders
Magic Squares for Odd, Singly Even, and Doubly Even Orders
A magic square is a square array of the numbers 1, 2, …, arranged so that the sum of the numbers in a row, column, or either main diagonal is constant. This Demonstration shows magic squares of any order up to 14. Different algorithms are used to generate the magic squares, depending on whether the order is odd, singly even, or doubly even (see Details).
2
n