Q:

Calculate coefficients of power series

Calculate the coefficients of the power series expansion of $f(z)=\frac{2}{\sqrt{1-3z}}+\frac{1}{(1-z)(1-2z)}$

Could you check if I understood the task and calculated it correctly?
\begin{align*}
f(z)&=\frac{2}{\sqrt{1-3z}}+\frac{1}{(1-z)(1-2z)}\\
&=2 \cdot \frac{1}{(1-3z)^{1/2}} - \frac{1}{1-z} + 2 \cdot \frac{1}{1-2z}\\
&=2 \sum \binom{n-\frac{1}{2}}{-\frac{1}{2}}(3z)^n-\sum z^n + 2 \sum (2z)^n\\
&=\sum \Big( 2 \cdot 3^n \cdot \binom{n-\frac{1}{2}}{-\frac{1}{2}} - 1 + 2^{n+1} \Big) z^n
\end{align*}
I've calculated the power series. Now, what is the answer? Which are the coefficients?

A:

We have
\begin{align}
f(z) &= \frac2{(1-3z)^{\frac12}} + \frac1{(1-z)(1-2z)}\\
&= \frac2{(1-3z)^{\frac12}} - \frac1{1-z} + \frac2{1-2z}\\
&= 2\sum_{n=0}^\infty \binom{-\frac12}n(-3)^nz^n -\sum_{n=0}^\infty z^n + 2\sum_{n=0}^\infty 2^nz^n\\
&= \sum_{n=0}^\infty \left[2\binom{-\frac12}n(-3)^n - 1 + 2^{n+1} \right]z^n,
\end{align}
so the $n^{\mathrm{th}}$ coefficient is
$$ 2\binom{-\frac12}n(-3)^n - 1 + 2^{n+1}.$$

