Maths Olympiad Prep

Library / /31 of 57

, 2008

Number theory Difficulty 5.8 AIME, harder Prove it JBMO

Problem:
Let s(a)s(a) denote the sum of digits of a given positive integer aa. The sequence a1,a2,,an,a_{1}, a_{2}, \ldots, a_{n}, \ldots of positive integers is such that an+1=an+s(an)a_{n+1} = a_{n} + s(a_{n}) for each positive integer nn. Find the greatest possible nn for which it is possible to have an=2008a_{n} = 2008.

Solution

Solution:
Since an1s(an1)a_{n-1} \equiv s(a_{n-1}) (all congruences are modulo 99), we have 2an1an2008102a_{n-1} \equiv a_{n} \equiv 2008 \equiv 10, so an15a_{n-1} \equiv 5. But an1<2008a_{n-1} < 2008, so s(an1)28s(a_{n-1}) \leq 28 and thus s(an1)s(a_{n-1}) can equal 55, 1414 or 2323. We check s(20085)=s(2003)=5s(2008-5) = s(2003) = 5, s(200814)=s(1994)=23s(2008-14) = s(1994) = 23, s(200823)=s(1985)=23s(2008-23) = s(1985) = 23. Thus an1a_{n-1} can equal 19851985 or 20032003.

As above 2an2an15142a_{n-2} \equiv a_{n-1} \equiv 5 \equiv 14, so an27a_{n-2} \equiv 7. But an2<2003a_{n-2} < 2003, so s(an2)28s(a_{n-2}) \leq 28 and thus s(an2)s(a_{n-2}) can equal 1616 or 2525. Checking as above we see that the only possibility is s(200325)=s(1978)=25s(2003-25) = s(1978) = 25. Thus an2a_{n-2} can be only 19781978.

Now 2an3an27162a_{n-3} \equiv a_{n-2} \equiv 7 \equiv 16 and an38a_{n-3} \equiv 8. But s(an3)27s(a_{n-3}) \leq 27 and thus s(an3)s(a_{n-3}) can equal 1717 or 2626. The check works only for s(197817)=s(1961)=17s(1978-17) = s(1961) = 17. Thus an3=1961a_{n-3} = 1961 and similarly an4=19394a_{n-4} = 1939 \equiv 4, an5=19192a_{n-5} = 1919 \equiv 2 (if they exist).

The search for an6a_{n-6} requires a residue of 11. But an6<1919a_{n-6} < 1919, so s(an6)27s(a_{n-6}) \leq 27 and thus s(an6)s(a_{n-6}) can be equal only to 1010 or 1919. The check fails for both s(191910)=s(1909)=19s(1919-10) = s(1909) = 19 and s(191919)=s(1900)=10s(1919-19) = s(1900) = 10. Thus n6n \leq 6 and the case n=6n = 6 is constructed above (19191919, 19391939, 19611961, 19781978, 20032003, 20082008).

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.