# Magic square

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A square array composed of the integers from 1 up to and satisfying the following conditions:

 (*)

where . There are also more general magic squares, in which is not required.

Any number , , is uniquely characterized by a pair of residues (the digits to base of ), that is, by the points of the two-dimensional space over the ring of residues modulo . Since the coordinates of the cells of the square may also be regarded as the elements of , it follows that any distribution of the numbers from 1 up to in an array is given by a mapping

that is, by a pair of functions , , where . The problem is to investigate those pairs that give magic squares. In general this has been done (see [1]) only under the additional assumption of linearity of and . It turns out, in particular, that magic squares with linear and exist for odd only.

Already in the Middle Ages a number of algorithms for constructing magic squares of odd order had been found. Each such algorithm is characterized by six residues , , , , , , and is described by the following rules: 1) the number 1 is put into the cell ; and 2) if was put into , then is put into if that cell is still empty or into if is occupied.

The residues are not arbitrary but must satisfy certain conditions to ensure not only that (*) holds, but also that the algorithm is feasible, that is, that is empty when is occupied. These conditions are easily found (see [1]). Moreover, it turns out that a magic square can be constructed by an algorithm of this type if and only if the functions and describing the square are linear.

Many algorithms for constructing magic squares are known (resulting in squares with non-linear and ), but there is no general theory for them (1989). Even the number of magic squares of order is unknown (for ; for there is, up to obvious symmetries, only one magic square, whereas for there are 880 magic squares).

Magic squares having additional symmetry have also been investigated, again only in very special circumstances (for example, for ; see [2]).

#### References

 [1] M.M. Postnikov, "Magic squares" , Moscow (1964) (In Russian) [2] E.Ya. Gurevich, "The secret of the Ancient Talisman" , Moscow (1969) (In Russian)