Move the whole tower to the right-hand peg, one disk at a time, never putting a bigger disk on a smaller one.
Which disk moved at each step
The French mathematician Édouard Lucas invented the puzzle in 1883 and sold it with a legend: in a temple, priests move 64 golden disks between three diamond needles, and when they finish, the world will end. They would need 2⁶⁴ − 1 = 18,446,744,073,709,551,615 moves. At one move per second, that takes about 585 billion years, roughly 42 times the age of the universe.
If you draw every possible arrangement of the disks as a dot, and connect two dots when one move turns one arrangement into the other, the picture is a Sierpinski triangle. The fastest solution runs straight along one of its edges.