Sum of Geometric Sequence

Theorem
Let $x$ be an element of one of the standard number fields: $\Q, \R, \C$ such that $x \ne 1$.

Let $n \in \N^*$.

Then:
 * $\displaystyle \sum_{j = 0}^{n - 1} x^j = \frac {x^n - 1} {x - 1}$

Corollary
Let $a, ar, ar^2, \ldots, ar^{n-1}$ be a geometric progression.

Then:
 * $\displaystyle \sum_{j = 0}^{n - 1} ar^j = \frac {a \left({r^n - 1}\right)} {r - 1}$

Proof
Let $\displaystyle S_n = \sum_{j = 0}^{n - 1} x^j = 1 + x + x^2 + \cdots + x^{n-1}$.

Then $\displaystyle x S_n = x \sum_{j = 0}^{n - 1} x^j = x + x^2 + x^3 + \cdots + x^{n-1} + x^n$.

Then $\displaystyle x S_n - S_n = -1 + x - x + x^2 - x^2 + \cdots + x^{n-1} - x^{n-1} + x^n = x^n - 1$.

The result follows.

Using Sum Notation
$\displaystyle S_n(x - 1) = x S_n - S_n = x \sum_{j = 0}^{n - 1} x^j - \sum_{j = 0}^{n - 1} x^j = \sum_{j = 1}^{n} x^j - \sum_{j = 0}^{n - 1} x^j = x^n + \sum_{j = 1}^{n-1} x^j - \left({x^0 + \sum_{j = 1}^{n - 1} x^j}\right) = x^n - x^0 = x^n - 1$

The result follows.

Alternative Proof
You can directly use the result Difference of Two Powers by setting $a = 1$ and $b = x$.

Proof of Corollary
Follows immediately from the fact that $a + ar + ar^2 + \cdots + ar^{n-1}$ is exactly the same as $a \left({1 + r + r^2 + \cdots + r^{n-1}}\right)$.

Comment
Note that when $x < 1$ the result is usually given as $\displaystyle \sum_{j = 0}^{n - 1} x^j = \frac {1 - x^n} {1 - x}$.