The sum of the first $n$ terms in the infinite geometric sequence $\left\{\frac{1}{4},\frac{1}{8},\frac{1}{16},\dots \right\}$ is $\frac{255}{512}$. Find $n$.
n = 18.
The sequence is:
1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256, 1/512 = 255 / 512
So, n = 8