Ordinary generating function of $n\cdot 2^{n-1}$ demonstration How I could demonstrate that the ordinary generating function of $n\cdot 2^{n-1}$ is
$$\frac{x}{(1-2x)^2}?$$ 

From $a_n=n2^{n-1}$ and the way generating functions are defined, we have
$$f(x)=\sum\limits_{n=0} a_n\cdot x^n=\sum\limits_{n=0}n2^{n-1}\cdot x^n=\sum\limits_{n=1}n2^{n-1}\cdot x^n=x\left(\sum\limits_{n=1}n2^{n-1}\cdot x^{n-1}\right)=\\
x\left(\sum\limits_{n=1}n(2x)^{n-1}\right)=\frac{x}{2}\left(\sum\limits_{n=1}2n(2x)^{n-1}\right)=\frac{x}{2}\left(\sum\limits_{n=1}(2x)^{n}\right)'=\frac{x}{2}\left(\frac{1}{1-2x}-1\right)'=\\
\frac{x}{2}\left(\frac{2x}{1-2x}\right)'=\frac{x}{2}\frac{2}{(1-2x)^2}=\frac{x}{(1-2x)^2}$$
