3
$\begingroup$

Could someone kindly point me to references on constructing magic squares of even order? Does a compact formula/algorithm exist?

  • 0
    An algorithm for generating even-order magic squares due to Collison is presented [here](http://dx.doi.org/10.1145/368637.368662); if you have MATLAB, you can try to find the file `magic.m` to see the algorithms internally used (discussed $b$riefly [here](http://www.mathworks.com/moler/exm/chapters/magic.pdf)).2011-10-28

2 Answers 2

2

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:

LUX demo

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.

doubly even example

  • 0
    @Gortaur,http://en.wikipedia.org/wiki/Eye_of_Providence#Religious_use_of_the_Eye2011-10-28
3

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:

http://arxiv.org/ftp/arxiv/papers/1202/1202.0948.pdf