<s>[INST] Sum with Exponent I've got the following sum which I'm trying to figure out:
$$\sum_{x=0}^n 2^{-x}$$
Wolframalpha tells me that it's equal to $2 - 2^{-n}$ but I am interested in figuring out why, and how to get that result by hand.
Any help is greatly appreciated. Thanks.
Also, as you can tell, I could really use some help with MathJax...
 [/INST] This is a geometric series with first term $1$ and common ratio $1/2$.
There is a well-known formula for calculating such sums.
Your sum, $S$ is given by:
$$S = \frac{1}{2^0}+\frac{1}{2^1}+\frac{1}{2^2} + \cdots + \frac{1}{2^n}$$
This is a geometric series because to get from one term to the next we multiply the the common ratio $\frac{1}{2}$. The usual trick for geometric series is to multiply $S$ by the common ratio:
$$\frac{1}{2}S = \frac{1}{2^1}+\frac{1}{2^2}+\frac{1}{2^3} + \cdots + \frac{1}{2^{n+1}}$$
Taking the difference between $S$ and $\frac{1}{2}S$ gives us:
$$S-\frac{1}{2}S = \frac{1}{2^0}-\frac{1}{2^{n+1}}$$
Obviously $S-\frac{1}{2}S=\frac{1}{2}S$ and $\frac{1}{2^0}=\frac{1}{1}=1$. The last line the becomes
$$\frac{1}{2}S=1-\frac{1}{2^{n+1}}$$
Finally, we multiply both sides by $2$ to get $S$:
$$S=2-\frac{2}{2^{n+1}} = 2-\frac{1}{2^n} = 2-2^{-n} $$
</s>