Is there a method to determine the generating function for a mutually recursive recurrence equation?
As an example, consider the following set if equations
$$R_n = R_{n-1}+ 3P_{n-1}; R_0 = 3$$ $$M_n = R_{n-1} + 2P_{n-1};M_0 = 2$$ $$P_n = 5M_{n-1} ;P_0 = 0$$ What I am interested here is to determine, given a value of n, I can find the nth value of R(n), M(n) and P(n) without determining all the values from 1 to n - 1
Hint $$\begin{bmatrix} R_{n}\\ M_{n}\\ P_{n} \end{bmatrix}= \begin{bmatrix} 1&0&3\\ 1&0&2\\ 0&5&0 \end{bmatrix}\cdot \begin{bmatrix} R_{n-1}\\ M_{n-1}\\ P_{n-1} \end{bmatrix}$$ let $$A=\begin{bmatrix} 1&0&3\\ 1&0&2\\ 0&5&0 \end{bmatrix}$$ then we only find $A^n$ it is easy to find it ,because $$A=Q^{-1}diag{(\lambda_{1},\lambda_{2},\lambda_{3})}Q$$ where $\lambda_{i}$ is eigenvalue of $A$,$Q$ is Orthogonal matrix
Solution 2:
since $$M_{n-1}=\dfrac{P_{n}}{5}\Longrightarrow M_{n}=\dfrac{P_{n+1}}{5}$$ then we have $$\dfrac{P_{n+1}}{5}=R_{n-1}+2P_{n-1}\Longrightarrow R_{n-1}=\dfrac{P_{n+1}}{5}-2P_{n-1}$$ so $$\dfrac{P_{n+2}}{5}-2P_{n}=\dfrac{P_{n+1}}{5}-2P_{n-1}+3P_{n-1}$$ then $$P_{n+2}=P_{n+1}+10P_{n}+5P_{n-1},P_{0}=0,P_{1}=10,P_{2}=15$$ then Characteristic equation is $$x^3=x^2+10x+5$$ three roots is $x_{1},x_{2},x_{3}$ then $$P_{n}=A(x_{1})^n+B(x_{2})^n+C(x_{3})^n$$
then It is easy to find it