language-icon Old Web
English
Sign In

Wilson's theorem

In 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 modular arithmetic), the factorial ( n − 1 ) ! = 1 × 2 × 3 × ⋯ × ( n − 1 ) {displaystyle (n-1)!=1 imes 2 imes 3 imes cdots imes (n-1)} satisfiesOriginal : Inoltre egli intravide anche il teorema di Wilson, come risulta dall'enunciato seguente:'Productus continuorum usque ad numerum qui antepraecedit datum divisus per datum relinquit 1 (vel complementum ad unum?) si datus sit primitivus. Si datus sit derivativus relinquet numerum qui cum dato habeat communem mensuram unitate majorem.'Egli non giunse pero a dimostrarlo.Translation : In addition, he also glimpsed Wilson's theorem, as shown in the following statement: 'The product of all integers preceding the given integer, when divided by the given integer, leaves 1 (or the complement of 1?) if the given integer be prime. If the given integer be composite, it leaves a number which has a common factor with the given integer greater than one.'However, he didn't succeed in proving it.The Disquisitiones Arithmeticae 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, the determination of the sign of the Gauss sum, the investigations into biquadratic reciprocity, and unpublished notes. In 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 modular arithmetic), the factorial ( n − 1 ) ! = 1 × 2 × 3 × ⋯ × ( n − 1 ) {displaystyle (n-1)!=1 imes 2 imes 3 imes cdots imes (n-1)} satisfies exactly when n is a prime number. In less technical terms, any number n is a prime number if, and only if, (n − 1)! + 1 is divisible by n. This theorem was stated by Ibn al-Haytham (c. 1000 AD), and, in the 18th century, by John Wilson. Edward Waring announced the theorem in 1770, although neither he nor his student Wilson could prove it. Lagrange gave the first proof in 1771. There is evidence that Leibniz was also aware of the result a century earlier, but he never published it. For each of the values of n from 2 to 30, the following table shows the number (n − 1)! and the remainder when (n − 1)! is divided by n. (In the notation of modular arithmetic, the remainder when m is divided by n is written m mod n.)The background color is blue for prime values of n, gold for composite values. A number n > 1 {displaystyle n>1} is either a prime or a composite. That ( n − 1 ) ! ≡ − 1 ( mod n ) {displaystyle (n-1)!equiv -1{pmod {n}}} shall be proven to be true if n were a prime and false if n were a composite. The false case implies that ( n − 1 ) ! ≡ − 1 ( mod n ) {displaystyle (n-1)!equiv -1{pmod {n}}} only if n were a prime. Also, for a prime modulus, both proofs below make use of the fact that the residue classes modulo a prime number are a field—see the article prime field for more details. Lagrange's theorem, which states that in any field a polynomial of degree n has at most n roots, is needed for both proofs. If n is composite it is divisible by some prime number q, where 2 ≤ q ≤ n − 2. If (n − 1)! were congruent to −1 (mod n) then it would also be congruent to −1 (mod q). But (n − 1)! ≡ 0 (mod q). In fact, more is true. With the sole exception of 4, where 3! = 6 ≡ 2 (mod 4), if n is composite then (n − 1)! is congruent to 0 (mod n). The proof is divided into two cases: First, if n can be factored as the product of two unequal numbers, n = ab, where 2 ≤ a < b ≤ n − 2, then both a and b will appear in the product 1 × 2 × ... × (n − 1) = (n − 1)! and (n − 1)! will be divisible by n. If n has no such factorization, then it must be the square of some prime q, q > 2. But then 2q < q2 = n, both q and 2q will be factors of (n − 1)!, and again n divides (n − 1)!. The result is trivial when p = 2, so assume p is an odd prime, p ≥ 3. Since the residue classes (mod p) are a field, every non-zero a has a unique multiplicative inverse, a−1. Lagrange's theorem implies that the only values of a for which a ≡ a−1 (mod p) are a ≡ ±1 (mod p) (because the congruence a2 ≡ 1 can have at most two roots (mod p)). Therefore, with the exception of ±1, the factors of (p − 1)! can be arranged in unequal pairs, where the product of each pair is ≡ 1 (mod p). This proves Wilson's theorem.

[ "Multiplicative number theory" ]
Parent Topic
Child Topic
    No Parent Topic