HOME

TheInfoList



OR:

In
number theory Number theory (or arithmetic or higher arithmetic in older usage) is a branch of pure mathematics devoted primarily to the study of the integers and integer-valued functions. German mathematician Carl Friedrich Gauss (1777–1855) said, "Math ...
, the Legendre symbol is a
multiplicative function In number theory, a multiplicative function is an arithmetic function ''f''(''n'') of a positive integer ''n'' with the property that ''f''(1) = 1 and f(ab) = f(a)f(b) whenever ''a'' and ''b'' are coprime. An arithmetic function ''f''(''n'') ...
with values 1, −1, 0 that is a quadratic character modulo an odd
prime number A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only way ...
''p'': its value at a (nonzero)
quadratic residue In number theory, an integer ''q'' is called a quadratic residue modulo ''n'' if it is congruent to a perfect square modulo ''n''; i.e., if there exists an integer ''x'' such that: :x^2\equiv q \pmod. Otherwise, ''q'' is called a quadratic non ...
mod ''p'' is 1 and at a non-quadratic residue (''non-residue'') is −1. Its value at zero is 0. The Legendre symbol was introduced by
Adrien-Marie Legendre Adrien-Marie Legendre (; ; 18 September 1752 – 9 January 1833) was a French mathematician who made numerous contributions to mathematics. Well-known and important concepts such as the Legendre polynomials and Legendre transformation are nam ...
in 1798 in the course of his attempts at proving the law of quadratic reciprocity. Generalizations of the symbol include the
Jacobi symbol Jacobi symbol for various ''k'' (along top) and ''n'' (along left side). Only are shown, since due to rule (2) below any other ''k'' can be reduced modulo ''n''. Quadratic residues are highlighted in yellow — note that no entry with a J ...
and
Dirichlet character In analytic number theory and related branches of mathematics, a complex-valued arithmetic function \chi:\mathbb\rightarrow\mathbb is a Dirichlet character of modulus m (where m is a positive integer) if for all integers a and b: :1)   \c ...
s of higher order. The notational convenience of the Legendre symbol inspired introduction of several other "symbols" used in algebraic number theory, such as the
Hilbert symbol In mathematics, the Hilbert symbol or norm-residue symbol is a function (–, –) from ''K''× × ''K''× to the group of ''n''th roots of unity in a local field ''K'' such as the fields of reals or p-adic numbers . It is related to reciprocity ...
and the Artin symbol.


Definition

Let p be an odd
prime number A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only way ...
. An integer a is a
quadratic residue In number theory, an integer ''q'' is called a quadratic residue modulo ''n'' if it is congruent to a perfect square modulo ''n''; i.e., if there exists an integer ''x'' such that: :x^2\equiv q \pmod. Otherwise, ''q'' is called a quadratic non ...
modulo p if it is congruent to a
perfect square ''Perfect Square'' is a 2004 concert film of the alternative rock Musical ensemble, band R.E.M. (band), R.E.M., filmed on July 19, 2003, at the bowling green, Bowling Green in Wiesbaden, Germany. It was released by Warner Reprise Video on March 9, ...
modulo p and is a quadratic nonresidue modulo p otherwise. The Legendre symbol is a function of a and p defined as :\left(\frac\right) = \begin 1 & \text a \text p \text a \not\equiv 0\pmod p, \\ -1 & \text a \text p, \\ 0 & \text a \equiv 0 \pmod p. \end Legendre's original definition was by means of the explicit formula : \left(\frac\right) \equiv a^ \pmod p \quad \text \quad\left(\frac\right) \in \. By
Euler's criterion In number theory, Euler's criterion is a formula for determining whether an integer is a quadratic residue modulo a prime. Precisely, Let ''p'' be an odd prime and ''a'' be an integer coprime to ''p''. Then : a^ \equiv \begin \;\;\,1\pmod& \tex ...
, which had been discovered earlier and was known to Legendre, these two definitions are equivalent. Thus Legendre's contribution lay in introducing a convenient ''notation'' that recorded quadratic residuosity of ''a'' mod ''p''. For the sake of comparison,
Gauss Johann Carl Friedrich Gauss (; german: Gauß ; la, Carolus Fridericus Gauss; 30 April 177723 February 1855) was a German mathematician and physicist who made significant contributions to many fields in mathematics and science. Sometimes refer ...
used the notation ''a''R''p'', ''a''N''p'' according to whether ''a'' is a residue or a non-residue modulo ''p''. For typographical convenience, the Legendre symbol is sometimes written as (''a'' ,  ''p'') or (''a''/''p''). For fixed ''p'', the sequence \left(\tfrac\right),\left(\tfrac\right),\left(\tfrac\right),\ldots is periodic with period ''p'' and is sometimes called the Legendre sequence. Each row in the following table exhibits periodicity, just as described.


Table of values

The following is a table of values of Legendre symbol \left(\frac\right) with ''p'' ≤ 127, ''a'' ≤ 30, ''p'' odd prime.


Properties of the Legendre symbol

There are a number of useful properties of the Legendre symbol which, together with the law of
quadratic reciprocity In number theory, the law of quadratic reciprocity is a theorem about modular arithmetic that gives conditions for the solvability of quadratic equations modulo prime numbers. Due to its subtlety, it has many formulations, but the most standard s ...
, can be used to compute it efficiently. * Given a generator g \in \mathbb_p^*, if x = g^r, then x is a quadratic residue if and only if r is even. This shows that half of the nonzero elements in \mathbb_p^* are quadratic residues. * If p \equiv 3 \text 4 then the fact that *: \frac + \frac = \frac gives us that a = x^ is the square root of the quadratic residue x. * The Legendre symbol is periodic in its first (or top) argument: if ''a'' ≡ ''b'' (mod ''p''), then *: \left(\frac\right) = \left(\frac\right). * The Legendre symbol is a completely multiplicative function of its top argument: *:\left(\frac\right) = \left(\frac\right)\left(\frac\right). * In particular, the product of two numbers that are both quadratic residues or quadratic non-residues modulo ''p'' is a residue, whereas the product of a residue with a non-residue is a non-residue. A special case is the Legendre symbol of a square: *:\left(\frac\right) = \begin 1 & \mboxp\nmid x\\ 0 & \mboxp\mid x. \end * When viewed as a function of ''a'', the Legendre symbol \left(\frac\right) is the unique quadratic (or order 2)
Dirichlet character In analytic number theory and related branches of mathematics, a complex-valued arithmetic function \chi:\mathbb\rightarrow\mathbb is a Dirichlet character of modulus m (where m is a positive integer) if for all integers a and b: :1)   \c ...
modulo ''p''. * The first supplement to the law of quadratic reciprocity: *:\left(\frac\right) = (-1)^ = \begin 1 & \mboxp \equiv 1\pmod \\ -1 & \mboxp \equiv 3\pmod. \end * The second supplement to the law of quadratic reciprocity: *: \left(\frac\right) = (-1)^\tfrac = \begin 1 & \mboxp \equiv 1\mbox7 \pmod \\ -1 & \mboxp \equiv 3\mbox5 \pmod. \end * Special formulas for the Legendre symbol \left(\frac\right) for small values of ''a'': ** For an odd prime ''p'' ≠ 3, **: \left(\frac\right) = (-1)^ = \begin 1 & \mboxp \equiv 1\mbox11 \pmod \\ -1 & \mboxp \equiv 5\mbox7 \pmod. \end ** For an odd prime ''p'' ≠ 5, **: \left(\frac\right) =(-1)^ = \begin 1 & \mboxp \equiv 1\mbox4 \pmod5 \\ -1 & \mboxp \equiv 2\mbox3 \pmod5. \end * The
Fibonacci numbers In mathematics, the Fibonacci numbers, commonly denoted , form a sequence, the Fibonacci sequence, in which each number is the sum of the two preceding ones. The sequence commonly starts from 0 and 1, although some authors start the sequence from ...
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, … are defined by the recurrence If ''p'' is a prime number then *: F_ \equiv 0 \pmod p, \qquad F_ \equiv \left(\frac\right) \pmod p. :For example, ::\begin \left(\tfrac\right) &= -1, & F_3 &= 2, & F_2 &= 1, \\ \left(\tfrac\right) &= -1, & F_4 &= 3, & F_3 &= 2, \\ \left(\tfrac\right) &= 0, & F_5 &= 5, & & \\ \left(\tfrac\right) &= -1, & F_8 &= 21, & F_7 &= 13, \\ \left(\tfrac\right) &= 1, & F_ &= 55, & F_ &= 89. \end *This result comes from the theory of
Lucas sequence In mathematics, the Lucas sequences U_n(P,Q) and V_n(P, Q) are certain constant-recursive integer sequences that satisfy the recurrence relation : x_n = P \cdot x_ - Q \cdot x_ where P and Q are fixed integers. Any sequence satisfying this r ...
s, which are used in
primality testing A primality test is an algorithm for determining whether an input number is prime. Among other fields of mathematics, it is used for cryptography. Unlike integer factorization, primality tests do not generally give prime factors, only stating wheth ...
. See Wall–Sun–Sun prime.


Legendre symbol and quadratic reciprocity

Let ''p'' and ''q'' be distinct odd primes. Using the Legendre symbol, the
quadratic reciprocity In number theory, the law of quadratic reciprocity is a theorem about modular arithmetic that gives conditions for the solvability of quadratic equations modulo prime numbers. Due to its subtlety, it has many formulations, but the most standard s ...
law can be stated concisely: : \left(\frac\right)\left(\frac\right) = (-1)^. Many
proofs of quadratic reciprocity In number theory, the law of quadratic reciprocity, like the Pythagorean theorem, has lent itself to an unusually large number of proofs. Several hundred proofs of the law of quadratic reciprocity have been published. Proof synopsis Of the element ...
are based on
Euler's criterion In number theory, Euler's criterion is a formula for determining whether an integer is a quadratic residue modulo a prime. Precisely, Let ''p'' be an odd prime and ''a'' be an integer coprime to ''p''. Then : a^ \equiv \begin \;\;\,1\pmod& \tex ...
:\left(\frac\right) \equiv a^ \pmod p. In addition, several alternative expressions for the Legendre symbol were devised in order to produce various proofs of the quadratic reciprocity law. * Gauss introduced the quadratic Gauss sum and used the formula ::\sum_^\zeta^=\left(\frac\right)\sum_^\zeta^,\qquad \zeta = e^ :in his fourth and sixth proofs of quadratic reciprocity. * Kronecker's proof first establishes that ::\left(\frac\right) =\sgn\left(\prod_^\prod_^\left(\frac-\frac\right)\right). : Reversing the roles of ''p'' and ''q'', he obtains the relation between () and (). * One of Eisenstein's proofsLemmermeyer, pp. 236 ff. begins by showing that ::\left(\frac\right) =\prod_^ \frac. : Using certain elliptic functions instead of the
sine function In mathematics, sine and cosine are trigonometric functions of an angle. The sine and cosine of an acute angle are defined in the context of a right triangle: for the specified angle, its sine is the ratio of the length of the side that is ...
, Eisenstein was able to prove
cubic Cubic may refer to: Science and mathematics * Cube (algebra), "cubic" measurement * Cube, a three-dimensional solid object bounded by six square faces, facets or sides, with three meeting at each vertex ** Cubic crystal system, a crystal system w ...
and
quartic reciprocity Quartic or biquadratic reciprocity is a collection of theorems in elementary and algebraic number theory that state conditions under which the congruence ''x''4 ≡ ''p'' (mod ''q'') is solvable; the word "reciprocity" comes from the form ...
as well.


Related functions

* The
Jacobi symbol Jacobi symbol for various ''k'' (along top) and ''n'' (along left side). Only are shown, since due to rule (2) below any other ''k'' can be reduced modulo ''n''. Quadratic residues are highlighted in yellow — note that no entry with a J ...
() is a generalization of the Legendre symbol that allows for a composite second (bottom) argument ''n'', although ''n'' must still be odd and positive. This generalization provides an efficient way to compute all Legendre symbols without performing factorization along the way. * A further extension is the Kronecker symbol, in which the bottom argument may be any integer. * The power residue symbol () generalizes the Legendre symbol to higher power ''n''. The Legendre symbol represents the power residue symbol for ''n'' = 2.


Computational example

The above properties, including the law of quadratic reciprocity, can be used to evaluate any Legendre symbol. For example: :\begin \left ( \frac\right )&=\left ( \frac\right ) \left ( \frac\right ) \left ( \frac\right ) \\ &= \left ( \frac\right ) \left ( \frac\right ) \left ( \frac\right ) \\ &= \left ( \frac\right ) \left ( \frac\right ) \left ( \frac\right ) \left ( \frac\right ) \\ &= (-1)\left (\frac\right) \left(\frac\right) (-1) \left(\frac\right) (-1)\left (\frac\right ) \\ &= -\left ( \frac\right ) \left ( \frac\right ) \left ( \frac\right ) \left ( \frac\right )\\ &= -\left ( \frac\right ) \left ( \frac\right ) \left ( \frac\right ) \left ( \frac\right )\\ &= -(1) (1) (1) (1) \\ &= -1. \end Or using a more efficient computation: :\left ( \frac\right )=\left ( \frac\right )=\left ( \frac\right )=\left ( \frac\right )=(-1)^\tfrac=-1. The article
Jacobi symbol Jacobi symbol for various ''k'' (along top) and ''n'' (along left side). Only are shown, since due to rule (2) below any other ''k'' can be reduced modulo ''n''. Quadratic residues are highlighted in yellow — note that no entry with a J ...
has more examples of Legendre symbol manipulation. Since no efficient
factorization In mathematics, factorization (or factorisation, see English spelling differences) or factoring consists of writing a number or another mathematical object as a product of several ''factors'', usually smaller or simpler objects of the same kind ...
algorithm is known, but efficient modular exponentiation algorithms are, in general it is more efficient to use Legendre's original definition, e.g. :\begin \left(\frac\right) &\equiv 98^ &\pmod \\ &\equiv 98^ &\pmod \\ &\equiv 98 \cdot (98^2)^ &\pmod \\ &\equiv 98 \cdot 5^ &\pmod \\ &\equiv 98 \cdot 25^ &\pmod \\ &\equiv 133 \cdot 25^ &\pmod \\ &\equiv 133 \cdot 294^ &\pmod \\ &\equiv 133 \cdot 45^ &\pmod \\ &\equiv 133 \cdot 39^5 &\pmod \\ &\equiv 222 \cdot 39^4 &\pmod \\ &\equiv 222 \cdot 197^2 &\pmod \\ &\equiv 222 \cdot 82 &\pmod \\ &\equiv -1 &\pmod \end using repeated squaring modulo 331, reducing every value using the modulus after every operation to avoid computation with large integers.


Notes


References

* * * * * * *{{citation , last1 = Ribenboim , first1 = Paulo , title = The New Book of Prime Number Records , publisher =
Springer Springer or springers may refer to: Publishers * Springer Science+Business Media, aka Springer International Publishing, a worldwide publishing group founded in 1842 in Germany formerly known as Springer-Verlag. ** Springer Nature, a multinationa ...
, location = New York , year = 1996 , isbn = 0-387-94457-5


External links


Jacobi symbol calculator
Modular arithmetic Quadratic residue