I'm stuck on a question about diagonalizability of matrices and need some help moving forward.I think I made some progress but I'm also not sure if its any good. Let $a \in \mathbb{R}$, $A$ is a matrix. For which values of $a$ is the matrix $A$ diagonalizable. $$A:= \begin{pmatrix} 1 & 2 & 3 & 4\\ 0 & 2 & a & 5\\ 0 & 0 & 2 & 6\\ 0 & 0 & 0 & 7 \\ \end{pmatrix} \in \mathbb{R^{4\times4}}$$ Firstly, if I'm not mistaken, any matrix whose charachteristic polynomial is a product of distinct linear factors can be diagonalized. So I simply tried to find the characteristic polynomial first.
$$ p_A(x)= \det(xE_n-A)=\det \begin{pmatrix} x-1 & -2 & -3 & -4\\ 0 & x-2 & -a & -5\\ 0 & 0 & x-2 & -6\\ 0 & 0 & 0 & x-7 \\ \end{pmatrix}= (x-2) \times \det \begin{pmatrix} -2 & -a & -5 \\ x-2 & x-2 & -6 \\ 0 & 0 & x-7 \\ \end{pmatrix}.$$ $$ (x-2) \times \det \begin{pmatrix} -2 & -a & -5 \\ x-2 & x-2 & -6 \\ 0 & 0 & x-7 \\ \end{pmatrix}=-a^2 x^3 + 2 a^2 x^2 - 9 a x^2 + 32 a x - 28 a - 2 x^3 + 23 x^2 - 66 x + 56.$$ Unless there is an error, this should be the characteristic polynomial. From here I just checked some simple cases like what if $a=0,a=1,a=2$ and found that if $a=2$ then $p_A(x)=-6x^3+13x^2-2x=(-x)(x-2)(6x-1).$ From here however I don't know how to generalize this for any other $a$ or if there is a way to check whether this is the only possible value for $a$.