# Geometric series

A geometric series is a sum of terms in which two successive terms always have the same ratio. For example,

4 + 8 + 16 + 32 + 64 + 128 + 256

is a geometric series with common ratio 2.

The sum of a geometric series can be computed quickly with the formula

```      n        xn+1 - xm
∑ xk  =  ---------
k=m        x - 1
```

which is valid for all natural numbers mn and all numbers x≠ 1 (or more generally, for all elements x in a ring such that x - 1 is invertible). This formula can be verified by multiplying both sides with x - 1 and simplifying.

Using the formula, we can determine the above sum: (29 - 22)/(2 - 1) = 508. The formula is also extremely useful in calculating annuities: suppose you put \$2,000 in the bank every year, and the money earns interest at an annual rate of 5%. How much money do you have after 6 years?

2,000 · 1.056 + 2,000 · 1.055 + 2,000 · 1.054 + 2,000 · 1.053 + 2,000 · 1.052 + 2,000 · 1.051
= 2,000 · (1.057 - 1.05)/(1.05 - 1)
= 14,284.02

An infinite geometric series is an infinite series whose successive terms have a common ratio. Such a series converges if and only if the absolute value of the common ratio is less than one; its value can then be computed with the formula

```     ∞          1
∑ xk  =  ------
k=0       1 - x
```

which is valid whenever |x| < 1; it is a consequence of the above formula for finite geometric series by taking the limit for n→∞.

This last formula is actually valid in every Banach algebra, as long as the norm of x is less than one, and also in the field of p-adic numbers if |x|p < 1.