2017 AMC 10A Problem 20
Let equal the sum of the digits of positive integer . For example, . For a particular positive integer , . Which of the following could be the value of ?
Show solution without answering
Key insight
Adding 1 raises the digit sum by 1, but each 9 that turns into 0 takes away 9. So the new digit sum is 1275 minus a multiple of 9.
Solution
1. Try small examples. and : adding usually raises the digit sum by . But and : the two s turned into s, each losing , and the went up to .
2. The general rule. If ends in nines, adding turns those nines into zeros (losing each) and raises the next digit by . So
(With this is just .)
3. Test the choices. must equal minus a multiple of . Subtract each choice from and see whether divides the result:
| Choice | Divisible by ? | |
|---|---|---|
| no () | ||
| no () | ||
| no () | ||
| yes () | ||
| no |
- Check that really happens. We need ending in exactly four nines with digit sum . Those four nines give , so the other digits must add to . For example, take a , then eights (), then . Adding turns the last eight into a nine and the four nines into zeros, giving digit sum .
The answer is .
Why this works
A number and its digit sum always leave the same remainder when divided by . Carrying can change a digit sum a lot, but only by multiples of . So checking remainders on division by quickly rules out impossible digit sums, a handy tool for any digit-sum question.
Alternative approach
Use remainders on division by directly. The digits of add to , and leaves remainder , so must leave remainder when divided by . Find each choice's remainder from its digit sum: , , , , . Only has remainder .
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
Suppose ends in exactly nines (). Adding turns those nines into zeros and increases the next digit by , so
Hence . The digit sum of is , so , and must leave remainder when divided by .
Check the choices by their own digit sums: ; ; ; ; . Only is .
It is attainable: , so take ending in exactly four nines with the remaining digits summing to (for example followed by eights, then ). Then .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Number Theory, Chapter 9: Base Number Arithmetic
- Introduction to Number Theory, Chapter 10: Units Digits
Similar problems
Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.