Let $A = \begin{pmatrix} 3&1 \\ 0&1 \end{pmatrix}$$$A = \begin{pmatrix} 3&1 \\ 0&1 \end{pmatrix}$$ and $B = \begin{pmatrix} 1&0\\ 1&2 \end{pmatrix}$.$$B = \begin{pmatrix} 1&0\\ 1&2 \end{pmatrix}$$ I want to show that the only elements of the semigroup generated by $A$ and $B$ that have integer eigenvalues are elements of the form $A^n$ and $B^n$, where $n \in \mathbb{N}$. I have tried every way that I can think of. Is it possible that a problem like this is undecidable?