Let's write the integers from 1 to 6 on the six faces of a cube such that pairs of consecutive numbers - and the pair 6, 1 as well - end up on adjacent faces. How many different arrangements are possible? (We do not consider two arrangements different if one can be transformed into the other by a symmetry of the cube - rotation, reflection in a plane or about the center, nor do we consider different two arrangements if one is obtained from the other by replacing each number with the number that is one greater, and 6 with 1.)
I. solution. Hold the cube so that one of its faces is vertically in front of us and label its top, front, bottom, left, back, and right faces as $F, E, A, B, H, J$ respectively.
![](https://cdn.mathpix.com/cropped/2024_05_02_da74a361244ecb581df3g-1.jpg?height=356&width=642&top_left_y=262&top_left_x=735)

According to the rules, consecutive numbers must be written on adjacent faces; the third number can be placed on a face parallel to the one containing the first number, or on a face adjacent to the previous two numbers. We will look for arrangements where three consecutive numbers are placed in the first mentioned manner and separately for those where this does not occur. (We also consider 1 as the number following 6.)

If there are three consecutive numbers on faces connected by parallel edges, then by adjusting the numbers by the same amount if necessary, we can achieve that these are 1, 2, 3, and by rotating the cube, we can place them on $F$, $E$, and $A$ respectively - in the following, we will denote this as $1 \rightarrow F, 2 \rightarrow E, 3 \rightarrow A$.

The number 4 cannot be written on $H$, because then the 5 and 6 would have to be placed on the non-adjacent $B, J$ faces. The further options $4 \rightarrow B$ and $4 \rightarrow J$ are mirror images of each other with respect to the plane of symmetry parallel to $B, J$, so it is enough to examine, for example, the $4 \rightarrow B$ option. In this case, the only remaining empty neighbor of $B$ is $H$, so $5 \rightarrow H$, and the 6 can be written on the still empty $J$, because $J$ is adjacent to the $F$ containing the 1. Thus, we essentially have only one cube of the first type. Here, the numbers $1-6$ are written on the faces $F, E, A, B, H, J$ respectively.

If it is not possible to place three consecutive numbers on faces connected by parallel edges, then by writing 1 and 2 on $F$ and $E$ respectively, 3 can be placed on $B$ or $J$. The two possibilities are again mirror images of each other with respect to the plane of symmetry parallel to $B$ and $J$, so it is enough to examine, for example, $3 \rightarrow B$. In this case, $4 \rightarrow H$ is not allowed, so 4 must go to $A$; $5 \rightarrow J$ is again not allowed, so 5 must go to $H$ and 6 to $J$. This is a valid arrangement because the $F$ containing the 1 is adjacent to both $J$ and the $H$ containing the 5, and $J$ is adjacent to the $E$ containing the 2. Thus, there is essentially only one arrangement of the second type, where the numbers $1-6$ are placed on the faces $F, E, B, A, H, J$ respectively.

This way, we have found 2 solutions to the problem, and due to the distinguishing property used, they cannot be transformed into each other by any allowed transformation.

II. solution. By traversing the faces of the cube in the order of the numbers written on them and repeating the traversal once from any face, we can reach the opposite face in 2, 3, or 4 steps - because after 1 step we are still on an adjacent face and after 5 steps we are back on the same face. From the opposite face, we can return to the starting face in 4, 3, or 2 steps, respectively, because from any face we return to the same face after 6 steps. Thus, the shorter distance between two parallel faces along the traversal can only be 2 or 3 steps.

Characterize the valid arrangements of the problem as traversals by specifying the traversal distance between the 3 pairs of parallel faces of the cube. Then the following four distance triples can be considered:

$$
2,2,2 ; \quad 2,2,3 ; \quad 2,3,3 ; \quad 3,3,3
$$

(The order within each number triple is irrelevant.)

Let the 3 distances be denoted by $t_{1}, t_{2}, t_{3}$, and let the numbers on the faces at distance $t_{1}$ be $a, b$, on the faces at distance $t_{2}$ be $c, d$, and on the faces at distance $t_{3}$ be $e, f$. Then the differences $b-a, d-c, f-e$ match $t_{1}, t_{2}, t_{3}$, or differ from them by some multiple of 6. On the other hand, each of the numbers 1 to 6 appears exactly once among $a, b, c, d, e, f$. Thus, on the one hand,

$$
b-a+d-c+f-e=t_{1}+t_{2}+t_{3}+6 \cdot k
$$

where $k$ is some integer, and on the other hand,

$$
\begin{aligned}
& b-a+d-c+f-e=a+b+c+d+e+f-2(a+c+e)= \\
& \quad=1+2+3+4+5+6-2(a+c+e)=21-2(a+c+e)
\end{aligned}
$$

so the sum of the three differences is odd, and thus the sum of the three distances must also be odd. Therefore, the first and third options cannot occur.

There is a traversal of the second type where the pair of faces at a distance of 3 units has 1 and 4 written on them - the possible pairings and differences of the remaining numbers are:
the differences for the pairs 2,5 and 3,6 are: 3 and 3,

the differences for the pairs 2,6 and 3,5 are: 4 and 2,

the third pairing is valid. From this, we get 1 traversal, because after fixing $1 \rightarrow F, 4 \rightarrow A$, the 2 can be brought to $E$ by rotating the cube around its vertical axis if necessary, so $6 \rightarrow H$, and the two possible placements of the 3,5 pair on the $B, J$ faces are mirror images of each other with respect to the plane of symmetry of the $B, J$ face pair.

There is also a traversal of the fourth type - essentially 1 - because the differences for the pairs 1,4; 2,5 and 3,6 are 3,3 and 3.

It is clear from the construction that neither of these two solutions can be transformed into each other by symmetry or by shifting the numbers along the traversal path.