Maths Olympiad Prep

Library / /51 of 860

Number theory Difficulty 4.7 AIME Find the answer

Let S(x)S(x) denote the sum of the digits of a positive integer xx. Find the maximum possible value of S(x+2019)S(x)S(x+2019)-S(x).

A number or a short expression. Spacing and $ signs are ignored.

Solution

We note that S(a+b)S(a)+S(b)S(a+b) \leq S(a)+S(b) for all positive aa and bb, since carrying over will only decrease the sum of digits. (A bit more rigorously, one can show that S(x+a10b)S(x)aS\left(x+a \cdot 10^{b}\right)-S(x) \leq a for 0a90 \leq a \leq 9.) Hence we have S(x+2019)S(x)S(2019)=12S(x+2019)-S(x) \leq S(2019)=12, and equality can be achieved with x=100000x=100000 for example.

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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.