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}$$

$$\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}$$
