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

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

A Nasik magic cube a_{ijk} of order m, where i,j,k = 0,...,m-1, is given by the following equation (a_{ijk} is also complete and 3D-compact):

a_{ijk} = **T**_{m}(b_{ijk}) m^{2} + **T**_{m}(c_{ijk}) m + **T**_{m}(d_{ijk}) + 1,

where

b_{ijk} = i + (m/4)j + (m/2)k (mod. m), 0 <= b_{ijk} < m,

c_{ijk} = (m/2)i + j + (m/4)k (mod. m), 0 <= c_{ijk} < m,

d_{ijk} = (m/4)i + (m/2)j + k (mod. m), 0 <= d_{ijk} < m,

**T**_{m}(x) = x (where x < m/2), 3m/2-1-x (otherwise) (identical to the definition of **T**_{m}(x) for pantriagonal magic cubes).

This cube is expressed as follows by the **XmlHypercube format** by Aale de Winkel:

for m = 8:

LP({1,2,4},{4,1,2},{2,4,1})= [0,1,2,3,7,6,5,4]

for m = 16:

LP({1,4,8},{8,1,4},{4,8,1})= [0,1,2,3,4,5,6,7,15,14,13,12,11,10,9,8]

In general:

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

The F. A. P. Barnard order-8 Nasik magic cube was constructed by a similar way to this method.

**Note**

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

**m >= 16** and m is divisible by 16 (**Nasik**, **complete**, but **not 3D-compact**) :

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

**m >= 16** and m is divisible by 8 but **not** by 16 (**Nasik**, **complete**, but **not 3D-compact**) :

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

Compare with the case of Nasik magic tesseracts.

**Addendum**

If the order is a power of 2, you can construct another Nasik magic cube by using **binary digits**. (The Gakuho Abe order-8 Nasik magic cube seems to have been constructed by this method.) For more information, see Dwane H. Campbell's site.

An associated Nasik magic cube (non-3D-compact) a_{ijk} of order m, where i,j,k = 0,...,m-1, is given by the following equation:

a_{ijk} = **U**_{m}(b_{ijk}) m^{2} + **U**_{m}(c_{ijk}) m + **U**_{m}(d_{ijk}) + 1,

where

b_{ijk} = i + (m/8)j + (m/4)k + 3m/16 (mod. m), 0 <= b_{ijk} < m,

c_{ijk} = (m/4)i + j + (m/8)k + 3m/16 (mod. m), 0 <= c_{ijk} < m,

d_{ijk} = (m/8)i + (m/4)j + k + 3m/16 (mod. m), 0 <= d_{ijk} < m,

**U**(x) = x (if x < m/4 or x >= 3m/4), m-1-x (otherwise) (identical to the definition of **T**_{m}(x) for pantriagonal magic cubes).

This cube is expressed as follows by the **XmlHypercube format** by Aale de Winkel:

for m = 16:

LP({1,2,4},{4,1,2},{2,4,1})= [3,11,10,9,8,7,6,5,4,12,13,14,15,0,1,2]

for m = 32:

LP({1,4,8},{8,1,4},{4,8,1})= [6,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]

An associated Nasik magic cube (non-3D-compact) a_{ijk} of order m, where i,j,k = 0,...,m-1, is given by the following equation:

a_{ijk} = **U**_{m,4}(b_{ijk}) m^{2} + **U**_{m,4}(c_{ijk}) m + **U**_{m,4}(d_{ijk}) + 1,

where

b_{ijk} = 4i + (m/8)j + (m/4)k + 3(m/8+1)/2 (mod. m), 0 <= b_{ijk} < m,

c_{ijk} = (m/4)i + 4j + (m/8)k + 3(m/8+1)/2 (mod. m), 0 <= c_{ijk} < m,

d_{ijk} = (m/8)i + (m/4)j + 4k + 3(m/8+1)/2 (mod. m), 0 <= d_{ijk} < m,

**U**_{m,4}(x) = **P**_{m,8}(x mod 8, x mod (m/8)).

**P**_{m,8}(x, y) (where 0 <= x < 8, 0 <= y < m/8) is given by the following table, where e = m/8 and q = (m/8-3)/2.

When m = 24 (q = 0), only the center part colored by dark green is available.

0 | 8+0 | ... | 8(q-1)+0 | 8q+0 | 8q+4 | 8q+9 | 8(q-1)+7 | ... | 8+7 | 7 |

3 | 8+3 | ... | 8(q-1)+3 | 8q+11 | 8q+8 | 8q+1 | 8(q-1)+4 | ... | 8+4 | 4 |

5 | 8+5 | ... | 8(q-1)+5 | 8q+3 | 8q+10 | 8q+7 | 8(q-1)+2 | ... | 8+2 | 2 |

6 | 8+6 | ... | 8(q-1)+6 | 8q+5 | 8q+6 | 8q+2 | 8(q-1)+1 | ... | 8+1 | 1 |

8(e-1)+6 | 8(e-2)+6 | ... | 8(e-q)+6 | 8q+21 | 8q+17 | 8q+18 | 8(e-q)+1 | ... | 8(e-2)+1 | 8(e-1)+1 |

8(e-1)+5 | 8(e-2)+5 | ... | 8(e-q)+5 | 8q+16 | 8q+13 | 8q+20 | 8(e-q)+2 | ... | 8(e-2)+2 | 8(e-1)+2 |

8(e-1)+3 | 8(e-2)+3 | ... | 8(e-q)+3 | 8q+22 | 8q+15 | 8q+12 | 8(e-q)+4 | ... | 8(e-2)+4 | 8(e-1)+4 |

8(e-1)+0 | 8(e-2)+0 | ... | 8(e-q)+0 | 8q+14 | 8q+19 | 8q+23 | 8(e-q)+7 | ... | 8(e-2)+7 | 8(e-1)+7 |

Compare with the definition of

(1) 0 <=

(2) If

(3) Sum

(4) Sum

(5)

The following are examples for m = 24 and m = 40.

0 | 4 | 9 |

11 | 8 | 1 |

3 | 10 | 7 |

5 | 6 | 2 |

21 | 17 | 18 |

16 | 13 | 20 |

22 | 15 | 12 |

14 | 19 | 23 |

0 | 8 | 12 | 17 | 7 |

3 | 19 | 16 | 9 | 4 |

5 | 11 | 18 | 15 | 2 |

6 | 13 | 14 | 10 | 1 |

38 | 29 | 25 | 26 | 33 |

37 | 24 | 21 | 28 | 34 |

35 | 30 | 23 | 20 | 36 |

32 | 22 | 27 | 31 | 39 |

x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

U_{24,4}(x) | 0 | 8 | 7 | 5 | 17 | 20 | 22 | 19 | 9 | 11 | 10 | 2 | 21 | 13 | 12 | 14 | 4 | 1 | 3 | 6 | 18 | 16 | 15 | 23 |

x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

U_{40,4}(x) | 0 | 19 | 18 | 10 | 33 | 37 | 30 | 27 | 17 | 4 | 5 | 13 | 25 | 28 | 36 | 32 | 8 | 16 | 15 | 1 |

x | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |

U_{40,4}(x) | 38 | 24 | 23 | 31 | 7 | 3 | 11 | 14 | 26 | 34 | 35 | 22 | 12 | 9 | 2 | 6 | 29 | 21 | 20 | 39 |

Expression by the

for m = 24:

LP({4,3,6},{6,4,3},{3,6,4})= [22,19,9,11,10,2,21,13,12,14,4,1,3,6,18,16,15,23,0,8,7,5,17,20]

for m = 40:

LP({4,5,10},{10,4,5},{5,10,4})= [4,5,13,25,28,36,32,8,16,15,1,38,24,23,31,7,3,11,14,26,34,35,22,12,9,26,29,21,20,39,0,19,18,10,33,37,30,27,17]

Back

An associated 3D-compact Nasik magic cube a_{ijk} of order m, where i,j,k = 0,...,m-1, is given by the following equation:

a_{ijk} = b_{ijk} m^{2} + c_{ijk} m + d_{ijk} + 1,

where

b_{ijk} = **U**_{m}(b^{*}_{ijk}) (if the index i is even), m - 1 - **U**_{m}(b^{*}_{ijk}) (if i is odd),

c_{ijk} = **U**_{m}(c^{*}_{ijk}) (if the index j is even), m - 1 - **U**_{m}(c^{*}_{ijk}) (if j is odd),

d_{ijk} = **U**_{m}(d^{*}_{ijk}) (if the index k is even), m - 1 - **U**_{m}(d^{*}_{ijk}) (if k is odd),

b^{*}_{ijk} = j^{*} + (m/8)k^{*} (mod. m), 0 <= b^{*}_{ijk} < m,

c^{*}_{ijk} = k^{*} + (m/8)i^{*} (mod. m), 0 <= c^{*}_{ijk} < m,

d^{*}_{ijk} = i^{*} + (m/8)j^{*} (mod. m), 0 <= d^{*}_{ijk} < 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),

**U**_{m}(x) = x (x < m/4 or x >= 3m/4), m-1-x (otherwise) (the same as the definition of **U**_{m}(x) in 1.2.1).

An associated 3D-compact Nasik magic cube a_{ijk} of order m, where i,j,k = 0,...,m-1, is given by the following equation:

a_{ijk} = b_{ijk} m^{2} + c_{ijk} m + d_{ijk} + 1,

where

a_{ijk} = b_{ijk} m^{2} + c_{ijk} m + d_{ijk} + 1,

where

b_{ijk} = **U**_{m,4}(b^{*}_{ijk}) (if the index i is even), m - 1 - **U**_{m,4}(b^{*}_{ijk}) (if i is odd),

c_{ijk} = **U**_{m,4}(c^{*}_{ijk}) (if the index j is even), m - 1 - **U**_{m,4}(c^{*}_{ijk}) (if j is odd),

d_{ijk} = **U**_{m,4}(d^{*}_{ijk}) (if the index k is even), m - 1 - **U**_{m,4}(d^{*}_{ijk}) (if k is odd),

b^{*}_{ijk} = 2j^{*} + (m/8)k^{*} (mod. m), 0 <= b^{*}_{ijk} < m,

c^{*}_{ijk} = 2k^{*} + (m/8)i^{*} (mod. m), 0 <= c^{*}_{ijk} < m,

d^{*}_{ijk} = 2i^{*} + (m/8)j^{*} (mod. m), 0 <= d^{*}_{ijk} < 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),

**U**_{m,4}(x) = **P**_{m,8}(x mod 8, x mod (m/8)) (the same as the definition of **U**_{m,4}(x) in 1.2.2).

A Nasik (namely, pan-2,3-agonal) magic cube of **odd** order m can exist only if the order is higher by 8, and an associated Nasik magic cube of **odd** order can exist under the same condition.

The function **gcd** means the greatest common divisor.

In this case, m is prime to 3, 5, and 7.

A Nasik magic cube a_{ijk} of order m, where i,j,k = 0,...,m-1, is given by the following equation:

a_{ijk} = b_{ijk} m^{2} + c_{ijk} m + d_{ijk} + 1,

where

b_{ijk} = i + 2j + 4k + 3 (mod. m), 0 <= b_{ijk} < m,

c_{ijk} = i - 2j + 4k + 1 (mod. m), 0 <= c_{ijk} < m,

d_{ijk} = i + 2j - 4k - 1 (mod. m), 0 <= d_{ijk} < m.

This cube is expressed as follows by the **XmlHypercube format** by Aale de Winkel:

LP({1,2,4}+3,{1,-2,4}+1,{1,2,-4}-1)

Let q be **gcd**(m, 3x5x7) and p be m/q. In this case, p > 1 and q > 1.

A Nasik magic cube a_{ijk}, where i,j,k = 0,...,m-1, is given by the following equation:

a_{ijk} = **S**_{m,q}(b_{ijk}) m^{2} + **S**_{m,q}(c_{ijk}) m + **S**_{m,q}(d_{ijk}) + 1,

where

b_{ijk} = i + 2j + 4k + 3 (mod. m), 0 <= b_{ijk} < m,

c_{ijk} = i - 2j + 4k + 1 (mod. m), 0 <= c_{ijk} < m,

d_{ijk} = i + 2j - 4k - 1 (mod. m), 0 <= d_{ijk} < m,

**S**_{m,q}(x) = **Q**_{p,q}([x/q], x mod q),

where [x] means the integer part of x.

**Q**_{p,q}(x, y), where 0 <= x < p and 0 <= y < q, is given by the following equations:

**Q**_{p,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).

**Q**_{p,q}(x, y) satifies the following properties (only these properties are needed for **Q**_{p,q}(x, y)).

(1) 0 <= **Q**_{p,q}(x, y) < pq (= m),

(2) If **Q**_{p,q}(x, y) = **Q**_{p,q}(x', y') then x = x' and y = y' (normal),

(3) Sum_{v=0,p-1} {**Q**_{p,q}(v, y)} = q(pq-1)/2 (column magicness),

(4) **Q**_{p,q}(x, y) + **Q**_{p,q}(p-1-x, q-1-y) = pq-1 (associated).

The following are examples of **Q**_{p,q}(x, y) and **S**_{m,q}(x) for m = 9 (p = 3, q = 3), m = 25 (p = 5, q = 5), and m = 45 (p = 3, q = 15).

1 | 0 | 2 |

5 | 4 | 3 |

6 | 8 | 7 |

2 | 0 | 3 | 1 | 4 |

9 | 8 | 7 | 6 | 5 |

10 | 11 | 12 | 13 | 14 |

19 | 18 | 17 | 16 | 15 |

20 | 23 | 21 | 24 | 22 |

7 | 0 | 8 | 1 | 9 | 2 | 10 | 3 | 11 | 4 | 12 | 5 | 13 | 6 | 14 |

29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 |

30 | 38 | 31 | 39 | 32 | 40 | 33 | 41 | 34 | 42 | 35 | 43 | 36 | 44 | 37 |

Note: These

x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---|---|---|---|---|---|---|---|---|---|

S_{9,3}(x) | 1 | 0 | 2 | 5 | 4 | 3 | 6 | 8 | 7 |

x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

S_{25,5}(x) | 2 | 0 | 3 | 1 | 4 | 9 | 8 | 7 | 6 | 5 | 10 | 11 | 12 | 13 | 14 | 19 | 18 | 17 | 16 | 15 | 20 | 23 | 21 | 24 | 22 |

x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

S_{45,15}(x) | 7 | 0 | 8 | 1 | 9 | 2 | 10 | 3 | 11 | 4 | 12 | 5 | 13 | 6 | 14 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 |

x | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | |

S_{45,15}(x) | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 30 | 38 | 31 | 39 | 32 | 40 | 33 | 41 | 34 | 42 | 35 | 43 | 36 | 44 | 37 |

In this case, m is equal to 15(=3x5), 21(=3x7), 35(=5x7), or 105(=3x5x7).

A Nasik magic cube a_{ijk} of order m, where i,j,k = 0,...,m-1, is given by the following equation:

a_{ijk} = **S**^{*}_{m}(b_{ijk}) m^{2} + **S**^{*}_{m}(c_{ijk}) m + **S**^{*}_{m}(d_{ijk}) + 1,

where

b_{ijk} = i + 2j + 4k + 3 (mod. m), 0 <= b_{ijk} < m,

c_{ijk} = i - 2j + 4k + 1 (mod. m), 0 <= c_{ijk} < m,

d_{ijk} = i + 2j - 4k - 1 (mod. m), 0 <= d_{ijk} < m,

**S**^{*}_{15}(x) = **R**_{3,5}(x mod 3, x mod 5) - 1,

**S**^{*}_{21}(x) = **R**_{3,7}(x mod 3, x mod 7) - 1,

**S**^{*}_{35}(x) = **R**_{5,7}(x mod 5, x mod 7) - 1,

**S**^{*}_{105}(x) = **R**_{3,5,7}(x mod 3, x mod 5, x mod 7) - 1.

**R**_{3,5}, **R**_{3,7}, **R**_{5,7}, and **R**_{3,5,7} are associated magic rectangles of orders (3,5), (3,7), (5,7), and (3,5,7), respectively. Concretely, they are given by the following tables:

**magic rectangles of orders (3,5), (3,7), and (5,7) (associated)**

14 | 10 | 4 | 5 | 7 |

1 | 3 | 8 | 13 | 15 |

9 | 11 | 12 | 6 | 2 |

10 | 21 | 9 | 16 | 5 | 14 | 2 |

3 | 4 | 7 | 11 | 15 | 18 | 19 |

20 | 8 | 17 | 6 | 13 | 1 | 12 |

26 | 19 | 8 | 31 | 25 | 13 | 4 |

20 | 6 | 34 | 24 | 14 | 1 | 27 |

3 | 7 | 15 | 18 | 21 | 29 | 33 |

9 | 35 | 22 | 12 | 2 | 30 | 16 |

32 | 23 | 11 | 5 | 28 | 17 | 10 |

70 | 54 | 35 | 99 | 22 | 87 | 4 |

63 | 29 | 93 | 45 | 92 | 24 | 25 |

89 | 94 | 38 | 9 | 18 | 67 | 56 |

41 | 31 | 40 | 34 | 48 | 76 | 101 |

2 | 57 | 59 | 78 | 85 | 11 | 79 |

62 | 10 | 103 | 32 | 90 | 23 | 51 |

91 | 100 | 8 | 42 | 1 | 60 | 69 |

20 | 26 | 33 | 53 | 73 | 80 | 86 |

37 | 46 | 105 | 64 | 98 | 6 | 15 |

55 | 83 | 16 | 74 | 3 | 96 | 44 |

27 | 95 | 21 | 28 | 47 | 49 | 104 |

5 | 30 | 58 | 72 | 66 | 75 | 65 |

50 | 39 | 88 | 97 | 68 | 12 | 17 |

81 | 82 | 14 | 61 | 13 | 77 | 43 |

102 | 19 | 84 | 7 | 71 | 52 | 36 |

For example,

x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

S^{*}_{15}(x) | 13 | 2 | 11 | 4 | 14 | 8 | 9 | 7 | 5 | 6 | 0 | 10 | 3 | 12 | 1 |

Addendum:

For m = 105, we can use a magic rectangle of order (3,35), (5,21), or (7,15) instead of that of order (3,5,7). (Aale de Winkel pointed out that.) We can construct these magic rectangles by using the order-(3,5,7) magic rectangle, or without using it. For more information, see this page for magic rectangles.

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

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.