Prove that a squared number is an equivalence relation of $-1\pmod{p}$.
Lets assume that $p$ is a prime number which satisfies:
$$p \,\equiv\, 1 \pmod{4}.$$
How can one find a natural number $n$, which yields:
$$n^2 \,\equiv\, -1 \pmod{p}\;?$$
Prove that a squared number is an equivalence relation of $-1\pmod{p}$.
Lets assume that $p$ is a prime number which satisfies:
$$p \,\equiv\, 1 \pmod{4}.$$
How can one find a natural number $n$, which yields:
$$n^2 \,\equiv\, -1 \pmod{p}\;?$$
Copyright © 2021 JogjaFile Inc.
First find a small non-residue, call it $c.$ When $p \equiv 5 \pmod 8$ we may choose $c=2.$ When $p \equiv 2 \pmod 3$ we may choose $c=3.$ Otherwise, one may just check small numbers in order, checking $(c|p)$ by quadratic reciprocity until we find $(c|p) = -1.$ Tests have been done on this, the first non-residue $c$ is typically tiny.
Then find $$ n \equiv c^{\frac{p-1}{4} } \pmod p . $$ When $p$ is large, we use the powermod algorithm. The result is that $$ x^2 \equiv -1 \pmod p $$
first non-residue for small primes $1 \pmod 4$
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=