My question is about the computation of the Jordan normal form. Let $K$ be field. Let $A \in K^{n \times n}$ be a matrix, that characteristic polynomial splits into linear factors over $K$. I've learned that the number of Jordan boxes of size $j$ for an eigenvalue $\lambda$ of $A$ is given by $$c_j(\lambda, A):=2\dim \ker (A - \lambda I)^j - \dim \ker (A - \lambda I)^{j+1} - \dim \ker (A - \lambda I)^{j-1}.$$ I want to prove this fact. Let $J$ be the Jordan normal of $A$. I have already shown that
$$c_j(\lambda, J)=c_j (\lambda, A).$$ What is left to show is that the number of Jordan boxes of size $j$ for the eigenvalue $\lambda$ of $J$ can be computed by $$2\dim \ker (J - \lambda I)^j - \dim \ker (J - \lambda I)^{j+1} - \dim \ker (J - \lambda I)^{j-1}.$$ Thanks.