Sub topic 8
Summing a Finite Geometric Progression
Prerequisites: You should know exponents, fractions, algebraic rearrangement, and how to identify the common ratio of a sequence.
A geometric progression (GP) is a sequence in which each term is obtained by multiplying the previous term by a fixed number. This fixed number is the common ratio, written as \(r\). If the first term is \(a\), the first \(n\) terms are:
\[ a,\ ar,\ ar^2,\ ar^3,\ldots, ar^{n-1} \]
The sum of these \(n\) terms is written as \(S_n\).
The finite GP formula
For \(r \ne 1\),
\[ S_n=a\frac{r^n-1}{r-1} \]
An equivalent form is:
\[ S_n=a\frac{1-r^n}{1-r} \]
Use whichever form keeps the arithmetic simpler. Both give the same result.
When \(r=1\), every term equals \(a\), so the formula involving division by \(r-1\) cannot be used. In that special case:
\[ S_n=na \]
Deriving the formula
Start with:
\[ S_n=a+ar+ar^2+\cdots+ar^{n-1} \]
Multiply the entire equation by \(r\):
\[ rS_n=ar+ar^2+ar^3+\cdots+ar^n \]
Subtract the first equation from the second. All middle terms cancel:
\[ rSn-Sn=ar^n-a \]
Factor both sides:
\[ S_n(r-1)=a(r^n-1) \]
Therefore:
\[ S_n=a\frac{r^n-1}{r-1} \]
This cancellation method also explains why the final exponent is \(n\), although the last term has exponent \(n-1\).
Worked example
Find the sum of the first five terms of:
\[ 2,\ 6,\ 18,\ 54,\ 162 \]
Here, \(a=2\), \(r=3\), and \(n=5\).
\[ S_5=2\frac{3^5-1}{3-1} =2\frac{243-1}{2} =242 \]
A direct check gives:
\[ 2+6+18+54+162=242 \]
| Quantity | Value |
|---|---|
| First term \(a\) | 2 |
| Common ratio \(r\) | 3 |
| Number of terms \(n\) | 5 |
| Finite sum \(S_5\) | 242 |
from fractions import Fraction
def gp_sum(a, r, n):
a = Fraction(a)
r = Fraction(r)
if r == 1:
return a * n
return a * (r ** n - 1) / (r - 1)
print(gp_sum(2, 3, 5)) # 242CAT checks and common errors
- If the ratio is negative, preserve the sign while calculating \(r^n\).
- If \(0<r<1\), use \(\frac{1-r^n}{1-r}\) to avoid unnecessary negative values.
- If \(r=1\), use \(S_n=na\).
- Estimate the result by adding the largest few terms. This can expose an incorrect exponent or sign.
- In word problems, identify the first payment or quantity, the multiplier, and the number of stages before using the formula.
Exercise
Find the sum of the first six terms of the GP 5, 10, 20, 40, ...
Show answer
Here a = 5, r = 2, and n = 6. S_6 = 5(2^6 - 1)/(2 - 1) = 315.