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

Algorithms to make Nasik magic tesseracts

[Order 16x] [Order 2x+1]

1. Algorithms for orders divisible by 16

   A Nasik magic tesseract (namely, a pan-2,3,4-agonal magic tesseract) of even order can exist only if the order is divisible by 16. In this case, if the order is 32 or higher, an associated Nasik magic tesseract, which is 4D-compact or non-4D-compact, exists.

1.1 Non-associated Nasik magic tesseracts (m = 16x) (also complete and 4D-compact)

A Nasik magic tesseract aijkh of order m, where i,j,k,h = 0,...,m-1, is given by the following equation (aijkh is also complete and 4D-compact):
aijkh = Tm(bijkh) m3 + Tm(cijkh) m2 + Tm(dijkh) m + Tm(eijkh) + 1,

where
bijkh = i + (m/8)j + (m/4)k + (m/2)h   (mod. m),   0 <= bijkh < m,
cijkh = (m/2)i + j + (m/8)k + (m/4)h   (mod. m),   0 <= cijkh < m,
dijkh = (m/4)i + (m/2)j + k + (m/8)h   (mod. m),   0 <= dijkh < m,
eijkh = (m/8)i + (m/4)j + (m/2)k + h   (mod. m),   0 <= eijkh < m,
Tm(x) = x (where x < m/2), 3m/2-1-x (otherwise)    (identical to the definition of Tm(x) for pantriagonal magic cubes).

This tesseract is expressed as follows by the XmlHypercube format by Aale de Winkel:
for m = 16:
   LP({1,2,4,8},{8,1,2,4},{4,8,1,2},{2,4,8,1})= [0,1,2,3,4,5,6,7,15,14,13,12,11,10,9,8]
In general:
   LP({1,m/8,m/4,m/2},{m/2,1,m/8,m/4},{m/4,m/2,1,m/8},{m/8,m/4,m/2,1})= [0,..,m/2-1,m-1,...,m/2]

Note
   It can be proved that every order-16 Nasik magic tesseract is complete and 4D-compact, so an order-16 associated Nasik magic tesseract cannot exist. On the other hand, if the order is higher than 16 and divisible by 16, there exists a Nasik magic tesseract which is not complete or not 4D-compact. See 1.2 and 1.3 for non-complete Nasik magic tesseracts. A Nasik magic tesseract which is complete but not 4D-compact is constructed by the following XmlHypercube format.
   There cannot exist a Nasik magic tesseract which is 2D-compact or 3D-compact.

m >= 32 and m is divisible by 32 (Nasik, complete, but not 4D-compact) :
   LP({1,m/16,m/8,m/4},{m/4,1,m/16,m/8},{m/8,m/4,1,m/16},{m/16,m/8,m/4,1})= [0,..,m/2-1,m-1,...,m/2]
m >= 32 and m is divisible by 16 but not by 32 (Nasik, complete, but not 4D-compact) :
   LP({8,m/16,m/8,m/4},{m/4,8,m/16,m/8},{m/8,m/4,8,m/16},{m/16,m/8,m/4,8})= [0,..,m/2-1,m-1,...,m/2]

Compare with the case of Nasik magic cubes.

Back

1.2 Assciated Nasik magic tesseracts (m = 16x, m >= 32) (non-4D-compact)

1.2.1 Case m = 32x

An associated Nasik magic tesseract (non-4D-compact) aijkh of order m, where i,j,k,h = 0,...,m-1, is given by the following equation:
aijkh = Um(bijkh) m3 + Um(cijkh) m2 + Um(dijkh) m + Um(eijkh) + 1,

where
bijkh = i + (m/16)j + (m/8)k + (m/4)h + 7m/32   (mod. m),   0 <= bijkh < m,
cijkh = (m/4)i + j + (m/16)k + (m/8)h + 7m/32   (mod. m),   0 <= cijkh < m,
dijkh = (m/8)i + (m/4)j + k + (m/16)h + 7m/32   (mod. m),   0 <= dijkh < m,
eijkh = (m/16)i + (m/8)j + (m/4)k + h + 7m/32   (mod. m),   0 <= eijkh < m,
Um(x) = x (if x < m/4 or x >= 3m/4),   m-1-x (otherwise).

This tesseract is expressed as follows by the XmlHypercube format by Aale de Winkel:
for m = 32:
   LP({1,2,4,8},{8,1,2,4},{4,8,1,2},{2,4,8,1})= [7,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,24,25,26,27,28,29,30,31,0,1,2,3,4,5,6]

1.2.2 Case m = 32x+16 and m >= 48

An associated Nasik magic tesseract (non-4D-compact) aijkh of order m, where i,j,k,h = 0,...,m-1, is given by the following equation:
aijkh = Um,8(bijkh) m3 + Um,8(cijkh) m2 + Um,8(dijkh) m + Um,8(eijkh) + 1,

where
bijkh = 8i + (m/16)j + (m/8)k + (m/4)h + 7(m/16+1)/2   (mod. m),   0 <= bijkh < m,
cijkh = (m/4)i + 8j + (m/16)k + (m/8)h + 7(m/16+1)/2   (mod. m),   0 <= cijkh < m,
dijkh = (m/8)i + (m/4)j + 8k + (m/16)h + 7(m/16+1)/2   (mod. m),   0 <= dijkh < m,
eijkh = (m/16)i + (m/8)j + (m/4)k + 8h + 7(m/16+1)/2   (mod. m),   0 <= eijkh < m,.
Um,8(x) = Pm,16(x mod 16, x mod (m/16)).

Pm,16(x, y) (where 0 <= x < 16, 0 <= y < m/16) is given by the following table, where e = m/16 and q = (m/16-3)/2.
When m = 48 (q = 0), only the center part colored by dark green is available.

Pm,16(x, y)
016+0...16(q-1)+016q+016q+3016q+816(q-1)+15...16+1515
216+2...16(q-1)+216q+216q+2616q+1016(q-1)+13...16+1313
1216+12...16(q-1)+1216q+1116q+2416q+316(q-1)+3...16+33
1416+14...16(q-1)+1416q+916q+2816q+116(q-1)+1...16+11
516+5...16(q-1)+516q+516q+2016q+1316(q-1)+10...16+1010
716+7...16(q-1)+716q+716q+1616q+1516(q-1)+8...16+88
916+9...16(q-1)+916q+1416q+1816q+616(q-1)+6...16+66
1116+11...16(q-1)+1116q+1216q+2216q+416(q-1)+4...16+44
16(e-1)+1116(e-2)+11...16(e-q)+1116q+4316q+2516q+3516(e-q)+4...16(e-2)+416(e-1)+4
16(e-1)+916(e-2)+9...16(e-q)+916q+4116q+2916q+3316(e-q)+6...16(e-2)+616(e-1)+6
16(e-1)+716(e-2)+7...16(e-q)+716q+3216q+3116q+4016(e-q)+8...16(e-2)+816(e-1)+8
16(e-1)+516(e-2)+5...16(e-q)+516q+3416q+2716q+4216(e-q)+10...16(e-2)+1016(e-1)+10
16(e-1)+1416(e-2)+14...16(e-q)+1416q+4616q+1916q+3816(e-q)+1...16(e-2)+116(e-1)+1
16(e-1)+1216(e-2)+12...16(e-q)+1216q+4416q+2316q+3616(e-q)+3...16(e-2)+316(e-1)+3
16(e-1)+216(e-2)+2...16(e-q)+216q+3716q+2116q+4516(e-q)+13...16(e-2)+1316(e-1)+13
16(e-1)+016(e-2)+0...16(e-q)+016q+3916q+1716q+4716(e-q)+15...16(e-2)+1516(e-1)+15

Compare with the definition of Pm,8(x, y) for Nasik magic cubes.

Pm,16(x, y) satifies the following properties (only these properties are needed for Pm,16(x, y)).
(1) 0 <= Pm,16(x, y) < m,
(2) If Pm,16(x, y) = Pm,16(x', y') then x = x' and y = y'   (normal),
(3) Sumv=0,3 {Pm,16(x+4v, y)} = 2(m-1)   (for 0 <= x < 4 and 0 <= y < m/16),
(4) Sumv=0,m/16-1 {Pm,16(x, v) + Pm,16(x+8, v)} = m(m-1)/16   (for 0 <= x < 8),
(5) Pm,16(x, y) + Pm,16(15-x, m/16-1-y) = m-1   (associated).

Back

1.3 Assciated Nasik magic tesseracts (m = 16x, m >= 32) (also 4D-compact)

1.3.1 Case m = 32x

An associated 4D-compact Nasik magic 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 = Um(b*ijkh) (if i is even), m - 1 - Um(b*ijkh) (if i is odd),
cijkh = Um(c*ijkh) (if j is even), m - 1 - Um(c*ijkh) (if j is odd),
dijkh = Um(d*ijkh) (if k is even), m - 1 - Um(d*ijkh) (if k is odd),
eijkh = Um(e*ijkh) (if h is even), m - 1 - Um(e*ijkh) (if h is odd),

b*ijkh = j* + (m/16)k* + (m/8)h*   (mod. m),   0 <= b*ijkh < m,
c*ijkh = k* + (m/16)h* + (m/8)i*   (mod. m),   0 <= c*ijkh < m,
d*ijkh = h* + (m/16)i* + (m/8)j*   (mod. m),   0 <= d*ijkh < m,
e*ijkh = i* + (m/16)j* + (m/8)k*   (mod. m),   0 <= e*ijkh < m,

i* = i (if i is even), m - 1 - i (if i is odd),
j* = j (if j is even), m - 1 - j (if j is odd),
k* = k (if k is even), m - 1 - k (if k is odd),
h* = h (if h is even), m - 1 - h (if h is odd),

Um(x) = x (x < m/4 or x >= 3m/4), m-1-x (otherwise)    (identical to the definition of Um(x) in 1.2.1).

1.3.2 Case m = 32x+16 and m >= 48

An associated 4D-compact Nasik magic 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 = Um,8(b*ijkh) (if i is even), m - 1 - Um,4(b*ijkh) (if i is odd),
cijkh = Um,8(c*ijkh) (if j is even), m - 1 - Um,4(c*ijkh) (if j is odd),
dijkh = Um,8(d*ijkh) (if k is even), m - 1 - Um,4(d*ijkh) (if k is odd),
eijkh = Um,8(e*ijkh) (if h is even), m - 1 - Um,4(d*ijkh) (if h is odd),

b*ijkh = 4j* + (m/16)k* + (m/8)h*   (mod. m),   0 <= b*ijkh < m,
c*ijkh = 4k* + (m/16)h* + (m/8)i*   (mod. m),   0 <= c*ijkh < m,
d*ijkh = 4h* + (m/16)i* + (m/8)j*   (mod. m),   0 <= d*ijkh < m,
e*ijkh = 4i* + (m/16)j* + (m/8)k*   (mod. m),   0 <= e*ijkh < m,

i* = i (if i is even), m - 1 - i (if i is odd),
j* = j (if j is even), m - 1 - j (if j is odd),
k* = k (if k is even), m - 1 - k (if k is odd),
h* = h (if h is even), m - 1 - h (if h is odd),

Um,8(x) = Pm,16(x mod 16, x mod (m/16)).    (identical to the definition of Um,8(x) in 1.2.2).

Back

2. Algorithms for odd orders

   A Nasik (namely, pan-2,3,4-agonal) magic tesseract of odd order can exist only if the order is higher than 16, and an associated Nasik magic tesseract of odd order can exist under the same condition.
   Let L15 be lcm{y| y is odd and 3 <= y <= 15} = 32x5x7x11x13, where lcm means the least common multiple, and gcd means the greatest common divisor.

2.1 Case m = 2x+1, m >= 17, and gcd(m, L15) = 1 (associated)

In this case, m is prime to 3, 5, 7, 11, and 13.
A Nasik magic 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 = i + 2j + 4k + 8h + 7   (mod. m),   0 <= bijkh < m,
cijkh = i - 2j + 4k + 8h + 5   (mod. m),   0 <= cijkh < m,
dijkh = i + 2j - 4k + 8h + 3   (mod. m),   0 <= dijkh < m,
eijkh = i + 2j + 4k - 8h - 1   (mod. m),   0 <= eijkh < m.

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

2.2 Case m = 2x+1, m >= 17, and 1 < gcd(m, L15) < m (associated)

Let q be gcd(m, L15) and p be m/q. In this case, p > 1 and q > 1.
A Nasik magic 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 = i + 2j + 4k + 8h + 7   (mod. m),   0 <= bijkh < m,
cijkh = i - 2j + 4k + 8h + 5   (mod. m),   0 <= cijkh < m,
dijkh = i + 2j - 4k + 8h + 3   (mod. m),   0 <= dijkh < m,
eijkh = i + 2j + 4k - 8h - 1   (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 magic cubes to see examples of Qp,q(x, y) and Sm,q(x).

2.3 Case m = 2x+1, m >= 17, and gcd(m, L15) = m (associated)

In this case, m is a divisor of L15 = 32x5x7x11x13.
A Nasik magic 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 = i + 2j + 4k + 8h + 7   (mod. m),   0 <= bijkh < m,
cijkh = i - 2j + 4k + 8h + 5   (mod. m),   0 <= cijkh < m,
dijkh = i + 2j - 4k + 8h + 3   (mod. m),   0 <= dijkh < m,
eijkh = i + 2j + 4k - 8h - 1   (mod. m),   0 <= eijkh < m,

where [x] means the integer part of x.
S**m(x) is defined as follows:

(1) if m is NOT equal to 45
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 7, 11, or 13).
Rq,m/q is an associated magic rectangle of order-(q,m/q). See the page for magic rectangles.

(2) if m is equal to 45
S**m(x) = R3,3,5((x/3) mod 3, x mod 3, x mod 5) - 1.

R3,3,5 is an associated 3-dimensional magic rectangle of order (3,3,5). Concretely, it is given by the following tables:

a magic rectangle of order (3,5,7) (associated) (shown as an order-(3,5,3) rectangle R3,5,3)

R3,5,3(x,y,0)
313381330
244112362
1425192037
R3,5,3(x,y,1)
29404357
118232845
391142617
R3,5,3(x,y,2)
926272132
441034522
163384315

Back


Home   Site Map   Top   Prev.   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.

This page was last updated on August 8, 2016.
"Magic Cubes and Tesseracts"   http://magcube.la.coocan.jp/magcube/en/
Copyright © 2004-2016, Mitsutoshi Nakamura. All rights reserved.

track feed Magic Cubes and Tesseracts RSS
SEO
loading
Magic Cubes and Tesseracts