Let $k \in \mathbb N $ .Prove that $n^k \equiv n $ ( mod $5$ ) for all $ n\in \mathbb Z $ iff $k \equiv 1$ ( mod $4$ )
I was trying to solve this using the corollary of Fermat's little theorem , i.e $n^p \equiv n$ ( mod $p$) for all $n \in \mathbb Z $ , but I got stuck. Need some help.