Could someone kindly point me to references on constructing magic squares of even order? Does a compact formula/algorithm exist?
2 Answers
A very elegant method for constructing magic squares of singly even order $n=4m+2$ with $m\geq1$ is due to J. H. Conway, who calls it the "LUX" method.
Create an array consisting of $m+1$ rows of Ls, $1$ row of Us, and $m-1$ rows of Xs, all of length $n/2=2m+1$. Interchange the middle U with the L above it. Now generate the magic square of order $2m+1$ using the Siamese method centered on the array of letters (starting in the center square of the top row), but fill each set of four squares surrounding a letter sequentially, according to the order prescribed by the letter. That order is illustrated on the left side of the figure below, and the completed square is illustrated to the right. The "shapes" of the letters L, U, and X naturally suggest the filling order, hence the name of the algorithm.
This example should illustrate the "LUX" method:

EDIT:
An method for constructing magic squares of doubly even order $n=4m$ is to draw Xs through each $4×4$ subsquare and fill all squares in sequence. Then replace each entry $a_{(ij)}$ on a crossed-off diagonal by $(n^2+1)-a_{(ij)}$ or, equivalently, reverse the order of the crossed-out entries. Thus in the below example for $n=8$, the crossed-out numbers are originally $1, 4, ..., 61, 64,$ so entry $1$ is replaced with $64$, $4$ with $61$, etc.

- 103
- 13,292
-
Any idea as to what algorithm exist for constructing doubly-even order magic squares? – Computist Oct 27 '11 at 23:40
-
@Computist: As Arturo Magidin pointed out in his comment to the question, you can just multiply any 4x4 you know by an (n/4 x n/4) one – Ross Millikan Oct 28 '11 at 00:58
-
3@Ross: Of course, this requires you to know how to do a $4\times 4$ and an $8\times 8$ "directly". – Arturo Magidin Oct 28 '11 at 04:36
-
6
-
1
-
1So you're still not going to acknowledge the source of the text of your answer? – J. M. ain't a mathematician Oct 28 '11 at 12:35
-
-
2
-
8@pedja, that's not enough! you should always attribute your sources before somebody points it out! – t.b. Oct 28 '11 at 12:49
-
-
@pedja: I totally agree with t.b. and J.M., and it will be nice if you follow the advice in the last comment by t.b. What about Horus, http://en.wikipedia.org/wiki/Sauron - he also has the eye – SBF Oct 28 '11 at 13:08
-
@Gortaur,http://en.wikipedia.org/wiki/Eye_of_Providence#Religious_use_of_the_Eye – Pedja Oct 28 '11 at 13:11
This is 2 years old but here are some new results.
A new/revised class of algorithms for single-even/double-even magic squares can be found on arXiv:
- 31
magic.mto see the algorithms internally used (discussed briefly here). – J. M. ain't a mathematician Oct 28 '11 at 09:36