Let $n \in\mathbb N$. Use Fermat’s little Theorem to show that if a prime $p$ divides $n^2 + 1$, then $n^{p−1} \equiv 1 \pmod p$.
So far, I have written that I need to show $n^2 \equiv -1 \pmod p$. What I have to work with is $n^2+1 = pk$ for some $k \in\mathbb Z$.
I'm not not quite sure what to do from here.
As $(n,n^2+1)=(n,n^2+1-n\cdot n)=(n,1)=1$ and $p\mid(n^2+1),(n,p)=1$
then apply the little Theorem