How can we prove the following?
$$ \sum_{n=1}^{\infty} \frac{n}{2^n} = 2 $$
It would be great to see multiple ways, or hints, about how this can be proven.
I know this is a power series $\sum_{n=0}^\infty c_n \, (x-a)^n$ where $c_n = n$ and $x = \frac{1}{2}$ and $a = 0$, but otherwise I am stuck.
Consider $f(x)=\sum\limits_{i=0}^\infty x^i=\frac{1}{1-x}$ for $|x|<1$. Then
$$f'(x)=\sum\limits_{i=0}^\infty i x^{i-1}=\sum\limits_{i=1}^\infty i x^{i-1}=\frac1{(1-x)^2}$$ for $|x|<1$. Plugging in $x=\frac12$, we have
$$\frac12f'(1/2)=\sum_{i=1}^\infty\frac i{2^i}=\frac1{2 \left(1-\frac12\right)^2}=2$$
So $$\sum\limits_{i=1}^\infty\frac i{2^i}=2$$