Fibonacci's doubling purse
A traveler arrives in one city, where the money in his purse doubles, then he spends 12 denari. He moves on to a second city, where his money doubles again, then he spends another 12 denari. At that point his purse is exactly empty. How many denari did he start with?
Reveal the answer
Nine denari. Work backward from zero: before the last spend he had 12, so before it doubled he had 6; before the earlier spend he had 6+12=18, so before that doubling he had 9. Checking forward: 9 doubles to 18, spend 12, leaves 6; 6 doubles to 12, spend 12, leaves 0. This 'doubling and spending' puzzle appears in Leonardo of Pisa's Liber Abaci (1202), the same book that introduced Europe to the rabbit problem behind the Fibonacci sequence.
— Leonardo of Pisa (Fibonacci), Liber Abaci — 1202, 'doubling and spending' purse problem