$n$-th term of a sequence from generating function $\frac{1}{(1-x^2)(1-x^3)(1-x^7)}$ I have a generating function of a sequence such that
$$\frac{1}{(1-x^2)(1-x^3)(1-x^7)}.$$
They are the product of three geometric series with coefficient 1.
Now I want to transform this into infinite sum form so that I can get nth term explicitly. However, I can not refactor denominator to get power of $(1-x)$ or partial fractions. Is there any identity I must know or is this completely wrong way of solving?
 A: Using runway44's suggestion:
$$x^2=u$$
$$\frac{1-u^{21}}{1-u}=\sum_{k=0}^{20} u^k$$
$$x^3=v$$
$$\frac{1-v^{14}}{1-v}=\sum_{l=0}^{13} v^l$$
$$x^7=w$$
$$\frac{1-w^{6}}{1-w}=\sum_{m=0}^{5} w^m $$
$$x^{42}=z$$
$$\frac{1}{(1-z)^3} = \sum_{n=2}^\infty n(n-1) z^{n-2}=\sum_{n=0}^\infty (n+1)(n+2) z^n$$
Which means:
$$\frac{1}{(1-x^2)(1-x^3)(1-x^7)}= \\ =\left(\sum_{k=0}^{20} x^{2k} \right)\left(\sum_{l=0}^{13} x^{3l} \right) \left(\sum_{m=0}^{5} x^{7m} \right)\sum_{n=0}^\infty (n+1)(n+2) x^{42n}$$
Which allows us, after some tedious algebra, to find the general expression for the terms, which Maxim already provided in another comment.
A: Use partial fractions, and pry out the coefficients of interest:
$\begin{align*}
\frac{1}{(1 - x^2) (1 - x^3) (1 - x^7)}
  &= \frac{x^4 + 2 x^3 + 2 x^2 + 2}
          {7 (x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)}
        + \frac{x + 2}{9 (x^2 + x + 1)}
        + \frac{1}{8 (x + 1)}
        - \frac{17}{72 (x - 1)}
        + \frac{3}{28 (x - 1)^2}
        - \frac{1}{42 (x - 1)^3} \\
  &= \frac{(x^4 + 2 x^3 + 2 x^2 + 2)(1 - x)}
          {7 (1 - x^7)}
        + \frac{(x + 2) (1 - x)}{9 (1 - x^3)}
        + \frac{1}{8 (x + 1)}
        - \frac{17}{72 (x - 1)}
        + \frac{3}{28 (x - 1)^2}
        - \frac{1}{42 (x - 1)^3}
\end{align*}$
Multiply out the numerators, and you are left with picking off the coefficients of powers of $x$ in geometric series and series of the form:
$\begin{align*}
(1 - x)^m
  &= \sum_{k \ge 0} (-1)^k \binom{-m}{k} x^k \\
  &= \sum_{k \ge 0} \binom{k + m - 1}{m - 1} x^k
\end{align*}$
