Show that $ i \equiv j \pmod{p-1}$ and $p\nmid n$ then $n^j \equiv n^i \pmod p$ 
Let $p$ be prime. Show that $ i \equiv j \pmod{p-1}$ and $p\nmid n$ then $n^j \equiv n^i \pmod p$

I know that $i$ and $j$ have the same remainder when divided by $p-1$, and that's pretty much it. Any hints?

Write $i = k(p-1) + j$ for some $k \in \mathbb{Z}$. Then $n^i = n^{k(p-1) + j} = (n^{p-1})^{k}\cdot n^j$. Using Fermat's little theorem, $(n^{p-1})^{k} \equiv 1$ (mod $p$), so $n^i \equiv n^j$ (mod $p$).
