$n^k \equiv n \pmod 5 $ for all $ n\in \mathbb Z $ iff $k \equiv 1\pmod 4 $ 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.
Hint: if $n$ is a multiple of $5$, so is $n^k$. If not, try showing that $n^{k-1}\equiv 1$ mod $5$ if $k\equiv 1$ mod $4$.

Edit: missed the "iff". To show that it doesn't work if $k\not\equiv 1$ mod $4$, use the if part and $n=2$. E.g. if $k\equiv 3$ mod $4$ then $2^{k-2}\equiv 2$ so $2^k\equiv 8\not\equiv 2$.
First, let $k \equiv 1 (mod 4)$ then, $k=4m + 1$.
So, $n^k = n^{4m+1} = n^{4m} n$.
Now, we know, $n^4 \equiv 1 (mod 5)$ because, $1^4=1, 2^4=16, 3^4=81, 4^4=256, 6^4= 1296 ... 9^4=6561 $ which are all $1 (mod 5)$[EXCEPT FOR 5, and its multiples obviously].
So, $n^4 \equiv 1 (mod 5)$ and thus $n^{4m} \equiv 1(mod 5)$.
Thus, $n^k \equiv n^{4m+1} \equiv n^{4m} n \equiv 1.n \equiv n (mod 5)$.  

Similarly, you can try it out the other direction to complete the $iff$ condition.