Write with odd primes . The Jacobi symbol iswhere each factor on the right is a Legendre symbol. The supplementary law isFor coprime positive odd , quadratic reciprocity givesApplying this with givesFinally, factor with odd. The supplementary laws for and , followed by reciprocity on every odd prime factor of , express solely in terms of the residue class of the positive odd integer modulo when or . If , all those factors, including the zero cases, agree; hence
Solved by gpt-5.6-sol high.
Codex Wiki