In
number theory
Number theory is a branch of pure mathematics devoted primarily to the study of the integers and arithmetic functions. Number theorists study prime numbers as well as the properties of mathematical objects constructed from integers (for example ...
, the Legendre symbol is a
multiplicative function
In number theory, a multiplicative function is an arithmetic function f 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 is said to be completely multiplicative (o ...
with values 1, −1, 0 that is a quadratic character
modulo
In computing and mathematics, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another, the latter being called the '' modulus'' of the operation.
Given two positive numbers and , mo ...
of an odd
prime number
A prime number (or a prime) is a natural number greater than 1 that is not a Product (mathematics), 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 ...
''p'': its value at a (nonzero)
quadratic residue
In number theory, an integer ''q'' is a quadratic residue modulo operation, modulo ''n'' if it is Congruence relation, congruent to a Square number, perfect square modulo ''n''; that is, if there exists an integer ''x'' such that
:x^2\equiv q \pm ...
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 people, French mathematician who made numerous contributions to mathematics. Well-known and important concepts such as the Legendre polynomials and Legendre transforma ...
in 1797 or 1798 in the course of his attempts at proving 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 st ...
. 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 ...
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:
# \chi(ab) = \ch ...
s of higher order. The notational convenience of the Legendre symbol inspired introduction of several other "symbols" used in
algebraic number theory
Algebraic number theory is a branch of number theory that uses the techniques of abstract algebra to study the integers, rational numbers, and their generalizations. Number-theoretic questions are expressed in terms of properties of algebraic ob ...
, 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 real number, reals or p-adic numbers. It is related to rec ...
and the
Artin symbol.
Definition
Let
be an odd
prime number
A prime number (or a prime) is a natural number greater than 1 that is not a Product (mathematics), 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 ...
. An integer
is a
quadratic residue
In number theory, an integer ''q'' is a quadratic residue modulo operation, modulo ''n'' if it is Congruence relation, congruent to a Square number, perfect square modulo ''n''; that is, if there exists an integer ''x'' such that
:x^2\equiv q \pm ...
modulo
if it is
congruent
Congruence may refer to:
Mathematics
* Congruence (geometry), being the same size and shape
* Congruence or congruence relation, in abstract algebra, an equivalence relation on an algebraic structure that is compatible with the structure
* In modu ...
to a
perfect square modulo
and is a quadratic nonresidue modulo
otherwise. The Legendre symbol is a function of
and
defined as
:
Legendre's original definition was by means of the explicit formula
:
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& \text ...
, 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 (; ; ; 30 April 177723 February 1855) was a German mathematician, astronomer, Geodesy, geodesist, and physicist, who contributed to many fields in mathematics and science. He was director of the Göttingen Observat ...
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
is
periodic
Periodicity or periodic may refer to:
Mathematics
* Bott periodicity theorem, addresses Bott periodicity: a modulo-8 recurrence relation in the homotopy groups of classical groups
* Periodic function, a function whose output contains values tha ...
with period ''p'' and is sometimes called the Legendre sequence. Each row in the following table exhibits periodicity, just as described.
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 st ...
, can be used to compute it efficiently.
* Given a generator
, if
, then
is a quadratic residue if and only if
is even. This shows that half of the elements in
are quadratic residues.
* If
then the fact that
*:
gives us that
is a square root of the quadratic residue
.
* The Legendre symbol is periodic in its first (or top) argument: if ''a'' ≡ ''b'' (mod ''p''), then
*:
* The Legendre symbol is a
completely multiplicative function
In number theory, functions of positive integers which respect products are important and are called completely multiplicative functions or totally multiplicative functions. A weaker condition is also important, respecting only products of coprime ...
of its top argument:
*:
* 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:
*:
* When viewed as a function of ''a'', the Legendre symbol
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:
# \chi(ab) = \ch ...
modulo ''p''.
* The first supplement to the law of quadratic reciprocity:
*:
* The second supplement to the law of quadratic reciprocity:
*:
* Special formulas for the Legendre symbol
for small values of ''a'':
** For an odd prime ''p'' ≠ 3,
**:
** For an odd prime ''p'' ≠ 5,
**:
* The
Fibonacci numbers
In mathematics, the Fibonacci sequence is a sequence in which each element is the sum of the two elements that precede it. Numbers that are part of the Fibonacci sequence are known as Fibonacci numbers, commonly denoted . Many writers begin the s ...
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ... are defined by the recurrence If ''p'' is a prime number then
*:
:For example,
::
* 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 rec ...
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
In number theory, a Wall–Sun–Sun prime or Fibonacci–Wieferich prime is a certain kind of prime number which is conjectured to exist, although none are known.
Definition
Let p be a prime number. When each term in the sequence of Fibona ...
.
Sums of Legendre symbols
Sums of the form
, typically taken over all integers in the range