Finding the coefficient of a geometric series I've been asked to compute 
$[x^n]\frac{1}{(1-2x)(1+3x^2)}$
where $[x^n]$ is the coefficient of the series.
I've recognized that it is a geometric series, and have been able to put it into this form:
$[x^n]\sum_{n\ge0} (2x)^n \sum_{n\ge0} (-3x^2)^n$
However, by reducing and simplifying I get to this point:
$[x^n]\sum_{n\ge0} (-6)^n x^{3n}$
From here I'm lost as to where I can go.
 A: Expanding as you did is a good first step. We end up having
$$\sum_{n=0}^\infty (2x)^n\sum_{m=0}^\infty (-3x^2)^m = \sum_{n,m=0}^\infty 2^n(-3)^m x^{2m+n}$$
where the latter sum happens over all $m\ge 0,\ n\ge 0$. If we rewrite the sum in terms of $k=2m+n$ then
$$\sum_{k=0}^\infty \left(\sum_{2m+n=k} 2^n(-3)^m\right)x^k$$
therefore the coefficient for $[x^k]$ you are after is
$$\sum_{2m+n=k}2^n(-3)^m$$
which sums over all pairs of $m, n\ge 0$ such that $2m+n=k$. We rewrite the sum as
$$\sum^{\lfloor\frac{k}{2}\rfloor}_{m=0}2^{k-2m}(-3)^{m}=2^k\sum^{\lfloor\frac{k}{2}\rfloor}_{m=0}\left(\frac{-3}{4}\right)^m$$
The latter is a geometric series which easily evaluates to
$$\frac{2^{k+2}}{7}\left[1 - \left(-\frac{3}{4}\right)^{\lfloor\frac{k+2}{2}\rfloor}\right]$$
A: You might want to aim at partial fraction decomposition
$$\frac{1}{{\left( {1 - 2x} \right)\left( {1 + 3{x^2}} \right)}} = \frac{A}{{1 - 2x}} + \frac{{Bx + C}}{{1 + 3{x^2}}}$$
and then find the coefficients separately.
After equating coefficients, you should get the system $$\eqalign{
  & A + C = 1  \cr 
  & B - 2C = 0  \cr 
  & 3A - 2B = 0 \cr} $$ from where $$\eqalign{
  & A = 4/7  \cr 
  & B = 6/7  \cr 
  & C = 3/7 \cr} $$
$$\frac{1}{{\left( {1 - 2x} \right)\left( {1 + 3{x^2}} \right)}} = \frac{1}{7}\left( {\frac{4}{{1 - 2x}} + \frac{{6x + 3}}{{1 + 3{x^2}}}} \right)$$
now use the usual expansions
$$\eqalign{
  & \frac{4}{{1 - 2x}} = 4\sum\limits_{n = 0}^\infty  {{2^n}{x^n}}   \cr 
  & \frac{1}{{1 + 3{x^2}}} = \sum\limits_{n = 0}^\infty (-1)^n {{{ { 3} }^{n}}{x^{2n}}}  \cr} $$
You might want to consider odd and even terms separately.
A: Find the partial fraction decomposition of the function and work with it:
$$\begin{align*}
\frac{1}{(1-2x)(1+3x^2)}&=\frac47\cdot\frac1{1-2x}+\frac37\cdot\frac{1+2x}{1+3x^2}\\
&=\frac47\sum_{k\ge 0}(-1)^k2^kx^k+\frac37(1+2x)\sum_{k\ge 0}3^kx^{2k}\\
&=\frac47\sum_{k\ge 0}(-1)^k2^kx^k+\frac37\sum_{k\ge 0}3^kx^{2k}+\frac67\sum_{k\ge 0}3^kx^{2k+1}\;.\tag{1}
\end{align*}$$
The coefficient of $x^n$ in $(1)$ is
$$\begin{align*}
&\begin{cases}
\frac47\cdot2^n+\frac373^{n/2},&\text{if }n\text{ is even}\\\\
-\frac47\cdot2^n+\frac673^{(n-1)/2},&\text{if }n\text{ is odd}
\end{cases}\\\\
&\qquad=\begin{cases}
\frac17\left(2^{n+2}+3^{(n+2)/2}\right),&\text{if }n\text{ is even}\\\\
\frac17\left(-2^{n+2}+2\cdot3^{(n+1)/2}\right),&\text{if }n\text{ is odd}
\end{cases}\\\\
&\qquad=\frac17\left((-1)^n2^n+\left(1-(-1)^n\right)\cdot3^{\lfloor n/2\rfloor+1}\right)\\\\
&\qquad=\frac17\left((-1)^n\left(2^n-3^{\lfloor n/2\rfloor-1}\right)+3^{\lfloor n/2\rfloor-1}\right)\;,
\end{align*}$$
where I’ve given you a choice of reasonable ways to write the expression.
