How to expand $\frac1{(1-x)(1-x^2)(1-x^5)}$ How do I expand 

$$\frac1{(1-x)(1-x^2)(1-x^5)}$$

I need to find the coefficent of $x^9$, but I also want to be able to derive the general form. The only method I could thing of was to expand the $3$ individual denominators into an infinite GP and then count the number of ways I can get $x^9$, but not only is that time consuming, I cannot get a general formula for it. Can you please help me?
 A: In
$$(1+x+x^2+x^3+\cdots)(1+x^2+x^4+x^6+\cdots)(1+x^5+x^{10}+x^{15}+\cdots)$$
the degree $9$ is obtained when
$$p+2q+5r=9$$
and you need to find the number of solutions. We have
$$(0,2,1),(1,4,0),(2,1,1),(3,3,0),(4,0,1),(5,2,0),(7,1,0),(9,0,0)$$
hence the coefficient is $8$.

Let $f(n)$ denote the number of admissible solutions of
$$a+2b=n.$$
It is not a big deal to establish
$$f(n)=\left\lfloor\frac n2\right\rfloor+1.$$
Now let $g(n)$ denote the number of solutions of
$$a+2b+5c=n.$$
We have
$$g(n)=\sum_{c=0}^{\lfloor\frac n5\rfloor}f(n-5c)=\sum_{c=0}^{\lfloor\frac n5\rfloor}\left(\left\lfloor\frac{n-5c}2\right\rfloor+1\right).$$
With $q:=\lfloor\frac n5\rfloor+1$, this sum is
$$\frac{nq}2-\frac{5(q-1)q}4+q-\left\lfloor\frac q2\right\rfloor.$$
This result is obtained by temporarily ignoring the floor, summing, then correcting as half of the terms were exaggerated by $\frac12$.
(Caution: this formula might be in error by $\frac12$ depending on the parity of $n$.)
A: If you settle down and actually do it, it is not that time consuming.
So you have $\frac1{(1-x)(1-x^2)(1-x^5)}$ here. Expanding each factor gives:
$$
\frac1{1-x^n}=\sum_{i=0}^\infty x^{in}.$$
In order to find the ways you can get $x^8$, just count how many ways you can get $8$ by combining (adding, because exponents add when multiplied, i.e. $x^2x^5x^1=x^{2+5+1}=x^8$.) $1,2$ and $5$. This follows directly from the expansion process. You can get the following:
$$
\begin{align}
8&=1+1+1+1+1+1+1+1\\
&=1+1+1+1+1+1+2\\
&=1+1+1+1+2+2\\
&=1+1+2+2+2\\
&=2+2+2+2\\
&=1+1+1+5\\
&=1+2+5.
\end{align}
$$
Hopefully, I haven't missed any combination, and in that case, there will be 7 ways. So the coefficient of $x^8$ is $9$.
In fact, this formula is quite important when studying partition numbers, that is, how many different ways there are to break a natural number into sums of positive integers. The number of ways to partition $n$ would then be the coefficient of $x^n$ in the expansion of
$$
\prod_{m=1}^\infty \frac1{1-x^m},
$$
whose proof is left as an exercise for you.
