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:
 * $$\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:
 * $$\sum_{j = 0}^{n - 1} ar^j = \frac {a \left({r^n - 1}\right)} {r - 1}$$

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

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

Then $$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
$$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 $$\sum_{j = 0}^{n - 1} x^j = \frac {1 - x^n} {1 - x}$$.