Show that $ \sum_{k=0}^{\infty} (k-1)/2^k = 0$ I am a computer scientist trying resolve exercises from CLRS. Here is one that I can't make progress on.
Show that $\sum\limits_{k=0}^{\infty} (k-1)/2^k = 0 $
What I did so far:
$$ \sum_{k=0}^{\infty} \frac{k}{2^k} - \sum_{k=0}^{\infty} \frac{1}{2^k} $$
And by this, seems that is not 0 the correct answer.
(This is appendix question A.1-4 from Introduction to Algorithms by Cormen 3ed)
 A: The answer is $0$. To see this. Let's recall the identities 
$$ \sum_{k=0}^{\infty} x^k = \frac{1}{1-x},\quad \sum_{k=0}^{\infty} k x^k = 
\frac{x}{(1-x)^2} $$
which gives 
$$ \sum_{k=0}^{\infty} k x^k -\sum_{k=0}^{\infty} x^k = \frac{2x-1}{(1-x)^2} =0  \iff 2x-1=0 \iff x = \frac{1}{2}$$
A: Here are some useful evaluations:
$$
1+x+x^2+...+x^n=\frac{1-x^{n+1}}{1-x}, \quad |x|<1. \tag1
$$ Then by differentiating $(1)$ you get
$$
1+2x+3x^2+...+nx^{n-1}=\frac{1-x^{n+1}}{(1-x)^2}+\frac{-nx^{n}}{1-x}, \quad |x|<1, \tag2
$$ and by making $n \to +\infty$ in $(1)$ and $(2)$, using $|x|<1$, gives 
$$
1+x+x^2+...+x^n+...=\frac{1}{1-x} \tag3
$$
$$
1+2x+3x^2+...+nx^{n-1}+...=\frac{1}{(1-x)^2} \tag4
$$
If you set $x=\frac12$ in $(3)$ and $(4)$, you obtain an answer to your question.
A: We have $\displaystyle \sum_{k=0}^{\infty} x^k = \frac{1}{1-x}$ for $\displaystyle |x|<1$. Let $\displaystyle s=\sum_{k=0}^{\infty}\frac{k-1}{2^k}=\sum_{k=0}^{\infty}\frac{k}{2^k}-2$ or that $\displaystyle s+2=\sum_{k=0}^{\infty}\frac{k}{2^k}$. Now note that
\begin{align}
s&=\sum_{k=0}^{\infty}\frac{k-1}{2^k}\\
&=-1+\sum_{k=2}^{\infty}\frac{k-1}{2^k}\\
&=-1+\sum_{k=0}^{\infty}\frac{k}{2^{k+1}}\\
&=-1+\frac12\sum_{k=0}^{\infty}\frac{k}{2^{k}}\\
&=-1+\frac{s}{2}+1\\
&=\frac{s}{2}
\end{align}
therefore $\displaystyle s=\frac{s}{2}$ or that $\displaystyle s=0$.
