I have faced an interesting question:
Jack puts $\$4,000 $ in his bank account with yearly interest rate of $5\%$. In the beginning of every year (starting the second year after the first deposit), he puts an additional $\$1,000$ in the same bank account. What is the bank balance after $n$ years?
Now I clearly thought about Generating Functions, but failed to describe what in what regarding the interest rate and the bank balance! I thought that one year gives a power of $x^{0.05n}$, but I genuinely feel that is truly wrong.
Any help would be appreciated
You can do this with recurrence relation: $a_0=4000$ and $a_n=1.05a_{n-1}+1000$. From here you can solve by using generating functions (if you want to):
Let $f(x)=\sum_{n=0}^\infty a_nx^n$. Then $xf(x)=\sum_{n=1}^\infty a_{n-1}x^n$. So $$\begin{align*}(1-1.05x)f(x)&=f(x)-1.05xf(x)=a_0+\sum_{n=1}^\infty (a_n-1.05a_{n-1})x^n=\\ &=a_0+\sum_{n=1}^\infty a_nx^n-1.05\sum_{n=1}^\infty a_{n-1}x^n=\\ &=a_0+\sum_{n=1}^\infty 1000x^n=4000+1000\left(\frac1{1-x}-1\right) \end{align*}$$ Now find $f(x)$ and expand into series to find $a_n$.