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