Let A be a square matrix of size n with real entries, $n \geq 2$, with $A = A^{p+1}$, $p \geq 2 $, then $$rank(A) + rank (I_n - A^p) = n$$
If p is prime, in addition, $$rank (I_n - A)=rank (I_n - A^2)=rank (I_n - A^3)=...=rank (I_n - A^{p-1})$$
I've tried using Sylvester: $rank(A) + rank (I_n - A^p) \leq n$, since $rank(A(I_n - A^p))=0$. I am guessing the next step is using Frobenius and obtaining something that looks like $rank(A) + rank (I_n - A^p) \geq n$. Since $A$ contains real entries, $det(A)=0 $ or $det(A)=1$.
Factoring $(I_n - A^p)=(I_n - A)(I_n + A + A^2 + .... + A^{p-1})$ might be of help. Also, if you know a course or book which contains more problems like these, I would love it if you suggest me a material which contains exercises alike.