Skip to main content

2017 AMC 12A Problem 18

Problem 18 of 25IntermediateNumber Theory

Let S(n)S(n) equal the sum of the digits of positive integer n.n. For example, S(1507)=13.S(1507)=13. For a particular positive integer n,n, S(n)=1274.S(n)=1274. Which of the following could be the value of S(n+1)?S(n+1)?

Answer choices

Show solution

Solution

Adding 11 to nn increases the digit sum by 1,1, except that each trailing 99 turns into a 0,0, losing 9.9. If nn ends in exactly kk nines, then S(n+1)=S(n)+19kS(n+1)=S(n)+1-9k =12759k.=1275-9k. So the possible values are 1275,1266,1257,1275,1266,1257,\ldots Among the choices, only 1239=1275941239=1275-9\cdot4 fits (for example, nn ending in four 99s preceded by enough 11s). Thus, the correct answer is D.

More practice

Concepts: digits · modular arithmetic

Problem text and solution from the LIVE past-contest archive. See also the AoPS wiki page for community solutions.