Use de la Loubère’s method to construct a magic square of order n = 9.
First, a 1 is placed in the middle square of the top row, then successive integers are placed in their natural order along a diagonal line that slopes upward and to the right, with the following modifications:
i. When the top row is reached, the next integer is put in the bottom row as if it came immediately above the top row.
ii. When the right-hand column is reached, the next integer is put in the left-hand column as if it had immediately succeeded the right-hand column.
iii. When a square that has been filled has been reached or when the top right-hand square is reached, the next integer is placed in the square immediately below the last square that was filled.