<s>[INST] How to change the base cases of a tribonacci sequence solved by matrix exponentation So the base case of a Fibonacci sequence is the following matrix:
\begin{bmatrix}1&1\\1&0\end{bmatrix} 
Which I understood as being:
\begin{bmatrix}F_2&F_1\\F_1&F_0\end{bmatrix} 
And that seems logical. But I don't really understand what each of the numbers in a tribonacci base case mean:
\begin{bmatrix}1&1&1\\1&0&0\\0&1&0\end{bmatrix}
I don't really understand what each of these numbers represent so if someone could help me, I would appreciate it. Also, I need to compute a tribonacci sequence where the base cases are not t[0]=0, t[1]=0 and t[2]=1 (like in the above matrix), but t[0]=1, t[1]=1 and t[2]=2 So how exactly could I implement that into the matrix that represents the base case? Do I just replace it like the following:
\begin{bmatrix}2&2&2\\2&1&1\\1&2&1\end{bmatrix}
But what if I would want to replace them with distinct numbers, say for example t[0]=3, t[1]=5 and t[2]=8 ? Where would each of these numbers be placed in the matrix? 
 [/INST] Notice that $F_n = F_{n-1} + F_{n-2}, \forall n \ge 2$ means that 
$$\begin{bmatrix} F_{n} \\ F_{n-1} \end{bmatrix}= \begin{bmatrix} 1 & 1 \\ 1 
 & 0\end{bmatrix}\begin{bmatrix} F_{n-1} \\ F_{n-2} \end{bmatrix}$$
and the initial conditions are $F_0 = F_1 = 1$ so $\begin{bmatrix} F_{1} \\ F_{0} \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$.
Therefore iteration gives
$$\begin{bmatrix} F_{n} \\ F_{n-1} \end{bmatrix}= \begin{bmatrix} 1 & 1 \\ 1 
 & 0\end{bmatrix}\begin{bmatrix} F_{n-1} \\ F_{n-2} \end{bmatrix}= \begin{bmatrix} 1 & 1 \\ 1 
 & 0\end{bmatrix}^2\begin{bmatrix} F_{n-2} \\ F_{n-3} \end{bmatrix} = \cdots = \begin{bmatrix} 1 & 1 \\ 1 
 & 0\end{bmatrix}^{n-1}\begin{bmatrix} F_{1} \\ F_{0} \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 1 
 & 0\end{bmatrix}^{n-1}\begin{bmatrix} 1 \\ 1 \end{bmatrix}$$
Similarly the Tribonacci numbers satisfy $T_n = T_{n-1} + T_{n-2} + T_{n-3}, \forall n \ge 3$ so
$$\begin{bmatrix} T_{n} \\ T_{n-1} \\ T_{n-2}\end{bmatrix}= \begin{bmatrix} 1 & 1 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 
 \end{bmatrix}\begin{bmatrix} T_{n-1} \\ T_{n-2} \\ T_{n-3}\end{bmatrix}$$
Your initial conditions are $T_0 = 1$, $T_1 = 1$ and $T_2 = 2$ so $\begin{bmatrix} T_{2} \\ T_{1} \\ T_0 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \\ 1\end{bmatrix}$.
Therefore as above we get
$$\begin{bmatrix} T_{n} \\ T_{n-1} \\ T_{n-2}\end{bmatrix}= \begin{bmatrix} 1 & 1 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 
 \end{bmatrix}^{n-2}\begin{bmatrix} T_{2} \\ T_{1} \\ T_{0}\end{bmatrix} = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 
 \end{bmatrix}^{n-2}\begin{bmatrix} 2 \\ 1 \\ 1\end{bmatrix}$$
</s>