The number of integers, between 100 and 1000 having the sum of their digits equals to 14 , is ________
Solution
Core idea. A digit sum condition is an equation in whole numbers with limits on each variable.
Concept refresher. The number of solutions of in non-negative integers is
A variable that must be at least is replaced by plus a new non-negative variable.
Picture the situation. An integer between 100 and 1000 has three digits, the first from 1 to 9 and the others from 0 to 9. The condition is that the three digits add to 14. Counting such triples is like sharing 14 units among three boxes, with a cap on each box and at least one unit in the first.
Approach. Shift the first digit, count the solutions without upper limits, and subtract those that exceed a digit limit.
Step 1: Set up
Let the digits be , , with , and . Putting gives with .
Step 2: Without the upper limits
Ignoring the upper limits for a moment, the number of solutions is .
Step 3: Remove the bad cases
If , the remaining total is 4, giving solutions. If or , the remaining total is 3, giving each. No two of these can happen together, so the count is .
Answer. 70
Sanity check. Counting by the first digit from 1 to 9, the other two digits can be chosen in 6, 7, 8, 9, 10, 9, 8, 7 and 6 ways, which add to 70.
Common wrong answers
- 105: Ignoring the limit of 9 on each digit gives 105.
Key takeaway
The trap. A solution with a digit above nine is not a number and must be removed.
How toppers think. They cross-check by listing the count for each first digit.
Remember. Solutions:
More on Distribution Problems
- A person has three different bags and four different books. The number of ways, in which he can put these…
- A building has ground floor and 10 more floors. Nine persons enter in a lift at the ground floor. The lift…
- Let A = {(a, b, c): a, b, c; are non-negative integers and; a + b + 2c = 22}. Then n(A) is equal to:
- All 19 on Distribution Problems ›