Even-order magic squares
A pointwise construction for every even order n ≥ 4
Other languages: Français
For every even order n ≥ 4 a magic labelling of the pointwise protocol exists. If 4 divides n, a classical two-class construction suffices. If n ≡ 2 (mod 4) and n ≥ 6, a four-class construction carrying an ansate cross exists. Order 2 is impossible.
What the pointwise protocol is
An even-order magic square is built here cell by cell. Each cell is given one of four classes — B, R, V, J — and its value then depends on nothing but its coordinates and its class:
B(r,c) = n·r + c + 1 · V(r,c) = n·r + (n−1−c) + 1 · R = n²+1−B · J = n²+1−V
No sequence of operations, no filling order, no backtracking: one formula, and a cell is computed without the others. The whole difficulty moves into the choice of the labelling, which is what the result below settles.
A construction for every even order
Existence is settled, and for all even orders at once. Two branches suffice, and both are explicit.
Doubly even orders: 4, 8, 12, 16, 20…
When 4 divides n, the protocol contains, as its two-class sub-case, the classical pattern of the pattern method:
L(r,c) = B if r mod 4 = c mod 4 or (r mod 4) + (c mod 4) = 3, and R otherwise.
In each packet of four consecutive cells of a row, the two B cells have the same sum of residues as the two R cells, so the packet sums to 2(n²+1). There are n/4 of them, hence a row sum equal to the magic constant M = (n/2)(n²+1), and the same computation holds per column. On the diagonal every cell is B; on the antidiagonal too.
Singly even orders: 6, 10, 14, 18, 22…
When n ≡ 2 (mod 4) and n ≥ 6, all four classes are needed, and the construction goes through the ansate cross: the figure drawn by the traits that pair the off-diagonal cells. One explicit figure works at every order — vertical if c ≡ r+1 (mod m) with m = n/2, horizontal elsewhere. Every row and every column of the quotient then carries exactly one vertical, hence m−2 horizontals, an odd number: the figure is admissible, and a rule of signs realizes it.
Order 2
Impossible, for a reason that owes nothing to the protocol. If a normal 2 × 2 square with rows (a, b) and (c, d) had equal row and column sums, then a+b = c+d and a+c = b+d; subtracting, b−c = c−b, so b = c, which contradicts each value occurring once.
The classification of ansate crosses
A figure is an orientation — horizontal or vertical — of each off-diagonal cell of the m × m quotient grid, where m = n/2. It is a candidate when every quotient row carries an odd number of horizontals and every quotient column an odd number of verticals. Which ones are realized by a magic labelling was the question. It is settled, in both directions:
for n = 2m ≥ 6, a candidate figure is realizable if and only if m is odd.
And the number of ansate-cross figures is therefore exactly
N(n) = 2m²−3m+1 for odd m, 0 for even m.
| n | 6 | 10 | 14 | 18 | 22 | 26 | 30 | 42 |
|---|---|---|---|---|---|---|---|---|
| figures | 2 | 2,048 | 2²⁹ | 2⁵⁵ | 2⁸⁹ | 2¹³¹ | 2¹⁸¹ | 2³⁷⁹ |
At doubly even orders — 8, 12, 16, 20 — there is none, and that is not a failure of search: a parity obstruction, local to a single pair of rows, forbids it at every doubly even order. A magic square still exists there, through the two-class branch: the existence of a square and the existence of an ansate cross are two distinct questions.
Nor should these be confused: the number of figures is not the number of labellings carrying one, which is far larger — 8,192 labellings for 2 figures at order 6, and 583,454,127,292,416 for 2,048 figures at order 10.
How to check
Nothing here asks you to take my word for it. The code repository holds scripts in plain Python, with no dependency, and every statement is classified by its status — proved, verified exhaustively, obtained by solver, verified on a sample. Three commands reproduce the core:
python tools/construction.py --existence
python tools/construction.py --toutes
python tools/parite.py
The first builds a magic square at every even order from 2 to 52 through the branch that applies, and exits with an error if one fails. The second rebuilds all candidate figures of orders 6 and 10 — 2 out of 2, then 2,048 out of 2,048 — with no solver. The third checks the parity obstruction on the 279,616 configurations of orders 4 to 10.
Frequently asked
What is the magic sum of an order-6 square?
111. The constant is M = n(n²+1)/2, so 6 × 37 / 2 = 111 for n = 6, 34 for n = 4, and 505 for n = 10.
Why is the singly even order held to be difficult?
Because the classical methods there are procedures, not formulas: LUX, Strachey, the quadrant split with exchanges. They produce a square, not a rule giving a cell's value from its coordinates.
Does this protocol generate every magic square?
No, and claiming so would be false. The four classes reach only a part of them: 0, 16, 18,432 and 29,368,076,800 at orders 2, 4, 6 and 8. Characterizing and counting these labellings at every order remains an open problem.
Is the method new?
To our knowledge, the move from two classes to four is, and so is the fact that it unlocks the singly even order. The two-class version is well known — it is the pattern-table method — but it is documented only for doubly even orders.
Verifiable sources: the time-stamped deposits and the code repository. The treatise all of this is drawn from: doi:10.5281/zenodo.22722485.

