Legendre Symbol
The Legendre symbol is a number theoretic function
which is defined
to be equal to
depending on whether
is a quadratic
residue modulo
. The definition is sometimes generalized
to have value 0 if
,
![]() |
(1)
|
If
is an odd prime,
then the Jacobi symbol reduces to the Legendre symbol.
The Legendre symbol is implemented in the Wolfram
Language via the Jacobi symbol, JacobiSymbol[a,
p].
The Legendre symbol obeys the identity
|
(2)
|
Particular identities include
|
(3)
| |||
|
(4)
| |||
|
(5)
| |||
|
(6)
|
(Nagell 1951, p. 144), as well as the general
|
(7)
|
when
and
are both odd
primes.
In general,
|
(8)
|
if
is an odd prime.

legendre symbol

