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

Algorithms to make panmagic tesseracts

[Order 4x] [Order 2x+1]

1. Algorithms for orders divisible by 4

   A panmagic tesseract (namely, a pan-4-agonal or panquadragonal magic tesseract) of even order can exist only if the order is divisible by 4. In this case, a pan-3,4-agonal magic tesseract exists, which satisfies a stronger condition than panmagic. See algorithms to make pan-3,4-agonal magic tesseracts.

Note
   You can construct a panmagic tessseract of order m = 4x which is not pan-3,4-agonal by the following XmlHypercube format by Aale de Winkel. The tesseract generated by this expression is also complete and 4-compact.

   LP({1,m/4,m/4,m/2},{m/2,1,m/4,m/4},{m/4,m/2,1,m/4},{m/4,m/4,m/2,1})= [0,..,m/2-1,m-1,...,m/2]

Note
   It can be proved that every order-4 panmagic tesseract is complete and 4-compact.

Back

2. Algorithms for odd orders

   A panmagic tesseract of odd order m can exist only if the order is higher than 6, and an associated panmagic tesseract of odd order can exist under the same condition.
The function gcd means the greatest common divisor.

2.1 Case m = 2x+1, m >= 7, and gcd(m, 3x5) = 1 (associated)

In this case, m is prime to both 3 and 5.
A panmagic tesseract aijkh of order m, where i,j,k,h = 0,...,m-1, is given by the following equation:
aijkh = bijkh m3 + cijkh m2 + dijkh m + eijkh + 1,

where
bijkh = 2i + j + k + h + 2   (mod. m),   0 <= bijkh < m,
cijkh = 2i - j + k + h + 1   (mod. m),   0 <= cijkh < m,
dijkh = 2i + j - k + h + 1   (mod. m),   0 <= dijkh < m,
eijkh = 2i + j + k - h + 1   (mod. m),   0 <= eijkh < m.

This tesseract is expressed as follows by the XmlHypercube format by Aale de Winkel:
   LP({2,1,1,1}+2,{2,-1,1,1}+1,{2,1,-1,1}+1,{2,1,1,-1}+1)

2.2 Case m = 2x+1, m >= 7, and 1 < gcd(m, 3x5) < m (associated)

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

where
bijkh = 2i + j + k + h + 2   (mod. m),   0 <= bijkh < m,
cijkh = 2i - j + k + h + 1   (mod. m),   0 <= cijkh < m,
dijkh = 2i + j - k + h + 1   (mod. m),   0 <= dijkh < m,
eijkh = 2i + j + k - h + 1   (mod. m),   0 <= eijkh < m,
Sm,q(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 magic cubes to see examples of Qp,q(x, y) and Sm,q(x).

2.3 Case m = 2x+1, m >= 7, and gcd(m, 3x5) = m (associated)

In this case, always m = 15.
A panmagic tesseract aijkh of order m, where i,j,k,h = 0,...,m-1, is given by the following equation:
aijkh = S*m(bijkh) m3 + S*m(cijkh) m2 + S*m(dijkh) m + S*m(eijkh) + 1,

where
bijkh = 2i + j + k + h + 2   (mod. m),   0 <= bijkh < m,
cijkh = 2i - j + k + h + 1   (mod. m),   0 <= cijkh < m,
dijkh = 2i + j - k + h + 1   (mod. m),   0 <= dijkh < m,
eijkh = 2i + j + k - h + 1   (mod. m),   0 <= eijkh < m,
S*15(x) = R3,5(x mod 3, x mod 5) - 1.

R3,5 is an order-(3,5) associated magic rectangle. For more information, see the page for Nasik magic cubes.

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.
This page was last updated on January 20, 2008.
"Magic Cubes and Tesseracts"   http://homepage2.nifty.com/googol/magcube/en/
Copyright © 2004-2008, Mitsutoshi Nakamura. All rights reserved.

RSS
blog seo tool : track word  blog SEO tool