Maths Olympiad Prep

Library / Shortlist JBMO /27 of 50

Shortlist JBMO, 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 an−1≡s(an−1)a_{n-1} \equiv s(a_{n-1}) (all congruences are modulo 99), we have 2an−1≡an≡2008≡102a_{n-1} \equiv a_{n} \equiv 2008 \equiv 10, so an−1≡5a_{n-1} \equiv 5. But an−1<2008a_{n-1} < 2008, so s(an−1)≤28s(a_{n-1}) \leq 28 and thus s(an−1)s(a_{n-1}) can equal 55, 1414 or 2323. We check s(2008−5)=s(2003)=5s(2008-5) = s(2003) = 5, s(2008−14)=s(1994)=23s(2008-14) = s(1994) = 23, s(2008−23)=s(1985)=23s(2008-23) = s(1985) = 23. Thus an−1a_{n-1} can equal 19851985 or 20032003.

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

Now 2an−3≡an−2≡7≡162a_{n-3} \equiv a_{n-2} \equiv 7 \equiv 16 and an−3≡8a_{n-3} \equiv 8. But s(an−3)≤27s(a_{n-3}) \leq 27 and thus s(an−3)s(a_{n-3}) can equal 1717 or 2626. The check works only for s(1978−17)=s(1961)=17s(1978-17) = s(1961) = 17. Thus an−3=1961a_{n-3} = 1961 and similarly an−4=1939≡4a_{n-4} = 1939 \equiv 4, an−5=1919≡2a_{n-5} = 1919 \equiv 2 (if they exist).

The search for an−6a_{n-6} requires a residue of 11. But an−6<1919a_{n-6} < 1919, so s(an−6)≤27s(a_{n-6}) \leq 27 and thus s(an−6)s(a_{n-6}) can be equal only to 1010 or 1919. The check fails for both s(1919−10)=s(1909)=19s(1919-10) = s(1909) = 19 and s(1919−19)=s(1900)=10s(1919-19) = s(1900) = 10. Thus n≤6n \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,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.