# Legendre symbol

﻿
Legendre symbol

The Legendre symbol or quadratic character is a function introduced by Adrien-Marie Legendre in 1798 [A. M. Legendre "Essai sur la theorie des nombres" Paris 1798, p 186] during his partly successful attempt to prove the law of quadratic reciprocity. [Which he named.] [Stated in posthumous paper by Euler (1783), and by Legendre in 1786. First proved by Gauss in 1796, published in DA (1801); arts. 107-144 (first proof), arts 253-262 (second proof)] . The symbol has served as the prototype for innumerable [Lemmermeyer, p.xiv "even in a case as simple as biquadratic reciprocity we have to distinguish four different symbols, namely the quadratic and biquadratic residue symbols in Z [i] , the Legendre symbol in Z, and the rational quartic residue symbol in Z ... "] higher power residue symbols; other extensions and generalizations include the Jacobi symbol, the Kronecker symbol, the Hilbert symbol and the Artin symbol. It is one of the earliest examples of a homomorphism. [From Z/pZ× to C2, which is the subgroup {-1,1} of C. (log and exp are older homomorphisms)]

Definition

The Legendre symbol $\left( frac\left\{a\right\}\left\{p\right\}\right)$ (sometimes written ("a"|"p") for typographical convenience) is defined for integers "a" and positive odd primes "p" by (assuming the gcd of a and p is 1):

:

If ("a"|"p") = 1, "a" is called a quadratic residue (mod "p"); if ("a"|"p") = −1, "a" is called a quadratic nonresidue (mod p).
It is usual to treat zero as a special case.

The periodic sequence ("a"|"p") for "a" equal to 0,1,2,... is sometimes called the Legendre sequence, sometimes with {0,1,-1} values replaced by {1,0,1} or {0,1,0}, respectively.Jeong-Heon Kim and Hong-Yeop Song, "Trace Representation of Legendre Sequences," "Designs, Codes, and Cryptography" 24, p. 343–348 (2001).]

Formulas for the Legendre symbol

Legendre originally "defined" his symbol (for "a" relatively prime to "p") as [Lemmermeyer p. 8]

:$left\left(frac\left\{a\right\}\left\{p\right\} ight\right) =pm1equiv a^\left\{\left(p-1\right)/2\right\}pmod p.$

Euler had earlier proved that this expression is ≡ 1 (mod "p") if "a" is a quadratic residue (mod "p") and that it is ≡ −1 if "a" is a quadratic nonresidue; this equivalence is now known as Euler's criterion.

In addition to this fundamental formula, there are many other expressions for ("a"|"p"), most of which are used in proofs of quadratic reciprocity.

Gauss proved [Gauss, "Summierung gewisser Reihen von besonderer Art" (1811), reprinted in "Untersuchungen ..." pp. 463-495. Crandall & Pomerance p. 92] that if $zeta = e^frac\left\{2pi i\right\}\left\{p\right\}$ then

:$left\left(frac\left\{a\right\}\left\{p\right\} ight\right)$

=frac{1+zeta^{a}+zeta^{4a}+zeta^{9a}+dots+zeta^{(p-1)^2a{1+zeta+zeta^{4}+zeta^{9}+dots+zeta^{(p-1)^2

=frac{2(1+zeta^{a}+zeta^{4a}+zeta^{9a}+dots+zeta^{(p-1)^2a})}{sqrt p(1+i)(1+(-i)^p)}.

This is the basis for his fourth [Gauss, "Summierung gewisser Reihen von besonderer Art" (1811), reprinted in "Untersuchungen ..." pp. 463-495] and sixth [Gauss, "Neue Beweise und Erweiterungen des Fundamentalsatzes in der Lehre von den quadritischen Resten" (1818) reprinted in "Untersuchungen ..." pp. 501-505] , and for many [Scattered throughout the first 4 chapters of Lemmermeyer] subsequent, proofs of quadratic reciprocity. See Gauss sum.

Kronecker's proof [Lemmermeyer, ex. p. 31, 1.34] is to establish that:$left\left(frac\left\{p\right\}\left\{q\right\} ight\right)=sgnprod_\left\{i=1\right\}^\left\{frac\left\{q-1\right\}\left\{2prod_\left\{k=1\right\}^\left\{frac\left\{p-1\right\}\left\{2left\left(frac\left\{k\right\}\left\{p\right\}-frac\left\{i\right\}\left\{q\right\} ight\right)$and then switch "p" and "q".

One of Eisenstein's proofs [Lemmermeyer, pp. 236 ff.] begins by showing:$left\left(frac\left\{q\right\}\left\{p\right\} ight\right)=prod_\left\{n=1\right\}^\left\{frac\left\{p-1\right\}\left\{2 frac\left\{sin \left(frac\left\{2pi\right\}\left\{p\right\}qn\right)\right\}\left\{sin\left(frac\left\{2pi\right\}\left\{p\right\}n\right)\right\}.$

Using elliptic functions instead of the sine, he was able to prove cubic and quartic reciprocity as well.

Other formulas involving the Legendre symbol

The Fibonacci numbers 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ... are defined by the recurrence F1 = F2 = 1, Fn+1 = Fn + Fn-1.

If "p" is a prime number then

:$F_\left\{p-left\left(frac\left\{p\right\}\left\{5\right\} ight\right)\right\} equiv 0 pmod p,;;;F_\left\{p\right\} equiv left\left(frac\left\{p\right\}\left\{5\right\} ight\right) pmod p.$

For example,

:$\left( frac\left\{2\right\}\left\{5\right\}\right) = -1, ,, F_3 = 2, F_2=1,$ :$\left( frac\left\{3\right\}\left\{5\right\}\right) = -1, ,, F_4 = 3,F_3=2,$ :$\left( frac\left\{5\right\}\left\{5\right\}\right) = ;;,0,,, F_5 = 5,$ :$\left( frac\left\{7\right\}\left\{5\right\}\right) = -1, ,,F_8 = 21,;;F_7=13,$ :$\left( frac\left\{11\right\}\left\{5\right\}\right) = +1, F_\left\{10\right\} = 55, F_\left\{11\right\}=89.$

This result comes from the theory of Lucas sequences, which are used in primality testing. [Ribenboim, p. 64; Lemmermeyer, ex 2.25-2.28, pp. 73-74.] See Wall-Sun-Sun prime.

Properties of the Legendre symbol

There are a number of useful properties of the Legendre symbol which can be used to speed up calculations. They include:

#$left\left(frac\left\{ab\right\}\left\{p\right\} ight\right) = left\left(frac\left\{a\right\}\left\{p\right\} ight\right)left\left(frac\left\{b\right\}\left\{p\right\} ight\right)$ (It is a completely multiplicative function in its top argument. This property can be understood to mean: the product of two residues or non-residues is a residue, whereas the product of a residue with a non-residue is a non-residue.)

#If "a" ≡ "b" (mod "p"), then $left\left(frac\left\{a\right\}\left\{p\right\} ight\right) = left\left(frac\left\{b\right\}\left\{p\right\} ight\right)$

#$left\left(frac\left\{a^2\right\}\left\{p\right\} ight\right) = 1$

#

This is called the first supplement to the law of quadratic reciprocity.

#

This is called the second supplement to the law of quadratic reciprocity. The general law of quadratic reciprocity is

#If "p" and "q" are odd primes then $left\left(frac\left\{q\right\}\left\{p\right\} ight\right) = left\left(frac\left\{p\right\}\left\{q\right\} ight\right)\left(-1\right)^\left\{ frac\left\{p-1\right\}\left\{2\right\} frac\left\{q-1\right\}\left\{2\right\} \right\}.$

There are special formulas for some small values of "p":

#For an odd prime "p",

#For an odd prime "p",

but in general it is simpler to list the residues and non-residues

#For an odd prime "p",

The Legendre symbol ("a"|"p") is a Dirichlet character (mod "p").

Computational example

The above properties, including the law of quadratic reciprocity, can be used to evaluate any Legendre symbol. For example:

:$left \left( frac\left\{12345\right\}\left\{331\right\} ight \right)$

:$=left \left( frac\left\{3\right\}\left\{331\right\} ight \right) left \left( frac\left\{5\right\}\left\{331\right\} ight \right) left \left( frac\left\{823\right\}\left\{331\right\} ight \right)$

:$=left \left( frac\left\{3\right\}\left\{331\right\} ight \right) left \left( frac\left\{5\right\}\left\{331\right\} ight \right) left \left( frac\left\{161\right\}\left\{331\right\} ight \right)$

:$=left \left( frac\left\{3\right\}\left\{331\right\} ight \right) left \left( frac\left\{5\right\}\left\{331\right\} ight \right) left \left( frac\left\{7\right\}\left\{331\right\} ight \right) left \left( frac\left\{23\right\}\left\{331\right\} ight \right)$

:$= \left(-1\right) left \left( frac\left\{331\right\}\left\{3\right\} ight \right) left \left( frac\left\{331\right\}\left\{5\right\} ight \right) \left(-1\right) left \left( frac\left\{331\right\}\left\{7\right\} ight \right) \left(-1\right) left \left( frac\left\{331\right\}\left\{23\right\} ight \right)$

:$=-left \left( frac\left\{1\right\}\left\{3\right\} ight \right) left \left( frac\left\{1\right\}\left\{5\right\} ight \right) left \left( frac\left\{2\right\}\left\{7\right\} ight \right) left \left( frac\left\{9\right\}\left\{23\right\} ight \right)$

:$=-left \left( frac\left\{1\right\}\left\{3\right\} ight \right) left \left( frac\left\{1\right\}\left\{5\right\} ight \right) left \left( frac\left\{2\right\}\left\{7\right\} ight \right) left \left( frac\left\{3\right\}\left\{23\right\} ight \right)^2$

:$= - left \left(1 ight \right) left \left(1 ight \right) left \left(1 ight \right) left \left(1 ight \right) = -1.$

The article Jacobi symbol has more examples of Legendre symbol manipulation.

Related functions

*The Jacobi symbol is a generalization of the Legendre symbol that allows composite bottom numbers, although the bottom number must still be odd and positive. This generalization provides an efficient way to compute all Legendre symbols.
*A further generalization is the Kronecker symbol, which extends the bottom numbers to all integers.

Notes

References

*citation
last1 = Gauss | first1 = Carl Friedrich
last2 = Maser | first2 = H. (translator into German)
title = Untersuchungen uber hohere Arithmetik (Disquisitiones Arithmeticae & other papers on number theory) (Second edition)
publisher = Chelsea
location = New York
date = 1965
isbn = 0-8284-0191-8

*citation
last1 = Gauss | first1 = Carl Friedrich
last2 = Clarke | first2 = Arthur A. (translator into English)
title = Disquisitiones Arithmeticae (Second, corrected edition)
publisher = Springer
location = New York
date = 1986
isbn = 0387962549

*citation
last1 = Bach | first1 = Eric
last2 = Shallit | first2 = Jeffrey
title = Algorithmic Number Theory (Vol I: Efficient Algorithms)
publisher = The MIT Press
location = Cambridge
date = 1966
isbn = 0-262-02045-5

*citation
last1 = Lemmermeyer | first1 = Franz
title = Reciprocity Laws: from Euler to Eisenstein
publisher = Springer
location = Berlin
date = 2000
isbn = 3-540-66967-4

*citation
last1 = Ireland | first1 = Kenneth
last2 = Rosen | first2 = Michael
title = A Classical Introduction to Modern Number Theory (Second edition)
publisher = Springer
location = New York
date = 1990
isbn = 0-387-97329-X

*citation
last1 = Ribenboim | first1 = Paulo
title = The New Book of Prime Number Records
publisher = Springer
location = New York
date = 1996
isbn = 0-387-94457-5

* [http://www.math.fau.edu/richman/jacobi.htm Jacobi symbol calculator]

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• Legendre-Symbol — Das Legendre Symbol ist eine Kurzschreibweise, die in der Zahlentheorie, einem Teilgebiet der Mathematik, verwendet wird. Es ist nach dem französischen Mathematiker Adrien Marie Legendre benannt und wird wie folgt notiert: Diese drei Notationen… …   Deutsch Wikipedia

• Legendre symbol — noun Mathematical function of an integer and a prime, written , indicating whether a is a square modulo p …   Wiktionary

• Jacobi symbol — The Jacobi symbol is a generalization of the Legendre symbol introduced by Jacobi in 1837 [C.G.J.Jacobi Uber die Kreisteilung und ihre Anwendung auf die Zahlentheorie , Bericht Ak. Wiss. Berlin (1837) pp 127 136] . It is of theoretical interest… …   Wikipedia

• Jacobi-Symbol — Das Jacobi Symbol, benannt nach Carl Gustav Jacob Jacobi, ist eine Verallgemeinerung des Legendre Symbols. Das Jacobi Symbol kann wiederum zum Kronecker Symbol verallgemeinert werden. Die Notation ist die gleiche wie die des Legendre Symbols:… …   Deutsch Wikipedia

• Adrien Marie Legendre — [ləˈʒɑ̃ːdrə] (* 18. September 1752 in Paris; † 10. Januar 1833 ebenda) war ein französischer Mathematiker. Inhaltsverzeichnis 1 Leben 2 Werk 3 Sonstiges …   Deutsch Wikipedia

• Adrien-Marie Legendre — Infobox Scientist name = Adrien Marie Legendre caption = Adrien Marie Legendre birth date = birth date|1752|9|18|mf=y birth place = Paris, France death date = death date and age|1833|1|10|1752|9|18|mf=y death place = Paris, France residence =… …   Wikipedia

• Adrien-Marie Legendre — Karikatur Legendres des französischen Künstlers Julien Leopold Boilly Adrien Marie Legendre [ləˈʒɑ̃ːdrə] (* 18. September 1752 in Paris; † 10. Januar 1833 ebenda) war ein französischer Mathematiker. Inhaltsverzeichnis …   Deutsch Wikipedia

• Kronecker symbol — Note: You might be looking for the Kronecker delta. In number theory, the Kronecker symbol is a generalization of the Jacobi symbol to all integers. Let n be an integer, with prime factorization :u cdot {p 1}^{e 1} cdots {p k}^{e k},where u is a… …   Wikipedia

• 26950 Legendre — Infobox Planet minorplanet = yes width = 25em bgcolour = #FFFFC0 apsis = name = Legendre symbol = caption = discovery = yes discovery ref = discoverer = P. G. Comba discovery site = Prescott discovered = May 11, 1997 designations = yes mp name =… …   Wikipedia

• Símbolo de Legendre — El símbolo de Legendre, , es una función multiplicativa utilizada en teoría de números que toma como argumentos un entero a y un primo p y devuelve uno de los valores 1, 1, ó 0 dependiendo de si a es o no residuo cuadrático módulo p, es decir de… …   Wikipedia Español