Inclusion-Exclusion for Bounded Sum

Rarely Tested

Number of non-negative integer solutions to $$x_1 + x_2 + \dots + x_k = n$$ with each $$x_i \leq m$$:

$$ \sum_{j=0}^{\lfloor n/(m+1) \rfloor} (-1)^j \binom{k}{j} \binom{n - j(m+1) + k - 1}{k-1} $$

where the binomial coefficient is zero if the top is negative or the bottom is negative or top < bottom.

Question 1

The number of integers, between 100 and 1000 having the sum of their digits equals to 14, is ________

Go back to topics

Join CAT 2026 course by 5-Time CAT 100%iler

Start your IIM journey with the right preparation and crack CAT 2026.