values of the Legendre symbol

For an integer a and an odd prime p, let (ap) be the Legendre symbolDlmfMathworldPlanetmath.


Let p be an odd prime. The Legendre symbol takes the following values:

  1. 1.
    (-1p)={1if p1mod4-1if p3mod4.
  2. 2.
    (2p)={1if p±1mod8-1if p3,5mod8.
  3. 3.
    (3p)={1if p±1mod12-1otherwise.
  4. 4.
    (5p)={1if p±1mod5-1if p2,3mod5.

For a proof of (1), see entry. Part (2) is proved in entry. For parts (3), (4) and (5), we use quadratic reciprocity. For example,


and the only quadratic residuesMathworldPlanetmath modulo 5 are ±1mod5. ∎

Title values of the Legendre symbol
Canonical name ValuesOfTheLegendreSymbol
Date of creation 2013-03-22 16:18:13
Last modified on 2013-03-22 16:18:13
Owner alozano (2414)
Last modified by alozano (2414)
Numerical id 5
Author alozano (2414)
Entry type Theorem
Classification msc 11-00
Related topic 1IsQuadraticResidueIfAndOnlyIfPequiv1Mod4
Related topic QuadraticCharacterOf2