<s>[INST] Power series expansion of a holomorphic function One must show that equality$$\sum_{n=0}^\infty n^2z^n = \frac{z(z+1)}{(1-z)^3} $$ holds for $z\in\mathbb C$ and $|z|<1$.
I tried to expand $f(z):=\frac{z(z+1)}{(1-z)^3}$ into power series where $ z_0=0$  is the center and coefficients given by $a_n=\frac{1}{2\pi i}\int_{|z|<1}\frac{f(z)}{(z-0)^{n+1}}dz$, because f is holomorphic on the open domain $D=${$z:|z|<1$}.
Is there a more easy way to show this equality?
 [/INST] We could also recall the binomial series expansion valid for $|z|<1$
\begin{align*}
\frac{1}{(1-z)^3}&=\sum_{n=0}^\infty\binom{-3}{n}(-z)^n=\sum_{n=0}^\infty\binom{n+2}{2}z^n\\
&=\frac{1}{2}\sum_{n=0}^\infty(n+2)(n+1)z^n \tag{1}
\end{align*}

Using the coefficient of operator $[z^n]$ to denote the coefficient of $z^n$ of a series, we obtain from (1)
\begin{align*}
[z^n]\frac{z+z^2}{(1-z)^3}&=\left([z^{n-1}]+[z^{n-2}]\right)\frac{1}{2}\sum_{k=0}^\infty(k+2)(k+1)z^k\\
&=\frac{1}{2}(n+1)n+\frac{1}{2}n(n-1)\\
&=n^2
\end{align*}

</s>