Intrigued by the notion in other posts and comments that there might be solutions to this problem involving Hamiltonian paths, I wrote a program to do breadth-first enumeration of such paths for the 3x3x3 case, and got some interesting results. One nice aspect is that on bipartite graphs, no checking for divisibility by 2 of adjacent pairs is needed, and as a result the number of divisibility checks is halved (so vertices labeled 3 and 9 will never be adjacent).
The results are unverified; the current output is
! 1145801 -19-22-25-26-23-20-21-24-27-18-15-12-3-6-9-8-17-14-11-10-13-16-7-4-1-2-5-
! 1145802 -21-24-27-26-23-20-19-22-25-16-13-10-1-4-7-8-17-14-11-12-15-18-9-6-3-2-5-
! 1145803 -19-22-25-26-23-20-21-24-27-18-15-12-3-6-9-8-7-4-1-10-13-16-17-14-11-2-5-
! 1145804 -21-24-27-26-23-20-19-22-25-16-13-10-1-4-7-8-9-6-3-12-15-18-17-14-11-2-5-
! 1145805 -21-24-27-18-15-12-3-6-9-8-7-4-1-10-13-16-25-22-19-20-23-26-17-14-11-2-5-
! 1145806 -19-22-25-16-13-10-1-4-7-8-9-6-3-12-15-18-27-24-21-20-23-26-17-14-11-2-5-
where the output corresponds to a path based on my enumeration of the vertices.
Solution 1145801 corresponds to:
3 2 15 # 8 9 16 # 27 22 21
4 1 14 # 7 10 17 # 26 23 20
5 12 13 # 6 11 18 # 25 24 19
I have not checked all the results, but I believe there are 4 non-isomorphic solutions,
all starting with 1 in the middle of the bottom square. I invite verification of this.
I also took some statistics on paths of intermediate lengths. I can't properly normalize them, but they suggest interesting growth patterns which are likely a consequence of the gcd restriction. I wonder if growth patterns from such enumerations of partial structures have been studied, and if a solution can be predicted from such growth patterns. In particular, can one predict that there would be a small number of nonisomorphic solutions in this case.
Based on other small examples, I have found Hamilton path enumerations for all of them and
would like to see a conjecture on (the shape of parameters for) a grid graph that has a solution which is non Hamiltonian, and no Hamiltonian solutions.
I will update this with some more results.
Gerhard "Ask Me About Sloppy Coding" Paseman, 2014.04.07