<s>[INST] From homogeneous recursive relation to Matrices and Linear Algebra After the lesson in recursive relations in the university, I realised that we can transform a homogeneous recursive relation to a linear algebra problem.
Let $f_{n}-2f_{n-1}+f_{n-2}=0$, with $f_{0}=7, f_{1}=15$.
We can write this recursive relation in terms of matrices as:
\begin{align*} \left[\begin{array}{ccc}
  1 &0 &0 &0 &... \\
  0 &1 &0 &0 &... \\
  1 &-2 &1 &0 &... \\
  0 &1 &-2 &1 &... \\
  ... &...&...&...&...\\ 
\end{array}\right]
\begin{bmatrix}
  f_{0}  \\
  f_{1}  \\
  \vdots \\
  \vdots \\
\end{bmatrix} \\
{} = \begin{bmatrix}
  7  \\
  15  \\
  \vdots\\
\vdots\\
\end{bmatrix}
\end{align*}
Therefore, our initial problem has now the form of $$A\vec{v}=\vec{w}$$
My question here is what can we obtain if we calculate the inverse of the matrix $A$ and what is the general formula for the inverse of $A$ for any homogeneous recursive relation.
In this specific problem I think that it might be the matrix
\begin{bmatrix}
1 & 0 & 0 & 0 & ...\\ 
0 & 1 & 0 & 0 & ...\\ 
-1 & 3 & 1 & 0 & ...\\ 
-3 & 8 & 3 & 1 & ...\\ 
... & ... & ... & ... & ... 
\end{bmatrix}
 [/INST] In fact, dealing with infinite matrices is cumbersome.
A much simpler linear algebra approach amounts to describe the relationship as being between consecutive terms in this way:
$$\begin{pmatrix}f_n\\f_{n-1}\end{pmatrix}=\begin{pmatrix}2&-1\\1&0\end{pmatrix}\begin{pmatrix}f_{n-1}\\f_{n-2}\end{pmatrix} \ \text{with} \ \begin{pmatrix}f_1\\f_{0}\end{pmatrix}=\begin{pmatrix}15\\7\end{pmatrix}$$
finally giving :
$$\begin{pmatrix}f_n\\f_{n-1}\end{pmatrix}=\begin{pmatrix}2&-1\\1&0\end{pmatrix}^{n-1}\begin{pmatrix}15\\7\end{pmatrix}$$
</s>