Find the number of 6-digit sequences whose sum is 10.
Without generating function: Instead of restricting ourselves to taking numbers $\leqslant 9$, we will allow everything and remove those that use numbers $\geqslant 10$. By stars and bars, this first quantity is $\binom{10+6-1}{6-1}$. The second quantity is 6 since the only way to use a number $\geqslant 10$ is to have $10,0,0,0,0,0$ up to permutation. The answer is therefore $\binom{15}{5}-6$.

## With generating function: