A frame magic square is such a magic square that if we discard the bordering “stripes” of one or several cells in it, the remaining square will not lose its magic property. Such squares are also called associative or symmetric . There are no 4th-order framework magic squares (since there are no second-order magic squares)
Content
Methods for constructing frame magic squares
Odd squares
Al-Qaraji Method
- One of the simplest methods concerning filling squares of order n = 2 k + 1 belongs to al-Karaji (X century). [one]
Consider the method in the general case.
- The construction of the frame begins to the left of the upper right corner, in which the number 1 is written. The number 2 is placed in a cell located under the upper right;
- 3 - to the left of 1; 4 - under 2, etc., to the number 2 ( k -1). The number 2 k -1 is written under the previous one; 2 k - in the upper left corner;
- 2 k +1 - in the middle of the bottom of the frame; the number 2 ( k +1) is placed in the lower left corner, and the next to the right of it. The number 3 k is placed over 2 ( k +1).
- Further filling is carried out similarly to placing numbers in the upper right corner. The last record number ((2 k +1) ∙ 4-4) / 2 = 4 k . When filling the remaining cells of the frame from (2 k +1) 2 + 1, subtract the numbers in the corners of the frame in the corresponding cells.
- The next frame (2 k -3) × (2 k -3) is constructed in the same way, starting from the number 4 k +1, etc. Finally, a magic square of order 3 is drawn inside the frame.
- 3 - to the left of 1; 4 - under 2, etc., to the number 2 ( k -1). The number 2 k -1 is written under the previous one; 2 k - in the upper left corner;
A square illustrating this method is presented below:
| four | nineteen | 21 | one | 20 |
| 24 | sixteen | 9 | 14 | 2 |
| 23 | eleven | 13 | 15 | 3 |
| eight | 12 | 17 | ten | 18 |
| 6 | 7 | five | 25 | 22 |
The Pure Brothers and Faithful Friends Method
- The next method belongs to “Pure Brothers and True Friends”. [1] Since there was no description of the method in the manuscript, its reconstructed version is presented below, considered in the general case and shown on the example of a magic square of order 7 ( n = 7, k = 3).
- Regardless of the order, the filling starts with the smallest square. The first number is placed in the second cell from the top, of the rightmost column, in which n −2 cells are filled, to the penultimate one;
- The next number is placed in the last cell of the first row, counting from right to left, and fill the entire line, to the penultimate cell;
- The remaining frames are filled in the same way, the figure below;
- Regardless of the order, the filling starts with the smallest square. The first number is placed in the second cell from the top, of the rightmost column, in which n −2 cells are filled, to the penultimate one;
| sixteen | 17 | 18 | nineteen | 20 | 21 | |
| 7 | eight | 9 | ten | eleven | ||
| 2 | 3 | four | 12 | |||
| one | five | 13 | ||||
| 6 | 14 | |||||
| 15 | ||||||
- Then they go on to fill in the “empty” main diagonal, writing down the numbers in their natural order.
| sixteen | 17 | 18 | nineteen | 20 | 21 | 28 |
| 7 | eight | 9 | ten | 27 | eleven | |
| 2 | 3 | 26 | four | 12 | ||
| 25 | one | five | 13 | |||
| 24 | 6 | 14 | ||||
| 23 | 15 | |||||
| 22 |
- Empty cells of the frame are filled, supplementing them in the sum with the opposite ones to the number (n² + 1) / 2;
- By the next step, k −1, the number in the right column, through one cell, counting from the penultimate from the bottom, is interchanged with the corresponding numbers of the left column; and k numbers in the top row, after one, counting from the first cell, with the corresponding numbers in the bottom row.
As a result, we get the frame magic square, presented below:
| sixteen | 33 | 18 | 31 | 20 | 29 | 28 |
| 39 | 7 | 42 | 9 | 40 | 27 | eleven |
| 12 | 46 | 2 | 47 | 26 | four | 38 |
| 37 | five | 49 | 25 | one | 45 | 13 |
| 14 | 44 | 24 | 3 | 48 | 6 | 36 |
| 35 | 23 | eight | 41 | ten | 43 | 15 |
| 22 | 17 | 32 | nineteen | thirty | 21 | 34 |
Odd-Even Squares
Seki Kova Method
We consider the algorithm for constructing a square of order 2 (2 k +1) × 2 (2 k +1) in the general form:
- 1 is placed in the cell of the lower right corner, the number 2 is placed in the cell of the first row as if it were under the last row. Similarly, they continue to fill in the rightmost column until the number 2 (2 k +1) −1 is reached;
- The number 2 (2 k +1) is placed in the penultimate cell of the first row, counting from right to left, and fill in (2 k +1) the cell in the direction of 2;
- The next number is placed in the cell of the rightmost column, under the number 2 (2 k +1) −1 and in the direction of 1 the right column is completely filled;
- The next number is placed in an empty cell of the first row and filled it completely in the direction of 1;
- The empty cells of the bottom row and the leftmost column, except for the corner cells, are filled with additional numbers to (2 k +1) 2 + 1, respectively opposite. Corner cells are filled with additional numbers up to n 2 +1 to the opposite corner;
- (2 k +1) the number of the right column after the upper corner cell is interchanged with the corresponding numbers of the left column. Do the same with 2 k numbers of the first line, standing in the second and penultimate places, with the corresponding numbers of the bottom line. Thus, we get the outer frame of the square;
- The remaining frames are filled in the same way;
- The number 2 (2 k +1) is placed in the penultimate cell of the first row, counting from right to left, and fill in (2 k +1) the cell in the direction of 2;
Below is a square of order 6 constructed by this method:
| 36 | 31 | 7 | eight | 27 | 2 |
| 3 | 26 | 13 | 12 | 23 | 34 |
| four | nineteen | sixteen | 17 | 22 | 33 |
| five | 15 | 20 | 21 | 18 | 32 |
| 28 | 14 | 25 | 24 | eleven | 9 |
| 35 | 6 | thirty | 29 | ten | one |
See also
- Latin square
- Orthogonal array
- Magic square
- Supermagic square
- Magic cube
- Supermagic cube
- Sudoku
Notes
- ↑ 1 2 A.E. Malykh and A.A. Galiaskarova. Development of methods for constructing framework magic squares // Bulletin of Perm University. - 2014. - Issue. 1 (24) .
Literature
- Hall M. Combinatorics, per. from English M. 1970.
- Dénes JH, Keedwell AD Latin Squares and their Applications. Budapest. 1974.
- Laywine CF, Mullen GL Discrete mathematics using Latin squares. New York 1998
- Malykh A.E., Danilova V.I. On the historical process of developing the theory of Latin squares and some of their applications (inaccessible link) // Bulletin of Perm University. 2010. Issue. 4 (4). S. 95-104.
- Tuzhilin M.E. On the history of studies of Latin squares // Review of applied and industrial mathematics. 2012. Volume 19, Issue 2. P. 226—227.
- Chebrakov Yu. V. Magic squares. Number Theory, Algebra, Combinatorial Analysis. SPb: SPbSTU, 1995, 388 p. ISBN 5-7422-0015-3 .
Links
- Magic Squares
- sequence A164843 in OEIS
- M. Gardner " Review of the book by Kathleen Allerenshaw and David Bree "
- H. Heinz Magic Squares, Magic Stars & Other Patterns
- N. Scriabin, V.Dubovskoy Magic squares
- Chess approach
- Unconventional magic squares from prime numbers
- Smallest magic squares of prime numbers
- “ General formulas of magic squares. "
- “ Concentric magic squares. "