Skip to content

LegendreSymbol

The Legendre symbol (n/p): whether n is a quadratic residue mod the odd prime p.

WikipediaLegendre symbolMathWorldLegendreSymbolWikidataQ748339Wolfram LanguageLegendreSymbol
LegendreSymbol(n, p)the Legendre symbol .

Domain: Number theory

Details
  • 1 if is a nonzero quadratic residue mod , if it is a nonresidue, 0 if .
  • Defined only for an odd prime ; compute-engine leaves the call symbolic for any other .
  • The prime case of JacobiSymbol and KroneckerSymbol — all three agree wherever the domains overlap.

Examples

See also: JacobiSymbol, KroneckerSymbol