-2

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?

donguri
  • 320

1 Answers1

3

By Wilson's theorem,

$(p-1)!=(p-1)\times(p-2)\times\cdots\times\dfrac{p+1}2\times\dfrac{p-1}2\times\cdots\times2\times1\equiv-1\pmod p.$

This is $(-1)(-2)\cdots\times(-\dfrac{p-1}2)\times\dfrac{p-1}2\times\cdots\times2\times1\equiv-1\pmod p,$

and, since it is essentially given that $\dfrac{p-1}2$ is even,

we can factor out $(-1)^{\text{even}}=1$ to get $\left(1\times2\times\cdots\times\dfrac{p-1}2\right)^2\equiv-1\pmod p.$

J. W. Tanner
  • 60,406