There is a method for solving a magic square of size n-by-n, when n is odd.
First, place a 1 in the middle square of the top row.
The successive integers are then placed in their natural order along a diagonal line that slopes upwards and to the right, with the following rules:
1: When the top row is reached, the next integer is put in the bottom row as if it came immediately above the top row.
2: 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
3. When a square that has been filled is 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.
Hope you can follow that.
Follow these rules and you can complete any size magic square, as long as it is odd.
So doing, we get:
Practice a little and show off by making a 5-by-5 magic square.
By using the above method, one can build a magic square in a few minutes.
Here is a 5 by 5 I just made:
Note, the sums of rows, diagonals, columns equals 65.
How about a 9-by-9? :)
The sum across a row, column, or diagonal is 369.
The sum of the rows, columns, diagonals of an n-by-n magic square is found by:
With a 3-by-3, we get
The 9-by-9:
and so on.