LegendreSymbol
The Legendre symbol (n/p): whether n is a quadratic residue mod the odd prime p.
LegendreSymbol(n, p)the Legendre symbol 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