Matrix-valued periodic Fibonacci polynomials Consider the Fibonacci polynomials $f_n(x)$, defined by the recursion $f_n(x)=xf_{n-1}(x)-f_{n-2}(x)$ with initial values $f_0(x)=0$ and $f_1(x)=1$. It is well known that the values of these polynomials 
 are periodic with period $6$ for $x=1$ and $x=-1.$
There are also some matrices $x$ with integer coefficients for which the sequence $f_n(x)$ is periodic. 
For example let $$x=g_k=\left(g(i,j)\right)_{i,j=0}^{k-1}$$ be the matrix with entries $g(i,j)=1$ if $|i-j|=1$ or $i=j=0$ and $g(i,j)=0$ else. 
Then the sequence $f_n(x)$ is periodic with period $2(2k+1).$
Let for example $k=2$. Here we get a sequence with period $10:$
$\left ( \begin{matrix} 0 & 0 \\ 0 & 0
 \end{matrix} \right )$, $\left ( \begin{matrix} 1 & 0 \\ 0 & 1
 \end{matrix} \right )$, $\left ( \begin{matrix} 1 & 1 \\ 1 & 0
 \end{matrix} \right )$, $\left ( \begin{matrix} 1 & 1 \\ 1 & 0
 \end{matrix} \right )$, $\left ( \begin{matrix} 1 & 0 \\ 0 & 1
 \end{matrix} \right )$, $\left ( \begin{matrix} 0 & 0 \\ 0 & 0 \end{matrix} \right )$, $\left ( \begin{matrix} -1 & 0 \\ 0 & -1
 \end{matrix} \right )$, $\left ( \begin{matrix} -1 & -1 \\ -1 & 0
 \end{matrix} \right )$, $\left ( \begin{matrix} -1 & -1 \\ -1 & 0
 \end{matrix} \right )$, $\left ( \begin{matrix} -1 & 0 \\ 0 &-1
 \end{matrix} \right )$, $\left ( \begin{matrix} 0 & 0 \\ 0 & 0 \end{matrix} \right )$
,$\dots$.
There are also some other matrices $x$ with integer coefficients such that the sequence $f_n(x)$ is periodic. I would be interested to find all such matrices with integer coefficients. Is there anything in the literature?
 A: Up to a change of basis, we can assume the matrix is in Jordan form $M = \bigoplus J_i$. It is known that for every polynomial $p$ one has
$$
p(J_i) = 
p(\begin{bmatrix}
\lambda & 1\\
& \lambda & 1\\
& & \ddots & \ddots\\
& & & \lambda & 1\\
& & & & \lambda\\
\end{bmatrix})
$$
$$
\begin{bmatrix}
p(\lambda) & p'(\lambda) & \frac{p''(\lambda)}{2} & \dots & \frac{p^{(n-1)}(\lambda)}{n!}\\
& p(\lambda) & p'(\lambda) & \dots & \frac{p^{(n-2)}(\lambda)}{(n-1)!}\\
& & \ddots & \ddots &\vdots\\
& & & p(\lambda) & p'(\lambda)\\
&&&&p(\lambda)
\end{bmatrix}.
$$
In particular, periodicity depends on periodicity of the sequence on the eigenvalues of the matrix, and on the sequence of derivatives in case there are nontrivial Jordan blocks.
So if the matrix is diagonalizable, its period is the lcm of all periods of the eigenvalues. If it has Jordan blocks, you have to work out periods of derivatives of the sequence as well.
So you can reduce your problem to a scalar one. Have you solved that completely? Do you know if there are other periodic values other than $\pm 1$ ?
