Five disks take 31 moves, six take 63, and ten take 1,023. The free The Tower That Needs 2ⁿ − 1 Moves app on x9m8 lets the puzzle be played by hand or solved automatically, and it keeps a running move count in binary, because that count turns out to name the disk to move at every step.
Three pegs and one rule
The puzzle has three pegs and a stack of disks of different sizes, all starting on the first peg. One disk moves at a time, and no disk may sit on a smaller one. The goal is to rebuild the stack on another peg. A St Andrews history of mathematics page dates it to 1883, when it was published in Paris by a certain N. Claus de Siam, a name and college that are anagrams of Lucas d’Amiens, the mathematician Édouard Lucas.
Scientific American adds that Lucas, born in Amiens in 1842, sold the game as a solitaire puzzle under that pseudonym and claimed it was a simplified version of the Tower of Brahma.
Why the count is 2ⁿ − 1
The minimum number of moves follows from one observation. To free the largest disk, the n − 1 disks above it have to move to the spare peg. The largest disk then makes a single move, and the n − 1 disks move on top of it. An arXiv note on optimality proofs writes this as the recurrence T(n) = 2T(n − 1) + 1 with T(1) = 1, and concludes that T(n) = 2ⁿ − 1.
The small cases confirm it. Scientific American counts two disks as 3 moves and three disks as 3 + 1 + 3 = 7. Britannica carries the pattern to the toy sets sold in shops, where 8 disks require 2⁸ − 1, or 255, moves.
The app prints that minimum for whatever disk count is selected, from 1 to 10, and compares it with the moves made so far. A finished game reports either the minimum or how far over it ran.

Reading the move count in binary
The app’s move counter is shown in binary, with the lowest 1 bit highlighted. That bit gives the disk: bit 0 is the smallest disk, bit 1 the next one, and so on. Move 1 is 1, so disk 1 moves. Move 2 is 10, so disk 2. Move 3 is 11, so disk 1 again. Move 16 is 10000, the only move in a five-disk game that touches disk 5.
The rule was checked rather than assumed. A script ran the app’s solver for every disk count from 1 to 10, confirming at each move that the move was legal, that the disk moved was the one named by the lowest 1 bit, and that the tower arrived on the last peg after exactly 2ⁿ − 1 moves. The note on optimality proofs separately points to the binary-counter discussion in the textbook it cites as CLRS.
The pattern explains why the smallest disk moves every second move, the next disk every fourth, and the largest disk exactly once, in the middle of the game.

The 64-disk legend
Lucas gave the puzzle a story. According to Scientific American, monks in a great temple had to move a tower of 64 golden disks, and before they finished the temple would crumble and the world would end. A paper from UC Davis describes the legend as one that Lucas fabricated to make the idea more appealing, so it is a sales pitch, not history.
Britannica gives the size of the task: 2⁶⁴ − 1 moves, or 18,446,744,073,709,551,615. At one move per second, and a year of 31,557,600 seconds, that comes to about 5.85×10¹¹ years. The app prints this figure in its status line, so it stays in view whatever the disk count.
Three to the n states
Each disk can sit on one of three pegs, and the order on a peg is forced by size. A paper on solving the puzzle with random moves uses this to count 3ⁿ valid states. For ten disks that is 59,049 arrangements.
The shortest solution visits 2ⁿ of them, counting the start, which is 1,024 of the 59,049 at ten disks. The path is a thin thread through a much larger graph, and the binary counter is its map.
Hearing the ruler
The companion video plays the same solution with sound. Each of the five disks has its own note, and every move sounds the note of the disk that moved, so the 31 moves become a melody. The smallest disk’s note comes back every second move and the largest disk’s note sounds once, at move 16. The video runs at 3.5 moves per second. It ends on the 64-disk figures, and it uses the same pairing of an interactive page and a short film as the rhythm-to-pitch app in this series.

Sources
- Scientific American, Math Puzzle: Move the Tower
- MacTutor (St Andrews), The Towers of Hanoi
- Britannica, Tower of Hanoi
- The Tower of Hanoi: Optimality Proofs, Multi-Peg Bounds, and Computational Frontiers (arXiv 2511.07501)
- M. Alekseyev and T. Berger, Solving the Tower of Hanoi with Random Moves (arXiv 1304.3780)
- UC Davis, Tower of Hanoi student paper (tandiono.pdf)
