How long does it take to change $90\%$ of water in an aquarium? I am thinking about buying an aquarium and thought about a system that automatically changes water. This led me to think about the following problem:

Given a $500$$\ell$ tank and a system that automatically changes $1$$\ell$ of the water in the tank with fresh water every day, how many days does it take to replace $90\%$ of the water that's in the tank on day $0$? We assume the old water and the fresh water are perfectly mixed every time fresh water is added.

My idea is that on the first day we simply replace $1/500$ of the water. On the second day again  we replace $1/500$ of the water in the tank. However, $1/500$ has already been replaced on the first day and we have to subtract it. So on the second day we replace $\frac{1}{500}-\frac{\frac{1}{500}}{500}=\frac{1}{500}-\frac{1}{500^2}$. Thus, in total we have replaced $\frac{2}{500}-\frac{1}{500^2}$ on the second day. On the third we do the same thing, replace $1/500$ and subtract the water we have already replaced, obtaining $\frac{1}{500}-\frac{\frac{2}{500}-\frac{1}{500^2}}{500}=\frac{1}{500}-\frac{2-\frac{1}{500}}{500^2}$ of fresh water on the third day.
However I can't find the pattern, but I think this is a series, isn't it? So all we would have to do is find an explicit form of the series and find the finite series that equals $450/500$, right?
I think I was posed a similar question in my calculus course once and thought that there's an easy solution to the problem. Is my reasoning above correct? How can I find the solution to my problem?

Hint:
If on day $d$ there is a proportion $f$ of fresh water, on day $d+1$ the proportion is $\dfrac{499f+1}{500}$. Hence you have an arithmetico-geometric progression.
Solve the recurrence
$$f_{d+1}=\dfrac{499f_d+1}{500}$$ or $$f_{d+1}-1=\frac{499}{500}(f_d-1)$$
which is a geometric progression.

$$\left\lceil\frac{\dfrac{50}{500}}{\log\dfrac{499}{500}}\right\rceil-1=1150.$$

