Magic Squares is a classic mathematical puzzle where you arrange numbers in a square grid so that every row, column, and main diagonal sums to the same "Magic Constant."
M = n(n² + 1) / 2
| 8 | 1 | 6 | = 15 | 3 | 5 | 7 | = 15 | 4 | 9 | 2 | = 15
Columns: 8+3+4=15, 1+5+9=15, 6+7+2=15. Diagonals: 8+5+2=15, 6+5+4=15.
Even-order squares (4×4, 6×6) require different algorithms (e.g., Strachey, LUX).