The puzzle and its legend
The Tower of Hanoi was invented in 1883 by the French mathematician Édouard Lucas. It has three pegs and a stack of disks of decreasing size on the first peg. Move the whole tower to another peg, one disk at a time, and never rest a larger disk on a smaller one.
Lucas wrapped his puzzle in a legend: monks in a temple moving 64 golden disks, with the world to end when the last disk falls into place. It is a wonderful story — and, as the arithmetic shows, a reassuring one.
The doubling pattern
Count the best possible solutions. One disk: 1 move. Two disks: 3 moves. Three: 7. Four: 15. The pattern is 2-to-the-power-of-n minus 1: every extra disk a little more than doubles the work, because you must move the whole tower above it twice.
For 64 disks the count is 18,446,744,073,709,551,615 moves. At one move per second, without sleep or mistakes, that is roughly 585 billion years — many times the age of the universe. The monks, and we, are safe.
Try it: coins and coasters
Build a tower from four coins or coasters of different sizes and three drawn circles. Solve it in the perfect 15 moves: the secret rhythm is to move the smallest disk every other turn, always in the same direction around the pegs.
Notice the deeper trick while you play: to move the biggest disk, you must first park the entire smaller tower out of the way. Solving the small problem is the big problem — programmers call this recursion, and Hanoi is their favourite example.

