Home Site Map Top Prev. Next 3-D (

A pantriagonal magic cube can exist for any order divisible by 4. An associated pantriagonal magic cube can exist under the same condition. If the order is higher than 4, there exists a pantriagonal diagonal magic cube, which satisfies a stronger condition than pantriagonal. Furthermore, if the order is divisible by 8, there exists a Nasik magic cube, which satisfies a stronger condition than pantriagonal diagonal.

a

where

b

c

d

This cube is expressed as follows by the

for m = 4:

LP({1,2,2},{2,1,2},{2,2,1})= [0,1,3,2]

for m = 8:

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

In general:

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

Back

a

where

b

c

d

h

r

The following is an example for m = 4:

0 | 3 | 0 | 3 |

2 | 1 | 2 | 1 |

1 | 2 | 1 | 2 |

3 | 0 | 3 | 0 |

1 | 2 | 1 | 2 |

3 | 0 | 3 | 0 |

0 | 3 | 0 | 3 |

2 | 1 | 2 | 1 |

2 | 1 | 2 | 1 |

0 | 3 | 0 | 3 |

3 | 0 | 3 | 0 |

1 | 2 | 1 | 2 |

3 | 0 | 3 | 0 |

1 | 2 | 1 | 2 |

2 | 1 | 2 | 1 |

0 | 3 | 0 | 3 |

0 | 1 | 2 | 3 |

1 | 2 | 3 | 0 |

2 | 3 | 0 | 1 |

3 | 0 | 1 | 2 |

2 | 1 | 0 | 3 |

1 | 0 | 3 | 2 |

0 | 3 | 2 | 1 |

3 | 2 | 1 | 0 |

2 | 3 | 0 | 1 |

3 | 0 | 1 | 2 |

0 | 1 | 2 | 3 |

1 | 2 | 3 | 0 |

0 | 3 | 2 | 1 |

3 | 2 | 1 | 0 |

2 | 1 | 0 | 3 |

1 | 0 | 3 | 2 |

0 | 1 | 3 | 2 |

1 | 3 | 2 | 0 |

3 | 2 | 0 | 1 |

2 | 0 | 1 | 3 |

3 | 1 | 0 | 2 |

1 | 0 | 2 | 3 |

0 | 2 | 3 | 1 |

2 | 3 | 1 | 0 |

3 | 2 | 0 | 1 |

2 | 0 | 1 | 3 |

0 | 1 | 3 | 2 |

1 | 3 | 2 | 0 |

0 | 2 | 3 | 1 |

2 | 3 | 1 | 0 |

3 | 1 | 0 | 2 |

1 | 0 | 2 | 3 |

0 | 1 | 2 | 3 |

3 | 0 | 1 | 2 |

2 | 3 | 0 | 1 |

1 | 2 | 3 | 0 |

1 | 2 | 3 | 0 |

0 | 1 | 2 | 3 |

3 | 0 | 1 | 2 |

2 | 3 | 0 | 1 |

2 | 3 | 0 | 1 |

1 | 2 | 3 | 0 |

0 | 1 | 2 | 3 |

3 | 0 | 1 | 2 |

3 | 0 | 1 | 2 |

2 | 3 | 0 | 1 |

1 | 2 | 3 | 0 |

0 | 1 | 2 | 3 |

0 | 2 | 1 | 3 |

3 | 0 | 2 | 1 |

1 | 3 | 0 | 2 |

2 | 1 | 3 | 0 |

2 | 1 | 3 | 0 |

0 | 2 | 1 | 3 |

3 | 0 | 2 | 1 |

1 | 3 | 0 | 2 |

1 | 3 | 0 | 2 |

2 | 1 | 3 | 0 |

0 | 2 | 1 | 3 |

3 | 0 | 2 | 1 |

3 | 0 | 2 | 1 |

1 | 3 | 0 | 2 |

2 | 1 | 3 | 0 |

0 | 2 | 1 | 3 |

Here is the order-4 associated pantriagonal magic cube constructed by these b

Back

A pantriagonal magic cube of **odd** order can exist only if the order is higher than 4. An associated pantriagonal magic cube of **odd** order can exist under the same condition. If the order is higher than 8, there exists a Nasik magic cube, which satisfies a stronger condition than pantriagonal.

a

where

b

c

d

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

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

where

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

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

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

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

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

**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).

See the page for Nasik magic cubes to see examples of **Q**_{p,q}(x, y) and **S**_{m,q}(x).

A pantriagonal magic cube exists for any singly-even (even but **not** divisible by 4) order higher than 4. An associated pantriagonal magic cube of singly-even order also exists under the same condition.

a

m

a

where

b

c

d

F

4(x+1) - y - 1 (if x < m/2-2 and x is odd),

4(x+2) - y - 2 (if x = m/2-1),

q

3 - 2[2i/m] - [2j/m] (if k >= m/2).

The following tables are examples of F

0 | 1 | 2 | 3 | |
---|---|---|---|---|

0 | 0 | 1 | 2 | 3 |

1 | 4 | 5 | 6 | 7 |

2 | 14 | 12 | 10 | 8 |

0 | 4 | 14 | 1 | 5 | 12 |

4 | 14 | 0 | 5 | 12 | 1 |

14 | 0 | 4 | 12 | 1 | 5 |

2 | 6 | 10 | 3 | 7 | 8 |

6 | 10 | 2 | 7 | 8 | 3 |

10 | 2 | 6 | 8 | 3 | 7 |

4 | 14 | 0 | 5 | 12 | 1 |

14 | 0 | 4 | 12 | 1 | 5 |

0 | 4 | 14 | 1 | 5 | 12 |

6 | 10 | 2 | 7 | 8 | 3 |

10 | 2 | 6 | 8 | 3 | 7 |

2 | 6 | 10 | 3 | 7 | 8 |

14 | 0 | 4 | 12 | 1 | 5 |

0 | 4 | 14 | 1 | 5 | 12 |

4 | 14 | 0 | 5 | 12 | 14 |

10 | 2 | 6 | 8 | 3 | 7 |

2 | 6 | 10 | 3 | 7 | 8 |

6 | 10 | 2 | 7 | 8 | 3 |

3 | 7 | 8 | 2 | 6 | 10 |

7 | 8 | 3 | 6 | 10 | 2 |

8 | 3 | 7 | 10 | 2 | 6 |

1 | 5 | 12 | 0 | 4 | 14 |

5 | 12 | 1 | 4 | 14 | 0 |

12 | 1 | 5 | 14 | 0 | 4 |

7 | 8 | 3 | 6 | 10 | 2 |

8 | 3 | 7 | 10 | 2 | 6 |

3 | 7 | 8 | 2 | 6 | 10 |

5 | 12 | 1 | 4 | 14 | 0 |

12 | 1 | 5 | 14 | 0 | 4 |

1 | 5 | 12 | 0 | 4 | 14 |

8 | 3 | 7 | 10 | 2 | 6 |

3 | 7 | 8 | 2 | 6 | 10 |

7 | 8 | 3 | 6 | 10 | 2 |

12 | 1 | 5 | 14 | 0 | 4 |

1 | 5 | 12 | 0 | 4 | 14 |

5 | 12 | 14 | 4 | 14 | 0 |

1 | 44 | 132 | 10 | 53 | 114 |

41 | 129 | 7 | 50 | 111 | 16 |

135 | 4 | 38 | 117 | 13 | 47 |

19 | 62 | 96 | 28 | 71 | 78 |

59 | 93 | 25 | 68 | 75 | 34 |

99 | 22 | 56 | 81 | 31 | 65 |

42 | 127 | 8 | 51 | 109 | 17 |

133 | 5 | 39 | 115 | 14 | 48 |

2 | 45 | 130 | 11 | 54 | 112 |

60 | 91 | 26 | 69 | 73 | 35 |

97 | 23 | 57 | 79 | 32 | 66 |

20 | 63 | 94 | 29 | 72 | 76 |

134 | 6 | 37 | 116 | 15 | 46 |

3 | 43 | 131 | 12 | 52 | 113 |

40 | 128 | 9 | 49 | 110 | 18 |

98 | 24 | 55 | 80 | 33 | 64 |

21 | 61 | 95 | 30 | 70 | 77 |

58 | 92 | 27 | 67 | 74 | 36 |

28 | 71 | 78 | 19 | 62 | 96 |

68 | 75 | 34 | 59 | 93 | 25 |

81 | 31 | 65 | 99 | 22 | 56 |

10 | 53 | 114 | 1 | 44 | 132 |

50 | 111 | 16 | 41 | 129 | 7 |

117 | 13 | 47 | 135 | 4 | 38 |

69 | 73 | 35 | 60 | 91 | 26 |

79 | 32 | 66 | 97 | 23 | 57 |

29 | 72 | 76 | 20 | 63 | 94 |

51 | 109 | 17 | 42 | 127 | 8 |

115 | 14 | 48 | 133 | 5 | 39 |

11 | 54 | 112 | 2 | 45 | 130 |

80 | 33 | 64 | 98 | 24 | 55 |

30 | 70 | 77 | 21 | 61 | 95 |

67 | 74 | 36 | 58 | 92 | 27 |

116 | 15 | 46 | 134 | 6 | 37 |

12 | 52 | 113 | 3 | 43 | 131 |

49 | 110 | 18 | 40 | 128 | 9 |

1 | 44 | 132 | 207 | 164 | 103 |

41 | 129 | 7 | 167 | 106 | 201 |

135 | 4 | 38 | 100 | 204 | 170 |

198 | 155 | 121 | 28 | 71 | 78 |

158 | 124 | 192 | 68 | 75 | 34 |

118 | 195 | 161 | 81 | 31 | 65 |

42 | 127 | 8 | 166 | 108 | 200 |

133 | 5 | 39 | 102 | 203 | 169 |

2 | 45 | 130 | 206 | 163 | 105 |

157 | 126 | 191 | 69 | 73 | 35 |

120 | 194 | 160 | 79 | 32 | 66 |

197 | 154 | 123 | 29 | 72 | 76 |

134 | 6 | 37 | 101 | 202 | 171 |

3 | 43 | 131 | 205 | 165 | 104 |

40 | 128 | 9 | 168 | 107 | 199 |

119 | 193 | 162 | 80 | 33 | 64 |

196 | 156 | 122 | 30 | 70 | 77 |

159 | 125 | 190 | 67 | 74 | 36 |

189 | 146 | 139 | 19 | 62 | 96 |

149 | 142 | 183 | 59 | 93 | 25 |

136 | 186 | 152 | 99 | 22 | 56 |

10 | 53 | 114 | 216 | 173 | 85 |

50 | 111 | 16 | 176 | 88 | 210 |

117 | 13 | 47 | 82 | 213 | 179 |

148 | 144 | 182 | 60 | 91 | 26 |

138 | 185 | 151 | 97 | 23 | 57 |

188 | 145 | 141 | 20 | 63 | 94 |

51 | 109 | 17 | 175 | 90 | 209 |

115 | 14 | 48 | 84 | 212 | 178 |

11 | 54 | 112 | 215 | 172 | 87 |

137 | 184 | 153 | 98 | 24 | 55 |

187 | 147 | 140 | 21 | 61 | 95 |

150 | 143 | 181 | 58 | 92 | 27 |

116 | 15 | 46 | 83 | 211 | 180 |

12 | 52 | 113 | 214 | 174 | 86 |

49 | 110 | 18 | 177 | 89 | 208 |

Back

An associated pantriagonal magic cube a_{ijk} of order m, where i,j,k = 0,...,m-1, is given by the following equations:

a_{ijk} = b_{ijk} (m/2)^{3} + c_{ijk} + 1,

where

b_{ijk} =
v_{1}
(if t = (m-2)/4),

7-v_{0}
(if t < (m-2)/4 and t + (m-2)/4 is even),

v_{0}
(if t < (m-2)/4 and t + (m-2)/4 is odd),

c_{ijk} =
k^{*} (m/2)^{2} + i^{*} (m/2) + j^{*}
(if i+j+k is even),

(m/2)^{3} - 1 - {k^{*} (m/2)^{2} + i^{*} (m/2) + j^{*}}
(if i+j+k is odd),

where

i^{*} =
i/2
(if i is even),

(m-1-i)/2
(if i is odd),

j^{*} =
j/2
(if j is even),

(m-1-j)/2
(if j is odd),

k^{*} =
k/2
(if k is even),

(m-1-k)/2
(if k is odd),

t =
min[{(i^{*} + j^{*} - 2k^{*}) mod (m/2)}, {(-i^{*} - j^{*} + 2k^{*}) mod (m/2)}],

v_{0} =
4(k mod 2) + 2(j mod 2) + {(i+j+k) mod 2},

v_{1} =
7 - v_{0}/2
(if v_{0} is even),

3 - (v_{0}-1)/2
(if v_{0} is odd).

By generalizing this method, we can construct an associated panmagic hypercube of any singly-even order and any **odd** dimension.

If m is 10 or higher singly-even integer, we can construct another associated pantriagonal magic cube of order m. Such a magic cube a_{ijk}, where i,j,k = 0,...,m-1, is given by the following equations:

when m is **not** divisible by 3:

a_{ijk} = b_{ijk} (m/2)^{3} + c_{ijk} (m/2)^{2} + d_{ijk} (m/2) + e_{ijk} + 1,

when m is divisible by 3:

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

where

**S**_{m/3}(x) = **Q**_{m/6,3}([x/3], x mod 3).

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

**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).

See the page for Nasik magic cubes to see examples of **Q**_{p,q}(x, y) and **S**_{m,q}(x).

The cubes b_{ijk}, c_{ijk}, d_{ijk}, and e_{ijk} are defined as follows:

b_{ijk} = **G**^{*}_{8,m/2}(v, z),

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

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

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

where

v = 4[2i/m] + 2[2j/m] + {([2i/m] + [2j/m] +[2k/m]) mod 2}, (0 <= v <= 7),

z = i + j + k - 3(m-2)/4 (mod. m/2), -(m-2)/4 <= z <= (m-2)/4.

The function **G**^{*}_{N,m/2}(v, z) (where N is a power of 2, m/2 is odd, and 0 <= v < N) is defined as follows:

when m/2 = 3 (mod. 4):

**G**^{*}_{N,m/2}(v, z) =
v
(if z = 0),

v/2
(if |z| > 0, z is even, and v is even),

N/2 + (v-1)/2
(if |z| > 0, z is even, and v is odd),

N - 1 - v/2
(if |z| > 0, z is odd, and v is even),

N/2 - 1 - (v-1)/2
(if |z| > 0, z is odd, and v is odd).

when m/2 = 1 (mod. 4):

**G**^{*}_{N,m/2}(v, z) =
v
(if z = 0),

N - 1 - v
(if |z| = 1),

v/2
(if |z| > 1, z is even, and v is even),

N/2 + (v-1)/2
(if |z| > 1, z is even, and v is odd),

N - 1 - v/2
(if |z| > 1, z is odd, and v is even),

N/2 - 1 - (v-1)/2
(if |z| > 1, z is odd, and v is odd).

The function **G**^{*}_{N,m/2}(v, z) satifies the following properties (only these properties are needed for **G**^{*}_{N,m/2}(v, z)).

(1) { **G**^{*}_{N,m/2}(v, z) | 0 <= v < N } = { 0, 1, ..., N-1 } for every integer z,

(2) The sum Sum_{z=0,m/2-1}{**G**^{*}_{N,m/2}(2v, z)} is independent of v,

(3) Sum_{z=0,m/2-1}{**G**^{*}_{N,m/2}(2v, z)} + Sum_{z=0,m/2-1}{**G**^{*}_{N,m/2}(2v+1, z)} = (N-1)m/2,

(4) **G**^{*}_{N,m/2}(v, z) = **G**^{*}_{N,m/2}(v, -z),

(5) **G**^{*}_{N,m/2}(v, z) + **G**^{*}_{N,m/2}(N-1-v, z) = N-1.

Here is an example for m = 10.

Home Site Map Top Prev. Next 3-D (

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.