<s>[INST] 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}$$
 [/INST] 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.
</s>