How many natural numbers less than $10^{8}$ are there, whose sum of digits equals 7?
We need to count the no. of solutions of $x_1 + x_2 + \cdots + x_8 = 7$ which satisfies $0 \leq x_i \leq 7, i = 1,2,3,\ldots,8$. The number of solution is $=$ coefficient of $x^7$ in $\left(1 + x + x^2 + \cdots + x^7\right)^8$ $=$ coefficient of $x^7$ in $\left(1 - x^8\right)^8(1-x)^{-8}$ $=$ coefficient of $x^7$ in $\left(1 - 8x^8\right)\left(1 + 8c_1 x + 4c_2 x^2 + 10c_3 x + \cdots\right)$ $= 14c_7 = 3432.$
How many natural numbers less than $10^{8}$ are there, whose sum of digits equals 7?