# Sum of the series $\sum \frac{n}{2^{n}}$ [duplicate]

I know that the series converges by d'Alembert ratio test, where $\lim\left ( \frac{A_{n+1}}{A_{n}} \right )= \frac{1}{2}$, but I don't know how to calculate the sum of the serie. Thanks for the help.

$\sum_{k=0}^\infty x^n = \frac{1}{1-x}$ for $|x|<1$. Then $\sum_{k=1}^\infty nx^n = x\times \left(\frac{1}{1-x}\right)'$ for $|x|<1$.
\begin{align*} S&= \frac{1}{2}+\frac{2}{4}+\frac{3}{8}+\frac{4}{16}+.....\\ \frac{1}{2}S&=\frac{1}{4}+\frac{2}{8}+\frac{3}{16}\\ S-\frac{1}{2}S&=\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+......\\ S-\frac{1}{2}S&=1 \end{align*} Thus $S=2$