A square matrix $A$ is such that $\mathrm{rank}(A^{k})=\mathrm{rank}(A^{k+1})$. Then $\mathrm{rank}(A^{k})=\mathrm{rank}(A^{k+i})$ for all $i$.
I think we prove this by induction on $i$.
Let $i = 2$. We show that rank $(A^{k})$ = rank $(A^{k+2})$.
Now, we know that rank $(A^{k+2})$ = rank $(A^{k+1}A)$ $\le$ min (rank$(A^{k+1})$, rank$(A)$) $\le$ rank $(A^{k+1})$ = rank $(A^{k})$.
However, I cannot proceed further.
so you know now that $rank (A^k)=rank (A^{k+1})=rank (A^{k+2})$. you just can take $k'=k+1$ and do the same work for $A^{k'}$. You obtain $$rank (A^k)=rank (A^{k+1})=rank (A^{k'})=rank (A^{k'+1})=rank (A^{k'+2})= rank (A^{(k+1)+2}) = rank (A^{k+3}) $$ and so on