Question
Question: The number of natural numbers, between 212 and 999 , such that the sum of their digits is 15 , is...
The number of natural numbers, between 212 and 999 , such that the sum of their digits is 15 , is
Answer
64
Explanation
Solution
Let the number be represented as N=abc with a,b,c digits. We need:
a+b+c=15,with a from 2 to 9 (since N≥212), and b,c from 0 to 9. For a=2, the equation becomes:
b+c=13.The allowed pairs (b,c) (with 0≤b,c≤9) are:
(4,9),(5,8),(6,7),(7,6),(8,5),(9,4).So, there are 6 solutions when a=2. (All corresponding numbers are ≥212; e.g. 249 is the smallest.)
For each a from 3 to 9, set S=15−a. The number of solutions for b+c=S is given by:
f(S)={S+1,19−S,if S≤9,if S>9.Compute for each:
- a=3: S=12⟹f(12)=19−12=7.
- a=4: S=11⟹f(11)=19−11=8.
- a=5: S=10⟹f(10)=19−10=9.
- a=6: S=9⟹f(9)=9+1=10.
- a=7: S=8⟹f(8)=8+1=9.
- a=8: S=7⟹f(7)=7+1=8.
- a=9: S=6⟹f(6)=6+1=7.
Adding these together:
Total for a=3 to 9=7+8+9+10+9+8+7=58.Now, total number of numbers is:
6(for a=2)+58=64.