# Generalisation of an expression.

I have been solving matrices questions lately and this pattern keeps showing up:

Given matrix $$P = \begin{bmatrix} 1 & 0 & 0\\ 4 & 1 & 0\\ 16 & 4 & 1\\ \end{bmatrix}$$ and $$I$$ be identity matrix of order 3. If $$[Q] = [q_{ij}]$$ is a matrix such that $$P^{50}-Q= I$$ then $$\frac{q_{31}+q_{32}}{q_{21}} = ?$$

While solving I found this pattern for a general matrix of the type: $$L = \begin{bmatrix} 1 & 0 & 0\\ a & 1 & 0\\ b & a & 1\\ \end{bmatrix}$$ As

$$L^n = \begin{bmatrix} 1 & 0 & 0\\ a×n & 1 & 0\\ K & a×n & 1\\ \end{bmatrix}$$

Where $$K = (L_{31})_{{n-1}}+a^2×(n-1) + b$$

If I have to figure out $$L_{50}$$ using this algorithm, I need to find $$L_{49}, L_{48}$$ and so on which basically defeats the purpose. How do you reiterate the value of $$L_{n-1}$$ so that I can use directly the value of $$b$$ to calculate $$L_{31}$$ of any power of matrix?

By recursion you actually show that $$P^n=\begin{bmatrix} 1 & 0 & 0 \\ 4n & 1 & 0 \\ 16n + \frac{(n-1)n}{2}4^2 & 4n & 1\end{bmatrix} ,$$ so you necessarily have $$Q=\begin{bmatrix} 0 & 0 & 0 \\ 4n & 0 & 0 \\ 16n + \frac{(n-1)n}{2}4^2 & 4n & 0\end{bmatrix}$$ where $$n=50$$ (but we will substitute later), so we obtain $$\frac{q_{31}+q_{32}}{q_{21}}= \frac{16n + \frac{(n-1)n}{2}4^2 + 4n}{4n} = 4 + 2(n-1) + 1 =103.$$
Note that $$L=I+N$$ with $$N^3=0$$. Therefore, $$L^n = I+n N + \frac{n(n-1)}{2}N^2$$. Since $$N^2 = \begin{bmatrix} 0 & 0 & 0\\ 0 & 0 & 0\\ a^2 & 0 & 0\\ \end{bmatrix}$$ we get $$L^n = \begin{bmatrix} 1 & 0 & 0\\ n a & 1 & 0\\ nb +\frac{n(n-1)}{2}a^2& n a & 1\\ \end{bmatrix}$$