The Magic Encyclopedia ™

Utramagic Squares
{note: investigative article}
(by Aale de Winkel)

<Walter Trump> started proofing general equations for the ultramagic squares of odd order, these equations where quite astonashing in that the are general and valid for any ultramagic square of said order. Since the proofs are general without any assumption to the involved numbers, the proofs leave no doubt at all to the validity of those statements
This article intents to define the things in rather technical notations for any order. Samples of certain orders might be given at a later date.
The numbers are assumed to be in the range[-(m2-1)/2 .. (m2-1)/2] which in the case of the ultramagic square means a completely antisymmetric pandiagonal square where all sums are 0. The equations stated below use these facts and are stated in the top halve of the squares, including the first halve central row. Note further that boolean expressions evaluate to 1 if true and to 0 otherwise.
For the doubly even orders <Walter Trump> doubled the number range by multiplying with 2 and centralizing around 0, so the squares use the odd numbers in the range is [-m2+1,..,m2-1], thus anti-symmetrical squares of even order are possible. Remarks for this situation will also be given.
The doubly odd orders squares can't be pandiagonal, so can't be ultramagic either.

Basic equations for odd order ultramagic squares
The below stated formulae k ranges from 0 to (m - 3) / 2; i from 0 to m - 1 (column)
and j from 0 to (m - 1) / 2 if i < (m - 1)/ 2 and (m - 3) / 2 if (i >= (m - 1) / 2
for equality the notation '==' is used to distinguish form assignment '='
as is usual in the C programming language
For the doubly even orders k ranges from 0 to (m - 2) / 2
Row equations
Rki,j
Rki,j = [ (j == k) ]
Every row sums to 0
Column equations
Cki,j
Cki,j = [ (i == k) - (i == m - 1- k) ]
Every column sums to 0
Diagonal equations
Dki,j
Dki,j = [ (i - j == k + 1) - (j - i == k + 1) - (i - j == m - 1 - k) ]
Every diagonal sums to 0
SubDiagonal equations
Ski,j
Ski,j = [ (i + j == k) - (i + j == m - 2 - k) + (i + j == m - k) ]
Every subdiagonal sums to 0
derivable equations for odd order ultramagic squares
Any combination of the above 4 (m - 1) / 2 equations naturally also sum 0
Below are some remarkable patterns stated we came across restated in the above formulated
basic set of equations. the given expressions need some verification but are currently based
on orders 5 7 and 9.
The actual equations all read E = 0.
Top left corner
equation
Ei,j = k=0(m-3)/2 [ Rki,j + Cki,j ]
this top left corner consist of (m - 1)2 / 4 numbers counted twice
the top halve central column and left halve central row of (m - 1) / 2 numbers each
Ei,j = { k=0(m-2)/2 [ Rki,j + Cki,j ] } / 2
(equation for doubly even order)
this top left corner consist of m2 / 4 numbers
Top left triangle
equation
Ei,j = { k=0(m-3)/2 ((m - 1) / 2 - k) [ Rki,j + Cki,j + S(m-3)/2-ki,j ] } / m
this top left triangle consist of (m2 - 1) / 8 numbers
Ei,j = { k=0(m-2)/2 (m / 2 - k) [ Rki,j + Cki,j + S(m-2)/2-ki,j ] }
subtract the corner equation and devide by m / 2
(equation for doubly even order; note: S(m-2)/2 == 0)
this top left triangle consist of m (m + 2) / 8 numbers
m (m - 2) / 8 numbers counted twice
Top right triangle
equation
Ei,j = { k=0(m-3)/2 ((m - 1) / 2 - k) [ Rki,j - Cki,j - D(m-3)/2-ki,j ] } / m
this top right triangle consist of (m2 - 1) / 8 numbers
Ei,j = { k=0(m-2)/2 (m / 2 - k) [ Rki,j - Cki,j - D(m-2)/2-ki,j ] }
subtract the corner equation and devide by m / 2
(equation for doubly even order; note: D(m-2)/2 == 0)
this top right triangle consist of m (m + 2) / 8 numbers
m (m - 2) / 8 numbers counted twice
Top down triangle
equation
Ei,j = { k=0(m-3)/2 ((m - 1) / 2 - k) [ Rki,j +
(2k <= (m-3)/2) ( D2ki,j - S2ki,j ) -
(2k > (m-3)/2) ( Dm-2-2ki,j - Sm-2-2ki,j ) ] } / m
this top down triangle consist of (m2 - 1) / 8 numbers

General relations on basic equations for ultramagic squares
Studying the basice equations a few general relations are noticable
Note that with the odd order equations one might need to remirror the
equations half central row back onto its place
(might need to negate the element)
Horizontal relations
(all orders)
Vertical relations
(even orders)
Rki,j = Rkm-1-i,j
Cki,j = -Ckm-1-i,j
Dki,j = -Skm-1-i,j
Rki,j = R(m-2)/2-ki,(m-2)/2-j
Cki,j = Cki,(m-2)/2-j
Dki,j = -S(m-4)/2-ki,(m-2)/2-j