Siamese method


The Siamese method, or De la Loubère method, is a simple method to construct any size of n-odd magic squares. The method was brought to France in 1688 by the French mathematician and diplomat Simon de la Loubère, as he was returning from his 1687 embassy to the kingdom of Siam. The Siamese method makes the creation of magic squares straightforward.

Publication

De la Loubère published his findings in his book A new historical relation of the kingdom of Siam, under the chapter entitled The problem of the magical square according to the Indians.
Although the method is generally qualified as "Siamese", which refers to de la Loubère's travel to the country of Siam, de la Loubère himself learnt it from a Frenchman named M.Vincent, who himself had learnt it in the city of Surat in India:

The method

The method was surprising in its effectiveness and simplicity:
First, an arithmetic progression has to be chosen.
Then, starting from the central box of the first row with the number 1, the fundamental movement for filling the boxes is diagonally up and right, one step at a time. When a move would leave the square, it is wrapped around to the last row or first column, respectively.
If a filled box is encountered, one moves vertically down one box instead, then continuing as before.

Order-3 magic squares

Order-5 magic squares

Other sizes

Any n-odd square can be thus built into a magic square. The Siamese method does not work however for n-even squares.

Other values

Any sequence of numbers can be used, provided they form an arithmetic progression. Also, any starting number is possible. For example the following sequence can be used to form an order 3 magic square according to the Siamese method : 5, 10, 15, 20, 25, 30, 35, 40, 45.

Other starting points

It is possible not to start the arithmetic progression from the middle of the top row, but then only the row and column sums will be identical and result in a magic sum, whereas the diagonal sums will differ. The result will thus not be a true magic square:

Rotations and reflections

Numerous other magic squares can be deduced from the above by simple rotations and reflections.

Variations

A slightly more complicated variation of this method exists in which the first number is placed in the box just above the center box. The fundamental movement for filling the boxes remains up and right, one step at a time. However, if a filled box is encountered, one moves vertically up two boxes instead, then continuing as before.
Numerous variants can be obtained by simple rotations and reflections. The next square is equivalent to the above : the first number is placed in the box just below the center box. The fundamental movement for filling the boxes then becomes diagonally down and right, one step at a time. If a filled box is encountered, one moves vertically down two boxes instead, then continuing as before.
These variations, although not quite as simple as the basic Siamese method, are equivalent to the methods developed by earlier Arab and European scholars, such as Manuel Moschopoulos, Johann Faulhaber and Claude Gaspard Bachet de Méziriac, and allowed to create magic squares similar to theirs.
It has been discovered that the placement of the starting number one for order>5 is not limited to the first or centrally adjacent rows. It was found that the number one can be placed in any of the cells above or below the central box so that the number of squares produced is no longer 2 but n-1 for the entire middle column, where n is the order. The amount of vertical movement is determined by use of a consecutive even number rule where the v.m. is 2 for cells adjacent to the central box and incremented by two as the numeral one is placed further away from the central box towards the periphery of the square where the v.m. takes on the value of n-1. Moreover, the number of prime order squares is greater than for composite order squares.
In addition, the Loubère is no longer magic below the central box for either prime order or composite order. The six squares that can be generated for the order-7 group are shown. Square 6 is the only non magic square in the group.

Order-7 magic squares