This question might have been asked before but I have not been able to find it.
How can I find: $$\sum_{i=0}^n 2^{-i}$$ Help?
This question might have been asked before but I have not been able to find it.
How can I find: $$\sum_{i=0}^n 2^{-i}$$ Help?
If you know what is different base representation, then $\sum\limits_{i=0}^{n}2^i$ will look like $11\ldots 11_2$ with $n+1$ 1s. And any power of 2 is 1 followed by 0s, like $10\ldots 00_2$ with number of 0s equal to the power $2^n = 1\underbrace{0\ldots 0_2}_{n}$.
So, $$\sum\limits_{i=0}^{n}2^i = 2^{n+1}-1$$
Edit: for the $\sum\limits_{i=0}^{n}2^{-i}$
$$\sum\limits_{i=0}^{\infty}2^{-i} = 2$$ and $$\sum\limits_{i=0}^{n}2^{-i} = \sum\limits_{i=0}^{\infty}2^{-i} - \sum\limits_{i=n+1}^{\infty}2^{-i}=\sum\limits_{i=0}^{\infty}2^{-i}-2^{-n-1}\cdot\sum\limits_{i=0}^{\infty}2^{-i} = 2 - 2^{-n-1}\cdot2 = 2 - 2^{-n}$$
You have to find $$S=\sum_{i=0}^n2^{i}$$. Check the value of $2S$. By subtracting you will see that $$2S-S=2^{n+1}-2^{0}$$
Consider the infinite sum. Observe that if you divide it by $2$, you keep the same sum, with the initial term dropped. Then from $\dfrac S2=S-1$ you draw $S=2$.
Then if you want to truncate the sum after the $n^{th}$ term, notice that the tail of the sum is $2^{-n}S$. The rest is yours.
This summation is particularly easy if you spend the effort of computing a few terms.
$$1,\\1+\frac12=\frac32,\\1+\frac12+\frac14=\frac74,\\1+\frac12+\frac14+\frac18=\frac{15}8,\\\cdots$$
Now it should be obvious that by repeating the last term, you obtain $2$ in all cases.