Generate magic squares of order 3 to 9 . Every row, column and both diagonals sum to the magic constant n(n²+1)/2 . Uses the Siamese method for odd orders, a diagonal swap for doubly-even, and the LUX method for singly-even.
8 | 1 | 6 | 15 |
3 | 5 | 7 | 15 |
4 | 9 | 2 | 15 |
15 | 15 | 15 |
8 1 6 3 5 7 4 9 2
marduc812
© 202620260812_d5568b8