Sum of a GP Using First and Last Terms
## Formula
For a GP with first term $$a$$, last term $$l$$, common ratio $$r$$ and $$n$$ terms:
$$S_n=a\frac{r^n-1}{r-1}$$
Since:
$$l=ar^{n-1}$$
we can also write:
$$S_n=\frac{lr-a}{r-1}$$
for:
$$r\ne1$$
## Usage
- Used when the first and last terms and common ratio are known.