<s>[INST] A sequence is defined by $f(x) = 4^{x-1}$, find the sum of the first $8$ terms. A sequence is defined by $f(x) = 4^{x-1}$, find the sum of the first $8$ terms.
$\dfrac{a(1-r^n)}{1-r}$
$\dfrac{1(1-4^7)}{1-4} = 5461$.
The answer in the book is $21845$. How is this so?
Thank you
 [/INST] For $a_n = 4^{n-1}$,
$$
a\frac{r^n-1}{r-1} = \frac{4^8-1}{4-1} = \frac{65536 -1}{3} = 21845.
$$
</s>