Consider a generalised fibonacci $G$ sequence $1, 1, 1, 3, 5, 9, 17...$ that's created by summing the last 3 entries in the sequence together:
$G_0 = 1, G_1 = 1, G_2 = 1$ and $G_{n+1} = G_n + G_{n-1} + G_{n-2}$ for $n \ge 2$.
1) Find a $3 \times3$ matrix M such that, for any $k \ge 2$, $$\begin{pmatrix} G_{k+1} \\ G_k \\ G_{k-1} \end{pmatrix} = M \begin{pmatrix} G_{k} \\ G_{k-1} \\ G_{k-2} \end{pmatrix}$$
I figured out that $M = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{pmatrix}$ from the given equation.
2) Find a numerical value for $G_{25}$
With a bit of thinking, I came up with the equation $$\begin{pmatrix} G_{k+1} \\ G_k \\ G_{k-1} \end{pmatrix} = M^k \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}$$ Hence $G_{25}$ would be obtained by the first element from $M^{24}$ times [1, 1, 1]. Using a calculator, I got $3311233$, which apparently is wrong. Was my equation above wrong? How could I approach this?
Find limit of $\frac{\ln G_n}{n}$ to 10 decimal places as $n$ goes to $\infty$.
I have no idea how to approach this. I thought of using eigenvalues and eigenvectors, but since the M I found only gives me one real value of 1.83929... I don't quite see how that's going to be useful. Any help would be really appreciated.
The provided equation is wrong, as you should have
$$\begin{bmatrix}G_{k+2}\\G_{k+1}\\G_k\end{bmatrix}=M^k\begin{bmatrix}1\\1\\1\end{bmatrix}$$
which matches when $k=0$. The computation of $G_k$ from this can be done in several ways. One way is to diagonalize $M$, which would reduce computing $M^k$ down to computing $\lambda^k$ for each eigenvalue $\lambda$. The largest eigenvalue, the supergolden ratio $\psi$, then determines the asymptotic behavior
$$\lim_{n\to\infty}\frac{\ln(G_n)}n=\lim_{n\to\infty}\ln\frac{G_{n+1}}{G_n}=\ln(\psi)\simeq3822450858$$
of the supergolden sequence. The characteristic polynomial of the matrix
$$\det(M-\lambda I)=\det\begin{bmatrix}1-\lambda&1&1\\1&-\lambda&0\\0&1&-\lambda\end{bmatrix}=1+\lambda+\lambda^2-\lambda^3$$
matches the characteristic equation of the recurrence. The eigendecomposition is given by
$$M=Q\Lambda Q^{-1}$$
where
$$Q\simeq\begin{bmatrix}3.38298&-0.191488-0.508852i&-0.191488+0.508852i\\1.83929&-0.419643+0.606291i&-0.419643-0.606291i\\1&1&1\end{bmatrix}$$
are the eigenvectors and
$$\Lambda\simeq\begin{bmatrix}1.83929&0&0\\0&-0.419643+0.606291i&0\\0&0&-0.419643-0.606291i\end{bmatrix}$$
are the eigenvalues. Only 6 significant figures are shown here, but in order to compute $M^{23}$ accurately enough, more figures are probably needed.
Without involving non-integral values, the computation of $G_n$ can be done quickly using exponentiation by squaring. For $G_{25}$, we get
\begin{align}\begin{bmatrix}G_{25}\\G_{24}\\G_{23}\end{bmatrix}&=\begin{bmatrix}1&1&1\\1&0&0\\0&1&0\end{bmatrix}^{23}\begin{bmatrix}1\\1\\1\end{bmatrix}=\left(\begin{bmatrix}1&1&1\\1&0&0\\0&1&0\end{bmatrix}^2\right)^{11}\begin{bmatrix}1&1&1\\1&0&0\\0&1&0\end{bmatrix}\begin{bmatrix}1\\1\\1\end{bmatrix}\\&=\begin{bmatrix}2&2&1\\1&1&1\\1&0&0\end{bmatrix}^{11}\begin{bmatrix}3\\1\\1\end{bmatrix}=\left(\begin{bmatrix}2&2&1\\1&1&1\\1&0&0\end{bmatrix}^2\right)^5\begin{bmatrix}2&2&1\\1&1&1\\1&0&0\end{bmatrix}\begin{bmatrix}3\\1\\1\end{bmatrix}\\&=\begin{bmatrix}7&6&4\\4&3&2\\2&2&1\end{bmatrix}^5\begin{bmatrix}9\\5\\3\end{bmatrix}=\left(\begin{bmatrix}7&6&4\\4&3&2\\2&2&1\end{bmatrix}^2\right)^2\begin{bmatrix}7&6&4\\4&3&2\\2&2&1\end{bmatrix}\begin{bmatrix}9\\5\\3\end{bmatrix}\\&=\begin{bmatrix}81&68&44\\44&37&24\\24&20&13\end{bmatrix}^2\begin{bmatrix}105\\57\\31\end{bmatrix}=\begin{bmatrix}81&68&44\\44&37&24\\24&20&13\end{bmatrix}\begin{bmatrix}13745\\7473\\4063\end{bmatrix}\\&=\begin{bmatrix}\color{#ef3322}{1800281}\\978793\\532159\end{bmatrix}\end{align}