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...
 A: 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} $$
A: $\newcommand{\+}{^{\dagger}}%
 \newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
 \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}%
 \newcommand{\dd}{{\rm d}}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}%
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}%
 \newcommand{\fermi}{\,{\rm f}}%
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}%
 \newcommand{\half}{{1 \over 2}}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\isdiv}{\,\left.\right\vert\,}%
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}%
 \newcommand{\ol}[1]{\overline{#1}}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}%
 \newcommand{\sech}{\,{\rm sech}}%
 \newcommand{\sgn}{\,{\rm sgn}}%
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
$$
S_{n} \equiv \sum_{x = 0}^{n}2^{-x} = \half\sum_{x = 0}^{n}2^{-x + 1}
= \half\sum_{x = -1}^{n - 1}2^{-x}
= \half\pars{\sum_{x = 0}^{n}2^{-x} + 2 - 2^{-n}}
=\half\,S_{n} + 1 - 2^{-n - 1}
$$
Then,
$$
\half\,S_{n} = 1 - 2^{-n - 1}\quad\imp\quad
\color{#0000ff}{\large S_{n}} = 2\pars{1 - 2^{-n - 1}}
= \color{#0000ff}{\large 2 - 2^{-n}}
$$
A: If $$\displaystyle S=\sum_{x=0}^n 2^{-x}$$ then $$\displaystyle  2S=\sum_{x=0}^n 2^{1-x} = \sum_{x=-1}^{n-1} 2^{-x}$$ and subtracting the former from the latter gives the result
