NVAMediumJEE 2025Applications of P&C

JEE Mathematics 2025 Question with Solution

The number of natural numbers, between 212212 and 999999, such that the sum of their digits is 1515, is _____.

Answer

Correct answer:64

Step-by-step solution

Casewise Counting

Given: We need three-digit natural numbers between 212212 and 999999 such that the sum of digits is 1515.

Find: The number of such natural numbers.

Let the three-digit number be represented as xyz\overline{xyz}, where x,y,zx, y, z are digits. Then

x+y+z=15x + y + z = 15

and since xx is the hundreds digit, it must satisfy 2x92 \leq x \leq 9.

Now count possible pairs (y,z)\left(y, z\right) for each value of xx:

  • For x=2x = 2, y+z=13y + z = 13, giving 66 combinations.
  • For x=3x = 3, y+z=12y + z = 12, giving 77 combinations.
  • For x=4x = 4, y+z=11y + z = 11, giving 88 combinations.
  • For x=5x = 5, y+z=10y + z = 10, giving 99 combinations.
  • For x=6x = 6, y+z=9y + z = 9, giving 1010 combinations.
  • For x=7x = 7, y+z=8y + z = 8, giving 99 combinations.
  • For x=8x = 8, y+z=7y + z = 7, giving 88 combinations.
  • For x=9x = 9, y+z=6y + z = 6, giving 77 combinations.

Therefore, the total number of valid numbers is

6+7+8+9+10+9+8+7=646 + 7 + 8 + 9 + 10 + 9 + 8 + 7 = 64

Hence, the number of natural numbers is 6464.

Combinatorics with Inclusion-Exclusion

Given: We are asked to count natural numbers between 212212 and 999999 whose digits add to 1515.

Find: The total number of such numbers.

Let the number be xyzxyz, where x,y,zx, y, z are digits. Then

x+y+z=15x + y + z = 15

with constraints

x[2,9],y,z[0,9]x \in [2,9], \quad y, z \in [0,9]

Set

x=x2x' = x - 2

so the equation becomes

x+y+z=13x' + y + z = 13

where 0x70 \leq x' \leq 7.

First count all non-negative integer solutions without upper bounds:

Number of solutions=(13+3131)=(152)=105\text{Number of solutions} = \binom{13+3-1}{3-1} = \binom{15}{2} = 105

Now remove invalid cases.

If x8x' \geq 8, let x=x8x'' = x' - 8. Then

x+y+z=5x'' + y + z = 5

so the number of such solutions is

(5+22)=21\binom{5+2}{2} = 21

If y10y \geq 10, let y=y10y' = y - 10. Then

x+y+z=3x' + y' + z = 3

so the number of such solutions is

(3+22)=10\binom{3+2}{2} = 10

Similarly, if z10z \geq 10, the number of solutions is

1010

There are no overlap cases, because any two such violations together make the remaining sum negative.

Therefore,

105(21+10+10)=64105 - (21 + 10 + 10) = 64

So, the number of natural numbers between 212212 and 999999 whose digits sum to 1515 is 6464.

Common mistakes

  • Treating the problem as counting all three-digit numbers with digit sum 1515 is wrong because the lower bound is 212212, so the hundreds digit must satisfy x2x \geq 2. Start with the correct range for the hundreds digit.

  • Ignoring the digit restriction 0y,z90 \leq y, z \leq 9 leads to invalid pairs such as values greater than 99. Always remember that tens and units places are digits, not arbitrary integers.

  • While using stars and bars, forgetting to subtract cases where x>7x' > 7, y>9y > 9, or z>9z > 9 gives an overcount. Apply inclusion-exclusion after counting unrestricted non-negative solutions.

Practice more Applications of P&C questions

Get unlimited AI-adaptive practice, mastery tracking, and an AI tutor that explains every step — free to start.

Related questions