I am currently studying number theory and its basic topics, and I came across this problem.
Wilson's Theorem states that if $p$ is prime, then $(p-1)!\equiv -1 \pmod{p}$.
If $p \equiv 1 \pmod{4}$ is prime, then use Wilson's Theorem to find a number $n$ so that $n^2 \equiv -1 \pmod{p}$.
I tried to substitute $p$ with $4k+1$, but I didn't get much far. I don't have any other ideas for tackling this problem. Any, hopefully elementary, solutions?