I was having trouble with this question and wondered if I could get some help with it ?

How many terms of the geometric series $\displaystyle 1 + \frac{2}{3} + \frac{4}{9} $ + ... must be taken so that the sum differs from 3 by less than $\displaystyle 10^{-3} $?

I started with this inequality:

$\displaystyle

3 - 10^{-3} < \frac{(\frac{2}{3})^n - 1}{\frac{2}{3} - 1} < 3 + 10^{-3}

$

and ended up with this:

$\displaystyle

\frac{ln(\frac{-1}{3000})}{ln(\frac{2}{3})} < n < \frac{ln(\frac{1}{3000})}{ln(\frac{2}{3})} = 19.74

$

Of course you cannot take the log of a negative number so how do I work out what n must be greater than? Also sorry I have no idea how to do that maths code thing so it might look a bit messy, Thanks