# Amount of money earned only from interest - recursion POV.

I have a bank account with $$0€$$. At the beginning of every month I put an additional $$250€$$ into my account and at the end of the month I get a $$0.5\%$$ interest on my money. Based only on this information, after $$10$$ years (or $$120$$ months), how much money have I earned only from the interest?

I know I have to use the $$2$$ recursion equations I learned in my discrete structures class, but I'm not sure how to utilise them properly in this case: $$x_n = a_1 \cdot x_{n-1} + b_1 \\ \text{and} \\ x_n= \begin{cases} b_0 \cdot a^n + b_1 \cdot \frac{a^n -1}{a-1} ^\ , & a \neq 1\\ b_0 + n \cdot b_1, & a=1 \end{cases}$$

Additionally, in this case the starting amount in the bank is $$0€$$ but what if we had more than that, for example $$1000€$$?

Every influx of into the bank account increases the principal amount, on which you will earn interest. I do not know about those particular recursion equations, but I will define the recursion, and you can check back to see how it fits with what you've been taught

For let's say the $$n^{th}$$ month, the interest you've earned till the previous month is $$I_{n-1}$$.

Hence, your total amount as of the start of the $$n^{th}$$ month is $$\sum P_i + I_{n-1}$$, where $$P_i$$ is the monthly fixed payment (in your case, it's 250\$)

Now, in the $$n^{th}$$ month, you will earn interest on your total, plus the added monthly payment for that month

Hence

$$I_n = 0.5\%*(\sum_1^{n-1} P_i + I_{n-1}) + 0.5\%*P_n$$

Now if you had an initial sum, that would just get added to the overall term as a constant, not affecting the rest of the solution