English   Japanese
Home   Site Map   Top   Prev.   Next   3-D ( 1   2   3   4   5 )   4-D ( 1   2   3   4   5   6 )

# Algorithm to make strictly magic tesseracts

## 1. Algorithm for even orders

A strictly magic tesseract (namely, a 2,3,4-agonal magic tesseracts) of even order exists if the order is higher than 7. In this case, an associated strictly magic tesseract exists if the order is divisible by 4. On the other hand, if the order is singly-even, only a non-associated strictly magic tesseract can exist.
A strictly magic tesseract cannot exist for order 4, and it is unknown whether a strictly magic tesseract exists or not for order 6. If the order is divisible by 16, there exists a Nasik magic tesseract, which satisfies a stronger condition than strictly magic (see this).
The following algorithm works for orders divisible by 4. (It is complecated to construct a strictly magic tesseract of singly-even order.)

### 1.1 Associated strictly magic tesseracts (m = 4x, m >= 8)

An associated strictly magic tesseract aijkh of order m, where i,j,k,h = 0,...,m-1, is given by the following equation by using a complete pan and strictly magic tesseract C[i, j, k, h]:
aijk = C[Tm(i), Tm(j), Tm(k), Tm(h)]
where
Tm(x) = x (where x < m/2), 3m/2-1-x (otherwise).

If the order is divisible by 8, an associated strictly magic tesseract aijkh of order m, where i,j,k,h = 0,...,m-1, can be constructed directly by the following equation:
aijk = Tm(bijkh) m3 + Tm(cijkh) m2 + Tm(dijkh) m + Tm(eijkh) + 1,

where
bijkh = Tm(i) + (m/4)Tm(j) + (m/4)Tm(k) + (m/4)Tm(h)   (mod. m),   0 <= bijkh < m,
cijkh = (m/4)Tm(i) + Tm(j) + (m/4)Tm(k) + (m/4)Tm(h)   (mod. m),   0 <= cijkh < m,
dijkh = (m/4)Tm(i) + (m/4)Tm(j) + Tm(k) + (m/4)Tm(h)   (mod. m),   0 <= dijkh < m,
eijkh = (m/4)Tm(i) + (m/4)Tm(j) + (m/4)Tm(k) + Tm(h)   (mod. m),   0 <= eijkh < m,
the definition of Tm(x) is the same as above.

Back

## 2. Algorithms for odd orders

A strictly magic tesseract of odd order exists if the order is higher than 14, and an associated strictly magic tesseract of odd order can exist under the same condition.
A strictly magic tesseract cannot exist for orders 3 and 5, and it is unknown whether a strictly magic tesseract exists or not for orders 7, 9, 11, and 13. If the order is higher than 16, there exists a Nasik magic tesseract, which satisfies a stronger condition than strictly magic (see this).
Let L13 be lcm{y| y is odd and 3 <= y <= 13} = 32x5x7x11x13, where lcm means the least common multiple, and gcd means the greatest common divisor.

### 2.1 Case m = 2x+1, m >= 15, and gcd(m, L13) = 1 (associated, pan-2,3-agonal)

In this case, m is prime to 3, 5, 7, 11, and 13.
A strictly magic tesseract aijkh of order m, where i,j,k,h = 0,...,m-1, is given by the following equation (aijkh is also pan-2,3-agonal):
aijkh = bijkh m3 + cijkh m2 + dijkh m + eijkh + 1,

where
bijkh = 2i + 4j + k + 7h + (m+13)/2   (mod. m),   0 <= bijkh < m,
cijkh = 2i - 4j + k + 7h + (m+5)/2   (mod. m),   0 <= cijkh < m,
dijkh = 2i + 4j - k + 7h + (m+11)/2   (mod. m),   0 <= dijkh < m,
eijkh = 2i + 4j + 7k - h + (m+11)/2   (mod. m),   0 <= eijkh < m.

This tesseract is expressed as follows by the XmlHypercube format by Aale de Winkel:
LP({2,4,1,7}+(m+13)/2,{2,-4,1,7}+(m+5)/2,{2,4,-1,7}+(m+11)/2,{2,4,7,-1}+(m+11)/2)

The value of the determinant
| 2 4 1 7|
| 2 -4 1 7|
| 2 4 -1 7|
| 2 4 7 -1|
equals to -256 = -28, which is prime to any odd integer, so this set of the formulae always generates a normal magic tesseract.

### 2.2 Case m = 2x+1, m >= 15, and 1 < gcd(m, L13) < m (associated, pan-2,3-agonal)

Let q be gcd(m, L13) and p be m/q. In this case, p > 1 and q > 1.
A strictly magic tesseract aijkh of order m, where i,j,k,h = 0,...,m-1, is given by the following equation (aijkh is also pan-2,3-agonal):
aijkh = Sm,q(bijkh) m3 + Sm,q(cijkh) m2 + Sm,q(dijkh) m + Sm,q(eijkh) + 1,

where
bijkh = 2i + 4j + k + 7h + (m+13)/2   (mod. m),   0 <= bijkh < m,
cijkh = 2i - 4j + k + 7h + (m+5)/2   (mod. m),   0 <= cijkh < m,
dijkh = 2i + 4j - k + 7h + (m+11)/2   (mod. m),   0 <= dijkh < m,
eijkh = 2i + 4j + 7k - h + (m+11)/2   (mod. m),   0 <= eijkh < m.
Sm(x) = Qp,q([x/q], x mod q),

where [x] means the integer part of x.

Qp,q(x, y), where 0 <= x < p and 0 <= y < q, is given by the following equations (identical to Qp,q(x, y) for Nasik magic cubes):
Qp,q(x, y) = qx + y (if 0 < x < p-1 and x is even),
qx + (q-1-y) (if 0 < x < p-1 and x is odd),
y/2 + (q-1)/2 (if x = 0 and y is even),
(y-1)/2 (if x = 0 and y is odd),
y/2 + (p-1)q (if x = p-1 and y is even),
(y-1)/2 + pq - (q-1)/2 (if x = p-1 and y is odd).

See the page for Nasik cubes to see examples of Qp,q(x, y) and Sm,q(x).

### 2.3 Case m = 2x+1, m >= 15, and gcd(m, L13) = m (associated)

In this case, m is a divisor of L13 = 32x5x7x11x13.
A strictly magic tesseract aijkh of order m, where i,j,k,h = 0,...,m-1, is given by the following equation (aijkh is also pan-2,3-agonal):
aijkh = S*m(bijkh) m3 + S*m(cijkh) m2 + S*m(dijkh) m + S*m(eijkh) + 1,

where
bijkh = 2i + 4j + k + 7h + (m+13)/2   (mod. m),   0 <= bijkh < m,
cijkh = 2i - 4j + k + 7h + (m+5)/2   (mod. m),   0 <= cijkh < m,
dijkh = 2i + 4j - k + 7h + (m+11)/2   (mod. m),   0 <= dijkh < m,
eijkh = 2i + 4j + 7k - h + (m+11)/2   (mod. m),   0 <= eijkh < m.

S*m(x) is defined as follows:
S*m(x) = Rq,m/q(x mod q, x mod (m/q)) - 1,

where q is the greatest prime factor of m (q is equal to 5, 7, 11, or 13).
Rq,m/q is an associated magic rectangle of order-(q,m/q). See the page for magic rectangles.

Back

Home   Site Map   Top   Prev.   Next   3-D ( 1   2   3   4   5 )   4-D ( 1   2   3   4   5   6 )

Mitsutoshi Nakamura (Feedback)    To send an email to me, please enable JavaScript on your browser.
[Legal indication] Prohibit the send of any spam or advertising.