HOME

TheInfoList



OR:

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 ...
, Euler's criterion is a formula for determining whether an
integer An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
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 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 ...
a
prime 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 ways ...
. Precisely, Let ''p'' be an odd prime and ''a'' be an integer
coprime In number theory, two integers and are coprime, relatively prime or mutually prime if the only positive integer that is a divisor of both of them is 1. Consequently, any prime number that divides does not divide , and vice versa. This is equiv ...
to ''p''. Then : a^ \equiv \begin \;\;\,1\pmod& \textx \textx^2\equiv a \pmod,\\ -1\pmod& \text \end Euler's criterion can be concisely reformulated using the
Legendre symbol In number theory, the Legendre symbol is a multiplicative function with values 1, −1, 0 that is a quadratic character modulo of an odd prime number ''p'': its value at a (nonzero) quadratic residue mod ''p'' is 1 and at a non-quadratic re ...
: : \left(\frac\right) \equiv a^ \pmod p. The criterion dates from a 1748 paper by
Leonhard Euler Leonhard Euler ( ; ; ; 15 April 170718 September 1783) was a Swiss polymath who was active as a mathematician, physicist, astronomer, logician, geographer, and engineer. He founded the studies of graph theory and topology and made influential ...
.L Euler, Novi commentarii Academiae Scientiarum Imperialis Petropolitanae, 8, 1760-1, 74; Opusc Anal. 1, 1772, 121; Comm. Arith, 1, 274, 487


Proof

The proof uses the fact that the residue classes modulo a prime number are a field. See the article
prime field In mathematics, a field is a set on which addition, subtraction, multiplication, and division are defined and behave as the corresponding operations on rational and real numbers. A field is thus a fundamental algebraic structure which is wid ...
for more details. Because the modulus is prime, Lagrange's theorem applies: a polynomial of degree can only have at most roots. In particular, has at most 2 solutions for each . This immediately implies that besides 0 there are at least distinct quadratic residues modulo : each of the possible values of can only be accompanied by one other to give the same residue. In fact, (p-x)^\equiv x^ \pmod p.This is because (p-x)^ \equiv p^-+x^ \equiv x^ \pmod p. So, the \tfrac distinct quadratic residues are: 1^, 2^, ... , (\tfrac)^ \pmod p. As is coprime to ,
Fermat's little theorem In number theory, Fermat's little theorem states that if is a prime number, then for any integer , the number is an integer multiple of . In the notation of modular arithmetic, this is expressed as a^p \equiv a \pmod p. For example, if and , t ...
says that : a^\equiv 1 \pmod p, which can be written as : \left( a^-1 \right)\left( a^+1 \right) \equiv 0 \pmod p. Since the integers mod form a field, for each , one or the other of these factors must be zero. Therefore, : a^\equiv 1\pmod p or : a^ \equiv \pmod p. Now if is a quadratic residue, , : a^\equiv ^ \equiv x^\equiv1\pmod p. So every quadratic residue (mod ) makes the first factor zero. Applying Lagrange's theorem again, we note that there can be no more than values of that make the first factor zero. But as we noted at the beginning, there are at least distinct quadratic residues (mod ) (besides 0). Therefore, they are precisely the residue classes that make the first factor zero. The other residue classes, the nonresidues, must make the second factor zero, or they would not satisfy Fermat's little theorem. This is Euler's criterion.


Alternative proof

This proof only uses the fact that any congruence kx\equiv l\!\!\! \pmod p has a unique (modulo p) solution x provided p does not divide k. (This is true because as x runs through all nonzero remainders modulo p without repetitions, so does kx: if we have kx_1\equiv kx_2 \pmod p, then p\mid k(x_1-x_2), hence p\mid (x_1-x_2), but x_1 and x_2 aren't congruent modulo p.) It follows from this fact that all nonzero remainders modulo p the square of which isn't congruent to a can be grouped into unordered pairs (x,y) according to the rule that the product of the members of each pair is congruent to a modulo p (since by this fact for every y we can find such an x, uniquely, and vice versa, and they will differ from each other if y^2 is not congruent to a). If a is not a quadratic residue, this is simply a regrouping of all p-1 nonzero residues into (p-1)/2 pairs, hence we conclude that 1\cdot2\cdot ... \cdot (p-1)\equiv a^ \!\!\! \pmod p. If a is a quadratic residue, exactly two remainders were not among those paired, r and -r such that r^2\equiv a\!\!\! \pmod p. If we pair those two absent remainders together, their product will be -a rather than a, whence in this case 1\cdot2\cdot ... \cdot (p-1)\equiv -a^ \!\!\! \pmod p. In summary, considering these two cases we have demonstrated that for a\not\equiv 0 \!\!\! \pmod p we have 1\cdot2\cdot ... \cdot (p-1)\equiv -\left(\frac\right)a^ \!\!\! \pmod p. It remains to substitute a=1 (which is obviously a square) into this formula to obtain at once
Wilson's theorem In algebra and number theory, Wilson's theorem states that a natural number ''n'' > 1 is a prime number if and only if the product of all the positive integers less than ''n'' is one less than a multiple of ''n''. That is (using the notations of ...
, Euler's criterion, and (by squaring both sides of Euler's criterion)
Fermat's little theorem In number theory, Fermat's little theorem states that if is a prime number, then for any integer , the number is an integer multiple of . In the notation of modular arithmetic, this is expressed as a^p \equiv a \pmod p. For example, if and , t ...
.


Examples

Example 1: Finding primes for which ''a'' is a residue Let ''a'' = 17. For which primes ''p'' is 17 a quadratic residue? We can test prime ''ps manually given the formula above. In one case, testing ''p'' = 3, we have 17(3 − 1)/2 = 171 ≡ 2 ≡ −1 (mod 3), therefore 17 is not a quadratic residue modulo 3. In another case, testing ''p'' = 13, we have 17(13 − 1)/2 = 176 ≡ 1 (mod 13), therefore 17 is a quadratic residue modulo 13. As confirmation, note that 17 ≡ 4 (mod 13), and 22 = 4. We can do these calculations faster by using various modular arithmetic and Legendre symbol properties. If we keep calculating the values, we find: :(17/''p'') = +1 for ''p'' = (17 is a quadratic residue modulo these values) :(17/''p'') = −1 for ''p'' = (17 is not a quadratic residue modulo these values). Example 2: Finding residues given a prime modulus ''p'' Which numbers are squares modulo 17 (quadratic residues modulo 17)? We can manually calculate it as: : 12 = 1 : 22 = 4 : 32 = 9 : 42 = 16 : 52 = 25 ≡ 8 (mod 17) : 62 = 36 ≡ 2 (mod 17) : 72 = 49 ≡ 15 (mod 17) : 82 = 64 ≡ 13 (mod 17). So the set of the quadratic residues modulo 17 is . Note that we did not need to calculate squares for the values 9 through 16, as they are all negatives of the previously squared values (e.g. 9 ≡ −8 (mod 17), so 92 ≡ (−8)2 = 64 ≡ 13 (mod 17)). We can find quadratic residues or verify them using the above formula. To test if 2 is a quadratic residue modulo 17, we calculate 2(17 − 1)/2 = 28 ≡ 1 (mod 17), so it is a quadratic residue. To test if 3 is a quadratic residue modulo 17, we calculate 3(17 − 1)/2 = 38 ≡ 16 ≡ −1 (mod 17), so it is not a quadratic residue. Euler's criterion is related to the law of quadratic reciprocity.


Applications

In practice, it is more efficient to use an extended variant of Euclid's algorithm to calculate the Jacobi symbol \left(\frac\right). If n is an odd prime, this is equal to the Legendre symbol, and decides whether a is a quadratic residue modulo n. On the other hand, since the equivalence of a^\frac to the Jacobi symbol holds for all odd primes, but not necessarily for composite numbers, calculating both and comparing them can be used as a primality test, specifically the Solovay–Strassen primality test. Composite numbers for which the congruence holds for a given a are called Euler–Jacobi pseudoprimes to base a.


Notes


References

The ''
Disquisitiones Arithmeticae (Latin for ''Arithmetical Investigations'') is a textbook on number theory written in Latin by Carl Friedrich Gauss in 1798, when Gauss was 21, and published in 1801, when he was 24. It had a revolutionary impact on number theory by making the f ...
'' has been translated from Gauss's Ciceronian Latin into English and German. The German edition includes all of his papers on number theory: all the proofs 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 ...
, the determination of the sign of the Gauss sum, the investigations into biquadratic reciprocity, and unpublished notes. * * * *


External links


The Euler Archive
{{DEFAULTSORT:Euler's Criterion Articles containing proofs Modular arithmetic Quadratic residue Squares in number theory Theorems about prime numbers