Maths Olympiad Prep

Library / Harvard-MIT Mathematics Tournament /338 of 352

Harvard-MIT Mathematics Tournament

Number theory Difficulty 5.9 AIME, harder Prove it United States

Problem:

Alice and the Cheshire Cat play a game. At each step, Alice either (1) gives the cat a penny, which causes the cat to change the number of (magic) beans that Alice has from nn to 5n5n, or (2) gives the cat a nickel, which causes the cat to give Alice another bean. Alice wins (and the cat disappears) as soon as the number of beans Alice has is greater than 20082008 and has last two digits 4242. What is the minimum number of cents Alice can spend to win the game, assuming she starts with 00 beans?

Solution

Solution:

Answer: 3535

Consider the number of beans Alice has in base 55. Note that 2008=3101352008 = 31013_{5}, 42=132542 = 132_{5}, and 100=4005100 = 400_{5}. Now, suppose Alice has dk⋯d2d1d_{k} \cdots d_{2} d_{1} beans when she wins; the conditions for winning mean that these digits must satisfy d2d1=32d_{2} d_{1} = 32, dk⋯d3≥310d_{k} \cdots d_{3} \geq 310, and dk⋯d3=4i+1d_{k} \cdots d_{3} = 4i + 1 for some ii.

To gain these dk⋯d2d1d_{k} \cdots d_{2} d_{1} beans, Alice must spend at least 5(d1+d2+⋯+dk)+k−15\left(d_{1} + d_{2} + \cdots + d_{k}\right) + k - 1 cents (5 cents to get each bean in the "units digit" and k−1k-1 cents to promote all the beans). We now must have k≥5k \geq 5 because dk⋯d2d1>2008d_{k} \cdots d_{2} d_{1} > 2008. If k=5k = 5, then dk≥3d_{k} \geq 3 since dk⋯d3≥3100d_{k} \cdots d_{3} \geq 3100; otherwise, we have dk≥1d_{k} \geq 1.

Therefore, if k=5k = 5, we have 5(d1+d2+⋯+dk)+k−1≥44>365\left(d_{1} + d_{2} + \cdots + d_{k}\right) + k - 1 \geq 44 > 36; if k>5k > 5, we have 5(d1+d2+⋯+dk)+k−1≥30+k−1≥355\left(d_{1} + d_{2} + \cdots + d_{k}\right) + k - 1 \geq 30 + k - 1 \geq 35. But we can attain 3636 cents by taking dk⋯d3=1000d_{k} \cdots d_{3} = 1000, so this is indeed the minimum.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.