Repeat the same moves and you always get back to the start
If you keep repeating one move sequence on a solved cube, it eventually returns to the solved state, no matter how scrambled it looks along the way. You can work out how many repeats it takes without turning the cube at all, using the least common multiple.
How to read the notation: U (up) · D (down) · L (left) · R (right) · F (front) · B (back). A single letter means turning that face 90° clockwise as you look straight at it. An apostrophe, as in R', means counterclockwise, and a 2, as in R2, means 180°. The small picture next to the 3D cube is the cube unfolded into a net (middle row from left: L · F · R · B).
1. Turn it yourself
Press the buttons to turn the faces. Drag the cube to look at it from any side. Notice that the center squares never move.
Net view: shows the hidden faces too
Turns 0
2. How many repeats until it comes back?
Pick a move sequence or type your own. First calculate how many repeats it should take, then turn the cube to check that it really comes back after exactly that many.
Net view: shows the hidden faces too
Starting from the solved state
Why the least common multiple? Each time you do the sequence, every sticker moves to a fixed new spot. Follow one sticker and you'll see it travels around a cycle of spots. A sticker in a cycle of length 3 is home every 3 repeats, and one in a cycle of length 7 is home every 7 repeats. All stickers are home at the same time only on a common multiple of all the cycle lengths, and the first time that happens is the least common multiple.
Why R U has a cycle of length 15: after 5 corner pieces go once around and return to their spots, they are twisted, so the sticker colors are still wrong. A corner piece has 3 stickers, so it takes three trips around (5 × 3 = 15 repeats) before the colors match too.
3. How many states can the cube be in?
If you count piece by piece, the multiplication principle gives the number of states. Multiply one row at a time.
Ways to arrange the 8 corner pieces in 8 spots (8!)
40,320
Orientation of the corners (3 ways each). The last one is fixed once the other 7 are set, so 37
2,187
Ways to arrange the 12 edge pieces in 12 spots (12!)
479,001,600
Orientation of the edges (2 ways each). The last one is fixed automatically, so 211
2,048
You can never swap just two pieces (the same parity rule as the 15 puzzle), so only half are possible ÷ 2
÷ 2
1
4. What if you swap the order? How do you undo it?
Adding or multiplying numbers gives the same result in either order (the commutative law). Is turning a cube the same? Pick two moves and swap only their order.
and
Opposite faces (R and L, U and D, F and B) share no moving pieces, so swapping their order gives the same result. Neighboring faces share edge and corner pieces, so swapping their order changes the result. Math has operations like this too: composing functions g∘f and f∘g, or multiplying matrices AB and BA, usually gives different results.
To undo it, go backwards
Do a move sequence, then try to get back to the solved state. Is it enough to reverse each move?
Net view: shows the hidden faces too
If you put on socks and then shoes, you take off the shoes first and the socks last. The cube works the same way. To undo R U F, start from the last move, F, and go backwards: F' U' R'. In math this rule is written (AB)-1 = B-1A-1, and it holds for inverse functions and inverse matrices too.
5. The 1260 hunt: find all 480 together
On a cube, no move sequence has a cycle longer than 1260. Checking every case by computer shows that reaching 1260 takes at least 5 turns, and there are exactly 480 five-turn sequences with a cycle of 1260 (never turning the same face twice in a row). Let's find all 480 together.
Hint The longest cycle for each number of turns is 1 turn: 4 · 2 turns: 105 · 3 turns: 360 · 4 turns: 840 · 5 turns: 1260. Every one of the 480 has exactly one half turn (2) and uses 4 different faces.