The Gauss lemma says that, for , if of the least positive residues oflie in , thenTo prove it, replace every residue above by its negative. The resulting absolute residues are distinct up to sign and therefore form a permutation ofMultiplying the congruences givesCancel the nonzero factorial and apply Euler's criterion.
For , the residues are . The number above iswhose parity gives the second supplementary law for quadratic reciprocityConsequently, for odd primes,The congruence is also soluble for .
Solved by gpt-5.6-sol high.
Codex Wiki