Solveeit Logo

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=abcN = abc with a,b,ca,b,c digits. We need:

a+b+c=15,a+b+c = 15,

with aa from 2 to 9 (since N212N\ge 212), and b,cb,c from 0 to 9. For a=2a=2, the equation becomes:

b+c=13.b+c = 13.

The allowed pairs (b,c)(b,c) (with 0b,c90\le b,c\le9) are:

(4,9),(5,8),(6,7),(7,6),(8,5),(9,4).(4,9),\,(5,8),\,(6,7),\,(7,6),\,(8,5),\,(9,4).

So, there are 6 solutions when a=2a=2. (All corresponding numbers are 212\geq 212; e.g. 249249 is the smallest.)

For each aa from 3 to 9, set S=15aS = 15 - a. The number of solutions for b+c=Sb+c = S is given by:

f(S)={S+1,if S9,19S,if S>9.f(S) = \begin{cases} S+1, & \text{if } S\le9, \\ 19-S, & \text{if } S>9. \end{cases}

Compute for each:

  • a=3: S=12    f(12)=1912=7.a=3:\ S=12 \implies f(12)=19-12=7.
  • a=4: S=11    f(11)=1911=8.a=4:\ S=11 \implies f(11)=19-11=8.
  • a=5: S=10    f(10)=1910=9.a=5:\ S=10 \implies f(10)=19-10=9.
  • a=6: S=9    f(9)=9+1=10.a=6:\ S=9 \implies f(9)=9+1=10.
  • a=7: S=8    f(8)=8+1=9.a=7:\ S=8 \implies f(8)=8+1=9.
  • a=8: S=7    f(7)=7+1=8.a=8:\ S=7 \implies f(7)=7+1=8.
  • a=9: S=6    f(6)=6+1=7.a=9:\ S=6 \implies f(6)=6+1=7.

Adding these together:

Total for a=3 to 9=7+8+9+10+9+8+7=58.\text{Total for } a=3\text{ to }9 = 7+8+9+10+9+8+7 = 58.

Now, total number of numbers is:

6(for a=2)+58=64.6\, (\text{for } a=2) + 58 = 64.