Bordered magic squares

A bordered magic square is a magic square, which remains magic when its borders are removed. Let us take the depicted magic square of order 8. When we remove its border, we will get a square of order 6.

  • 6449546331053
    601516474849205
    744224241252158
    5133372930283814
    632343536312759
    826402423433957
    5245461817195013
    12615611262551
  • 151647484920
    442242412521
    333729302838
    323435363127
    264024234339
    454618171950

This square isn't normalized anymore, because it doesn't contain the numbers 1, 2, … , n2 anymore. But still each row, each column and both diagonals sum S=195.

A second condition for bordered magic squares demands that the numbers of the border enclose the numbers of the inner square. Satisfiying this condition means that the numbers 1, … ,2(n−1) and n2−2(n−1) + 1 , … , n2 must form the border. All other numbers must be elements of the inner square.

Let's take a bordered magic square of order n=6 as an example. The inner square is of order n=4, and must be formed of 42=16 numbers. On the other side, there are

62 − 42 = 36 − 16 = 20

numbers for the border, which have to enclose the inner elements. So, ten numbers are less and ten numbers are greater than the inner numbers.

lower numbers of the border: 1 … 10
inner numbers: 11 … 26
upper numbers of the border: 27 … 36

One example of such an arrangement is shown in the following magic square of order 6:

362373231
42613122333
91520211828
271916172210
29142524118
635343051