A worker wishing to retire for $20$ years would be paid an advance pension of $A=6000$ euro. The capital required for this is to be paid in the course of $15 $ years by successively paid annual contributions. At the beginning of the accumulation period, the deposit is once $K_0=10,000 $ Euro. How much are the annual contributions to be paid if the interest rate is $ q=4 \% $ during the entire term?
$$$$
I have done the following:
Let $X$ be the amount of the annual contributions.
After 15 years the present amount will be $$K_{15}=K_0 \cdot (1+q)^{15}+X\sum_{i=0}^{14}(1+q)^i=K_0 \cdot (1+q)^{15}+X\frac{(1+q)^{14+1}-1}{1+q-1} \\ =K_0\cdot (1+q)^{15}+X\frac{(1+q)^{15}-1}{q}$$ right?
After that, after the 20 years the present value will be $$K_{15} \cdot (1+q)^{20}-A\sum_{i=0}^{19}(1+q)^i=K_{15} \cdot (1+q)^{20}-A\frac{(1+q)^{19+1}-1}{1+q-1} \\ =K_{15} \cdot (1+q)^{20}-A\frac{(1+q)^{20}-1}{q}$$ right?
After the 20 years the value must be $0$, or not?
So, we have the following: $$K_{15} \cdot (1+q)^{20}-A\frac{(1+q)^{20}-1}{q}=0 \\ \Rightarrow \left ( K_0 \cdot (1+q)^{15}+X\frac{(1+q)^{15}-1}{q}\right )\cdot (1+q)^{20}-A\frac{(1+q)^{20}-1}{q}=0 \\ \Rightarrow K_0 \cdot (1+q)^{35}+X\frac{(1+q)^{15}-1}{q}\cdot (1+q)^{20}=A\frac{(1+q)^{20}-1}{q} \\ \Rightarrow X\frac{(1+q)^{15}-1}{q}\cdot (1+q)^{20} = A\frac{(1+q)^{20}-1}{q}-K_0 \cdot (1+q)^{35} \\ \Rightarrow X = \frac{A((1+q)^{20}-1)}{ (1+q)^{20}((1+q)^{15}-1)}-\frac{K_0\cdot q \cdot (1+q)^{35}}{ (1+q)^{20}((1+q)^{15}-1)} \\ \Rightarrow X = \frac{A((1+q)^{20}-1)}{ (1+q)^{20}((1+q)^{15}-1)}-\frac{K_0\cdot q \cdot (1+q)^{15}}{(1+q)^{15}-1}$$ Is this correct so far? How could we continue?
We suppose all payments are made at the end of each period.
Let be $n=15$, $m=20$, $K_0=10\,000$, $A=6\,000$, $q=4\%$ and $X$ the requested payment.
One way to solve the problem is to use the present values. The present value must satisfy $$ K_0+Xa_{\overline{n}|q}= A\; _{n|}a_{\overline{m}|q} $$ where $$a_{{\overline {n}}|q}={\frac {1-v^{n}}{q}},\quad v=\frac{1}{1+q},\qquad _{n|}a_{\overline{m}|q}=v^n a_{\overline{m}|q}=a_{\overline{n+m}|q}-a_{\overline{n}|q}$$ and then $$ X=\frac{A\; _{n|}a_{\overline{m}|q}-K_0}{a_{\overline{n}|q}} $$ Another way is to impose that the future value of the payments of the first periods at time $n$ is equal to the present value of the pension at time $n$, that is $$ K_0(1+q)^n+Xs_{\overline{n}|q}= A\, a_{\overline{m}|q} $$ where $$s_{{\overline {n}}|q}={\frac {(1+q)^{n}-1}{q}}$$ and then $$ X=\frac{A\;a_{\overline{m}|q}-K_0(1+q)^n}{s_{\overline{n}|q}} $$