Maths Olympiad Prep

Library / /362 of 377

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 dkd2d1d_{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, dkd3310d_{k} \cdots d_{3} \geq 310, and dkd3=4i+1d_{k} \cdots d_{3} = 4i + 1 for some ii.

To gain these dkd2d1d_{k} \cdots d_{2} d_{1} beans, Alice must spend at least 5(d1+d2++dk)+k15\left(d_{1} + d_{2} + \cdots + d_{k}\right) + k - 1 cents (5 cents to get each bean in the "units digit" and k1k-1 cents to promote all the beans). We now must have k5k \geq 5 because dkd2d1>2008d_{k} \cdots d_{2} d_{1} > 2008. If k=5k = 5, then dk3d_{k} \geq 3 since dkd33100d_{k} \cdots d_{3} \geq 3100; otherwise, we have dk1d_{k} \geq 1.

Therefore, if k=5k = 5, we have 5(d1+d2++dk)+k144>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)+k130+k1355\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 dkd3=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,000 problems in a working order, from AMC 10 level to the IMO shortlist.

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