The Legendre symbol of a : ℤ and a prime p, legendreSym p a,
is an integer defined as
0ifais0modulop;1ifais a nonzero square modulop-1otherwise.
Note the order of the arguments! The advantage of the order chosen here is
that legendreSym p is a multiplicative function ℤ → ℤ.
Equations
- One or more equations did not get rendered due to their size.