Geometric Series

The sum of the terms of an geometric sequence
\[ S_n = \sum_{i=1}^n a r^{i-1} = a \frac{1-r^n}{1-r} \]
where \(\sum\) is the summation sign.