The number has the property that its units digit is the sum of its other digits, that is . How many integers less than but greater than share this property?
- A)
- B)
- C)
- D)
- E)
Answer
D
Key insight
For numbers 1bcd, the last digit is 1 + b + c, so b + c is at most 8: that gives 45 numbers. Add 2002.
Solution
The numbers run from to . Split them into the ones starting with and the ones starting with .
Numbers from to .
- Write such a number with digits . We need .
- Once and are chosen, is fixed. The only catch is that must be a single digit, at most , so can be at most .
- Count the pairs for each possible sum:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
|---|---|---|---|---|---|---|---|---|---|
| number of pairs | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
(For example, sum has the pairs .) The total is .
4. The pair gives , which is more than , so it counts.
Numbers from to .
- These have digits with or . We need . With we get , which works. With we get , which is not less than , so it is out. That is more number.
Total: .
The answer is .
Why this works
Once the first digit is fixed, the last digit is decided by the middle two, so the problem becomes counting pairs of digits with a limited sum, which gives . The upper limit is a deliberate edge: always check the short, awkward range at the end separately.
The trap
Forgetting the numbers from 2000 to 2012 and answering 45, choice (C), or letting b + c be 9, which would need a last digit of 10.
Concise solution
Write the number as with and the condition , which requires .
Thousands digit . Numbers to : we need , so , and each such pair determines uniquely. For each sum from to there are pairs, so the count is
(The pair gives , which is greater than and allowed.)
Thousands digit . Only to are in range, so and . With , : works. With , gives , which is excluded. That is more.
Total: .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
- Introduction to Number Theory, Chapter 9: Base Number Arithmetic
Techniques
Split into exhaustive cases and handle each · Set up the equation/formula and compute; no special trick needed