Section 16.6 Introducing the Legendre Symbol
Consider the lowly notion of congruence, along with its symbolIn our modern terms, Legendre takes advantage of the fact that⦠more than a notational convenience ⦠Legendre reifies this concept, and makes it into an object of independent study.
βSteven H. Weintraub
Definition 16.6.1.
We write
We define the Legendre symbol of
Example 16.6.2.
We can now restate the main content of Fact 16.1.2: For odd
Example 16.6.3.
We can also restate Example 16.5.4 as
xxxxxxxxxx
legendre_symbol(-2,11)
xxxxxxxxxx
def _(p=(17,prime_range(50))):
for n in [q for q in quadratic_residues(p) if q != 0]:
pretty_print(html(r"$%s$ is a QR of $%s$ and $\left(\frac{%s}{%s}\right)=%s$"%(n, p, n,p, legendre_symbol(n,p))))
Remark 16.6.4.
A brief note is in order regarding the special status of zero in Definition 16.3.1, especially since Sage includes zero as a QR.
First, this recognizes the special case that only
A deeper reason is that this status allows us to conveniently ignore the only integer from
xxxxxxxxxx
def _(p=(19,prime_range(100)[1:])):
L = [legendre_symbol(a,p) for a in [0..p-1]]
pretty_print(html(r"All Legendre symbols $\left(\frac{a}{%s}\right)$ can be listed:"%p))
print(L)
pretty_print(html("And they sum up to $%s$"%sum(L)))