The number of 3-digit odd numbers, whose sum of digits is a multiple of 7, is _____.
Solution
Core idea. A digit sum condition is split by the possible sums and the restricted digit.
Concept refresher. The number of pairs of digits from 1 to 9 and from 0 to 9 with
is when is from 1 to 9, and when is from 10 to 18.
Picture the situation. Let the digits be , , with from 1 to 9, from 0 to 9 and odd. The digit sum is at most 27, so it is 7, 14 or 21. For each sum and each odd the first two digits must add to the rest, and the number of ways to do that follows a simple rule.
Approach. For each possible digit sum, go through the odd last digits and count the first two digits.
Step 1: Sum 7
For the first two digits add to 6, 4, 2, which can be done in 6, 4 and 2 ways; for or 9 it is impossible. That gives 12 numbers.
Step 2: Sum 14
For the first two digits add to 13, 11, 9, 7, 5, which can be done in 6, 8, 9, 7 and 5 ways. That gives 35 numbers.
Step 3: Sum 21
For the first two digits add to 18, 16, 14, 12, which can be done in 1, 3, 5 and 7 ways; is impossible. That gives 16, and the total is .
Answer. 63
Sanity check. There are 450 three-digit odd numbers, and about one in seven should have a digit sum divisible by 7; 450 divided by 7 is about 64.
Common wrong answers
- 47: Leaving out the digit sum 21 gives 47.
- 70: Allowing the first digit to be 0 adds 7 two-digit numbers and gives 70.
Key takeaway
The trap. The first digit of a three-digit number cannot be zero.
How toppers think. They estimate the answer as one seventh of all the odd numbers.
Remember. Digit sums 7, 14 and 21.