What's New
About the Project
NIST
27 Functions of Number TheoryMultiplicative Number Theory

§27.9 Quadratic Characters

For an odd prime p, the Legendre symbol (n|p) is defined as follows. If p divides n, then the value of (n|p) is 0. If p does not divide n, then (n|p) has the value 1 when the quadratic congruence x2n(modp) has a solution, and the value -1 when this congruence has no solution. The Legendre symbol (n|p), as a function of n, is a Dirichlet character (mod p). It is sometimes written as (np). Special values include:

27.9.1 (-1|p) =(-1)(p-1)/2,
27.9.2 (2|p) =(-1)(p2-1)/8.

If p,q are distinct odd primes, then the quadratic reciprocity law states that

27.9.3 (p|q)(q|p)=(-1)(p-1)(q-1)/4.

If an odd integer P has prime factorization P=r=1ν(n)prar, then the Jacobi symbol (n|P) is defined by (n|P)=r=1ν(n)(n|pr)ar, with (n|1)=1. The Jacobi symbol (n|P) is a Dirichlet character (mod P). Both (27.9.1) and (27.9.2) are valid with p replaced by P; the reciprocity law (27.9.3) holds if p,q are replaced by any two relatively prime odd integers P,Q.