Find the sum of the first $ 5 $ terms of a geometric sequence if $ a_1 = 1 ~~ \text{and} ~~ r = 2 $.
To find $ S_{ 5 } $ we use formula
$$ \color{blue}{S_n = a_1 \cdot \frac{1 - r^n}{1-r}}$$In this example we have $ a_1 = 1 ~~,~~ r = 2 ~~\text{and}~~ n = 5 $. After substituting these values into the formula, we obtain:
$$ \begin{aligned} S_n &= a_1 \cdot \frac{1 - r^n}{1-r} \\ S_{ 5 } &= 1 \cdot \frac{1 - 2^{ 5 }}{1- 2 } \\ S_{ 5 } &= 1 \cdot 31 \\ S_{ 5 } &= 31 \end{aligned}$$