Smart demonstration to the formula $ \sum_{n=1} ^{N} \frac{n}{2^n} = \frac{-N + 2^{N+1}-2}{2^n}$ Someone could give me a smart and simple solution to show the folowing identity?
$$ \sum_{n=1} ^{N} \frac{n}{2^n} = \frac{-N + 2^{N+1}-2}{2^n}$$
 A: $$\sum_{n=1}^N \dfrac{n}{2^n}$$ can be written as
\begin{matrix}
\dfrac12 & + \dfrac1{2^2} & + \dfrac1{2^3} & + \dfrac1{2^4} & + \cdots & + \dfrac1{2^{N-1}} & + \dfrac1{2^N}\\
& + \dfrac1{2^2} & + \dfrac1{2^3} & + \dfrac1{2^4} & + \cdots  & + \dfrac1{2^{N-1}} & + \dfrac1{2^N}\\
& & + \dfrac1{2^3} & + \dfrac1{2^4} & + \cdots  & + \dfrac1{2^{N-1}} & + \dfrac1{2^N}\\
& & & + \vdots & + \vdots & + \vdots & + \vdots\\
& & & & & & + \dfrac1{2^N}\\
\end{matrix}
Now sum them row wise to get
$$\left(1 - \dfrac1{2^N} \right) + \dfrac12\left(1 - \dfrac1{2^{N-1}} \right) + \dfrac1{2^2}\left(1 - \dfrac1{2^{N-2}} \right) + \cdots +  \dfrac1{2^{N-1}}\left(1 - \dfrac1{2} \right)\\ = \left(1 + \dfrac12 + \dfrac1{2^2} + \cdots + \dfrac1{2^{N-1}} \right) - \left(\dfrac1{2^N} + \dfrac1{2^N} + \dfrac1{2^N} + \cdots + \dfrac1{2^N} \right)\\
= 2 - \dfrac1{2^{N-1}} - \dfrac{N}{2^N}$$
Essentially, we are doing the following
$$\sum_{n=1}^N \dfrac{n}{2^n} = \sum_{n=1}^N \sum_{k=1}^n \dfrac1{2^n} = \sum_{k=1}^N \sum_{n=k}^{N} \dfrac1{2^n} = \sum_{k=1}^N \dfrac1{2^{k-1}}\left(1 - \dfrac1{2^{N+1-k}}\right) = \sum_{k=1}^N \left(\dfrac1{2^{k-1}} - \dfrac1{2^{N}} \right)\\
= 2 - \dfrac1{2^{N-1}} - \dfrac{N}{2^N}$$
A: See the following answer: How can I evaluate $\sum_{n=0}^\infty (n+1)x^n$.
We can use a similar technique as that used to sum the geometric series $\sum_{n=1}^k r^n.$  Let $$S_{m}=\sum_{n=1}^{m}nr^{n},$$ and consider $$S_{m}-rS_{m}=-mr^{m+1}+\sum_{n=1}^{m}r^{n}.$$  Using our known formula for the geometric series, we find that $$S_m = \frac{mr^{m+2}-(m+1)r^{m+1}+r}{(1-r)^2}.$$
This equality holds for any $r\neq 1$, so inserting $r=\frac{1}{2}$ we have that $$\sum_{n=1}^N \frac{n}{2^n}=\frac{2^N+1-N+2}{2^N}$$
A: $$\eqalign{\sum_{n=1}^N n r^n &= r \dfrac{d}{dr} \sum_{n=0}^n r^N 
\cr &= r \dfrac{d}{dr} \dfrac{1 - r^{N+1}}{1-r}\cr
&=  r \dfrac{-(N+1) r^N (1-r) + (1 - r^{N+1})}{(1 - r)^2}\cr}$$
A: Proceed by induction.
Base case is true with $N=1$.
Inductive (I replaced the actual sum with $\sum$):
$$ \frac{N+1}{2^{N+1}} + \sum^N = \sum^{N+1} $$
$$ \frac{N+1}{2^{N+1}} + \frac{-N+2^{N+1}-2}{2^N} = \frac{-(N+1) + 2^{N+2}-2}{2^{N+1}} $$
$$ \frac{N + 1 - 2N + 2^{N+2} - 4}{2^{N+1}} = \frac{-N-3+2^{N+2}}{2^{N+1}} $$
$$ \frac{- N - 3 + 2^{N+2}}{2^{N+1}} = \frac{-N-3+2^{N+2}}{2^{N+1}} $$
Which is true, so the summation is true. This is a good general way for proving summation formulas.
