# Al-Buni

Another method of Arabic origin was published around 1200 by Ahmad al-Buni, who lived in what is now Algeria. However, it did not come from al-Buni himself, who only presented it in one of his publications. To create a bordered magic square of order n=2k + 1, proceed in the following order.

• The first k odd numbers are placed in the left column. Start above the lower left corner and enter the numbers in ascending order, always leaving one cell empty.
• The procedure for the next k odd numbers is similar. Start left of the upper right corner and place further numbers to the left, skipping one cell at a time.
• Now the even numbers follow. Start two places above the lower right corner, skip one cell at a time, and place k − 1 even numbers upwards.
• The last k even numbers are placed in the bottom row. Start in the lower right corner and place the numbers to the left. As with the other number sequences, one cell is skipped again.

Finally, the cells that are still empty are filled with the complements of the numbers already entered. It is important, however, that two places of the border remain empty. Only 2n − 3 numbers were entered, and the bottom left, and upper right corners were not filled.

•  15 13 11 9 7 6 5 4 3 2 1 14 12 10 8
•  74 15 68 13 70 11 72 9 7 75 76 6 5 77 78 4 3 79 80 2 1 81 67 14 69 12 71 10 73 8

This procedure is now continued for each border from the outside towards the center. The border of the embedded inner square of order n=7 is shown in the following figure.

•  74 15 68 13 70 11 72 9 7 26 24 22 75 76 20 6 5 19 77 78 18 4 3 17 79 80 16 2 1 25 23 21 81 67 14 69 12 71 10 73 8
•  74 15 68 13 70 11 72 9 7 61 26 57 24 59 22 75 76 20 62 6 5 63 19 77 78 18 64 4 3 65 17 79 80 16 66 2 1 56 25 58 23 60 21 81 67 14 69 12 71 10 73 8

Applying these steps with the rest of the borders, you can see that all cells of the main diagonals have been left empty. They are now filled from the upper right to the lower left with the numbers that have not yet been entered until the complete multi-bordered magic square is finally created.

•  74 15 68 13 70 11 72 9 37 7 61 26 57 24 59 22 38 75 76 20 52 33 50 31 39 62 6 5 63 29 47 36 40 53 19 77 78 18 54 34 41 48 28 64 4 3 65 27 42 46 35 55 17 79 80 16 43 49 32 51 30 66 2 1 44 56 25 58 23 60 21 81 45 67 14 69 12 71 10 73 8
•  74 15 68 13 70 11 72 9 37 7 61 26 57 24 59 22 38 75 76 20 52 33 50 31 39 62 6 5 63 29 47 36 40 53 19 77 78 18 54 34 41 48 28 64 4 3 65 27 42 46 35 55 17 79 80 16 43 49 32 51 30 66 2 1 44 56 25 58 23 60 21 81 45 67 14 69 12 71 10 73 8

This procedure works for all odd orders. Two other examples are shown for n=5 and n=7.

•  22 7 20 5 11 3 17 10 12 23 24 8 13 18 2 1 14 16 9 25 15 19 6 21 4
•  44 11 40 9 42 7 22 5 35 18 33 16 23 45 46 14 30 21 24 36 4 3 37 19 25 31 13 47 48 12 26 29 20 38 2 1 27 32 17 34 15 49 28 39 10 41 8 43 6