You invest $50 each month in a retirement account, starting at age 20. Assume the value increases at an average of 6% per year, compounded monthly, and you never make a withdrawal.

1. Calculate the value of your retirement account if you retire at age 65.
2. How much money do you need to invest each month if your goal is to have a million dollars when you turn 65, if you start saving for retire when you are: i) 20 years old; ii) 30 years old

This is my mathematical model: x(n+1) = x(n) + (0.06/12)(50) where x0=50 and xn=amount of money in the account per month

For part 1, if I retire at age 65 that would be 45 years. Thus, I would just need to do my mathematical model formula 45 times since nothing else is changing except the number of years right?

For part 2i and 2ii, I do not understand where to put the 1,000,000 dollars in my math model. The only place, I think it would go is in the position where x(n+1) would be...

Edit: I am not supposed to be using formulas already known for compound interest, etc.