Constructing magic knight tour hypercubes of dimension n and order 4
A magic knight tour hypercube is a magic hypercube in which the path from the cell (a) to the cell (a+1) of the hypercube, where a = 1,2,..., is always (2-dimensional) knight jump.
This page deals with magic knight tour hypercubes of dimension higher than 2 and order 4.
When n is odd and greater then 2, we can construct a magic knight tour hypercube of dimension n and order 4 by using a binary matrix as follows:
n = 3 :
A hypercube M to find is given as follows:
M[2x0 + x1, 2x2 + x3, 2x4 + x5] = 1 + 20a0 + 21a1 + 22a2 + 23a3 + 24a4 + 25a5,
  a0     0 1 0 1 0 1     x0  
  a1     0 1 1 1 0 1     x1 + 1  
  a2   =   1 1 1 0 1 0     x2   (mod. 2).
  a3     1 1 1 0 1 1     x3    
  a4     1 0 0 1 0 1     x4  
  a5     1 1 1 1 1 1     x5  
where each of ak, xk (k = 0, 1, ..., 5) is either 0 or 1.
(This formula uses x1 + 1 insted of x1 in order to make the knight tour closed, that is, the path from the maximum integer to 1 is also knight jump.)
M is a 1,3-agonal magic knight tour cube.
Note: Although M is also pan-3-agonal (pantriagonal), that is due to the speciality of dimension 3. If n > 3, M is not pan-n-agonal.
In general,  a pan-n-agonal magic knight tour hypercube of dimension n and order 4 exists only for n = 3.
n = 5 :
A hypercube M to find is given as follows:
M[2x0 + x1, 2x2 + x3, 2x4 + x5, 2x6 + x7, 2x8 + x9] = 1 + 20a0 + 21a1 + 22a2 + 23a3 + 24a4 + 25a5 + 26a6 + 27a7 + 28a8 + 29a9,
  a0     0 1 0 1 0 1 0 1 0 1     x0  
  a1     0 1 1 1 0 1 0 1 0 1     x1 + 1  
  a2     0 1 1 1 1 1 0 1 0 1     x2  
  a3     0 1 1 1 1 1 1 1 0 1     x3    
  a4   =   1 1 1 0 1 0 1 0 1 0     x4   (mod. 2).
  a5     1 1 1 1 1 0 1 0 1 0     x5    
  a6     1 1 1 1 1 1 1 0 1 0     x6  
  a7     1 1 1 1 1 1 1 0 1 1     x7    
  a8     1 0 0 1 0 1 0 1 0 1     x8  
  a9     1 1 1 1 1 1 1 1 1 1     x9  
where each of ak, xk (k = 0, 1, ..., 9) is either 0 or 1.
M is a 1,3,5-agonal magic knight tour hypercube.
n = 7 :
A hypercube M to find is given as follows:
M[2x0 + x1, 2x2 + x3, 2x4 + x5, 2x6 + x7, 2x8 + x9, 2x10 + x11, 2x12 + x13] =
1 + 20a0 + 21a1 + 22a2 + 23a3 + 24a4 + 25a5 + 26a6 + 27a7 + 28a8 + 29a9 + 210a10 + 211a11 + 212a12 + 213a13,
  a0     0 1 0 1 0 1 0 1 0 1 0 1 0 1     x0  
  a1     0 1 1 1 0 1 0 1 0 1 0 1 0 1     x1 + 1  
  a2     0 1 1 1 1 1 0 1 0 1 0 1 0 1     x2  
  a3     0 1 1 1 1 1 1 1 0 1 0 1 0 1     x3    
  a4     0 1 1 1 1 1 1 1 1 1 0 1 0 1     x4  
  a5     0 1 1 1 1 1 1 1 1 1 1 1 0 1     x5    
  a6   =   1 1 1 0 1 0 1 0 1 0 1 0 1 0     x6   (mod. 2).
  a7     1 1 1 1 1 0 1 0 1 0 1 0 1 0     x7    
  a8     1 1 1 1 1 1 1 0 1 0 1 0 1 0     x8  
  a9     1 1 1 1 1 1 1 1 1 0 1 0 1 0     x9    
  a10     1 1 1 1 1 1 1 1 1 1 1 0 1 0     x10  
  a11     1 1 1 1 1 1 1 1 1 1 1 0 1 1     x11    
  a12     1 0 0 1 0 1 0 1 0 1 0 1 0 1     x12  
  a13     1 1 1 1 1 1 1 1 1 1 1 1 1 1     x13  
where each of ak, xk (k = 0, 1, ..., 13) is either 0 or 1.
M is a 1,3,5,7-agonal magic knight tour hypercube.
In general, we can construst a 1,3,...,n-agonal magic knight tour hypercube of dimension n and order 4 for any odd n > 2 by a similar way.
Note: If n is even greater than 3, the hypercube M constructed by a similar way is only semimagic because n-agonals of M is not magic.
  It is an open problem whether a magic knight tour hypercube of dimension n and order 4 for even n greater than 3.
Remark:
The inverse formulae of these formulae are as follows:
n = 3 :
  x0     0 0 1 0 1 1     a0  
  x1 + 1     1 0 1 0 0 1     a1  
  x2   =   1 1 0 0 0 0     a2   (mod. 2).
  x3       0 0 0 1 0 1     a3  
  x4     0 1 1 0 1 0     a4  
  x5     0 0 1 1 0 0     a5  
n = 5 :
  x0     0 0 0 0 1 0 0 0 1 1     a0  
  x1 + 1     1 0 0 0 1 0 0 0 0 1     a1  
  x2     1 1 0 0 0 0 0 0 0 0     a2  
  x3       0 0 0 0 1 1 0 0 0 0     a3  
  x4   =   0 1 1 0 0 0 0 0 0 0     a4   (mod. 2).
  x5       0 0 0 0 0 1 1 0 0 0     a5  
  x6     0 0 1 1 0 0 0 0 0 0     a6  
  x7       0 0 0 0 0 0 0 1 0 1     a7  
  x8     0 0 0 1 1 0 0 0 1 0     a8  
  x9     0 0 0 0 0 0 1 1 0 0     a9  
n = 7 :
  x0     0 0 0 0 0 0 1 0 0 0 0 0 1 1     a0  
  x1 + 1     1 0 0 0 0 0 1 0 0 0 0 0 0 1     a1  
  x2     1 1 0 0 0 0 0 0 0 0 0 0 0 0     a2  
  x3       0 0 0 0 0 0 1 1 0 0 0 0 0 0     a3  
  x4     0 1 1 0 0 0 0 0 0 0 0 0 0 0     a4  
  x5       0 0 0 0 0 0 0 1 1 0 0 0 0 0     a5  
  x6   =   0 0 1 1 0 0 0 0 0 0 0 0 0 0     a6   (mod. 2).
  x7       0 0 0 0 0 0 0 0 1 1 0 0 0 0     a7  
  x8     0 0 0 1 1 0 0 0 0 0 0 0 0 0     a8  
  x9       0 0 0 0 0 0 0 0 0 1 1 0 0 0     a9  
  x10     0 0 0 0 1 1 0 0 0 0 0 0 0 0     a10  
  x11       0 0 0 0 0 0 0 0 0 0 0 1 0 1     a11  
  x12     0 0 0 0 0 1 1 0 0 0 0 0 1 0     a12  
  x13     0 0 0 0 0 0 0 0 0 0 1 1 0 0     a13  
By using these formulae, we can show that the hypercube M is normal and every path from (a) to (a+1), where a = 1,2,..., is knight jump.
                                                                                                             
August 26, 2016  Mitsutoshi Nakamura
Magic Cubes and Tesseracts http://magcube.la.coocan.jp/magcube/en/
Copyright © 2004-2016, Mitsutoshi Nakamura. All rights reserved.