# The magic square

The magic square – a square matrix of numbers, which are located in such a way that their sum by diagonally, or in any series always make the same number of horizontal and vertical. In the 7th century the arabs knew the magic square consisting of nine cells. In the 12th century magic square described in his writings of Ibn Ezra. The first magic square in Western Europe refers to the 15th century, when the square of 25 cells was shown in one of the geometrical compositions. In 1514, Albrecht Durer produced engraving "Melancholia," which is drawn magic square of 16 cells. In 1654, Pascal wrote a treatise on magic squares. Below is a magic square with the sum of numbers in all directions, equal to 111.

The magic square has become a hobby for the famous french kabbalist librarian Richelieu Gaffarel. He brought the game to the level of a perfect science.

For the savvy exists and greatest – square of nine. He gives the sum of 369 in all verticals, horizontals, and all in all oblique lines. In conclusion, according to one hypothesis, it was he who "gave life" chess.

The sum of the numbers in each row, column and diagonal is called the magic constant of M . The magic constant normal magic square depends only on n (n - the number of cells on the side of the square) and is given by M(n) = n(n² + 1)/2.

The first values of magic numbers are given in the following table:

 Order n 3 4 5 6 7 8 9 10 11 12 13 M(n) 15 34 65 111 175 260 369 505 671 870 1105