Proof of Pépin's test
Builds on Fermat numberCongruence modulo nPrime numberLegendre symbolQuadratic residueLaw of quadratic reciprocityEuler's criterionUnits of Z/nZ are the residues coprime to nGroup of units of a ringg to the n equals 1 iff the order divides nOrder of an element divides the order of the groupOrder of the group of units of Z/nZ is Euler's totientEuler's totient function
Proof
Let and , a Fermat number. Put . Congruences are modulo unless stated.
If is prime, then .
- Since , we have , so divides . Hence , and .
- Also . Hence .
- Assume is prime. Then and are distinct odd primes.
- By the law of quadratic reciprocity, with Legendre symbols, , because is even.
- The squares modulo are , and . So is a quadratic nonresidue modulo , and .
- By step 4, .
- By Euler's criterion, .
If , then is prime.
- Assume . A common divisor of and divides and , hence divides . So .
- So the class lies in the group of units, by the units of Z/nZ. Let be its order in .
- Squaring the assumption gives . By the order criterion, divides . So with .
- If , then divides , so . With this gives , which is false since .
- So .
- The order of an element divides the order of the group. The group has elements, by the order of the units group. So .
- By the definition of Euler's totient function, counts integers with coprime to . The integer is not coprime to , so .
- Hence , and each with is coprime to .
- If were a divisor of with , then , contrary to step 15. So is prime.
Idea
If is prime, quadratic reciprocity shows that is not a square modulo , and Euler's criterion turns this into the congruence. Conversely, the congruence makes the order of equal to . Only a prime modulus has that many units.
Reading path
To understand this page from the ground up, read these 184 pages in order. The foundations come first. The path takes the proofs Proof of Bézout's identity, Proof of cancellation in an integral domain, Proof of the approximation property of the supremum, Proof of Gauss's lemma on quadratic residues, Proof of the generalized Euclid's lemma, Proof of Eisenstein's lemma, Proof of the commutativity of addition by induction, Proof of Fermat's little theorem by rearrangement, Proof that equivalence classes form a partition, Proof that g to the n equals 1 iff the order divides n, Proof of Euclid's lemma, Proof that R[x] is an integral domain iff R is, Proof that the reals form an ordered field, with the Cauchy sequence construction, Proof that the order of the group of units of Z/nZ is Euler's totient, Proof of the law of quadratic reciprocity by counting lattice points, Proof that the order of an element divides the order of the group, Proof of the degree of a product over an integral domain, Proof of strong induction from ordinary induction, Proof of the laws of exponents in a group, Proof that the integers modulo a prime form a field, Proof that congruence is compatible with addition, Proof of Euler's criterion by counting quadratic residues, Proof of the second supplement to quadratic reciprocity from Gauss's lemma, Proof that a polynomial over a field has at most as many roots as its degree, Proof of the remainder theorem, Proof that congruence is compatible with multiplication, Proof that the order of a cyclic subgroup equals the order of its generator, Proof of the well-ordering principle from strong induction, Proof of the division algorithm, Proof of the uniqueness of inverses, Proof of the first supplement to quadratic reciprocity from Euler's criterion, Proof that the reals are Archimedean from the completeness axiom, Proof that the units of Z/nZ are the residues coprime to n, Proof of Lagrange's theorem, Proof of the factor theorem, Proof that cosets have the same cardinality as the subgroup, Proof that congruence is compatible with powers.
- Binary operation definition
- Construction of the reals from Cauchy sequences concept
- Definition by recursion concept
- Divisibility definition
- Element definition
- Fermat number definition
- Group concept
- Group of units of Z/nZ object
- Integers object
- Left coset concept
- Mathematical induction concept
- Natural numbers object
- Ordered field definition
- Peano axioms concept
- Proposition concept
- Rational numbers object
- Real numbers object
- Set bounded above definition
- Associativity definition
- Identity element definition
- Congruence modulo n definition
- Greatest common divisor definition
- Prime number definition
- Set definition
- Order of a group definition
- Ring definition
- Subgroup definition
- Ring of integers statement
- Archimedean ordered field definition
- Successor function definition
- Conjunction definition
- Disjunction definition
- Implication definition
- Predicate definition
- The reals form a field statement
- Supremum definition
- Semigroup definition
- Inverse element definition
- Quadratic residue definition
- Residue class definition
- Proof that congruence is compatible with addition proof
- Proof that congruence is compatible with multiplication proof
- Coprime integers definition
- Empty set object
- Family of sets definition
- Ordered pair definition
- Commutative ring definition
- Intersection definition
- Polynomial ring definition
- Ring homomorphism definition
- Unit of a ring definition
- Zero divisor definition
- Union definition
- Addition of natural numbers definition
- Left coset definition
- Right coset definition
- Set-builder notation concept
- The rationals form a field statement
- The successor function is injective statement
- Zero is not a successor statement
- Biconditional definition
- Existential quantifier definition
- Universal quantifier definition
- Completeness axiom statement
- Monoid definition
- Congruence is compatible with addition statement
- Legendre symbol definition
- Congruence is compatible with multiplication statement
- Proof of the uniqueness of inverses proof
- Euler's totient function definition
- Cartesian product definition
- Disjoint sets definition
- Divisibility in a commutative ring definition
- Group of units of a ring definition
- Degree of a polynomial definition
- Field definition
- Polynomial evaluation definition
- Subset definition
- Integral domain definition
- Proof of the commutativity of addition by induction proof
- Order on the natural numbers definition
- Axiom of extensionality statement
- Union of a family of sets definition
- The rationals form an ordered field statement
- Uniqueness quantifier definition
- Group of units of a monoid definition
- Integers modulo n definition
- Proof that congruence is compatible with powers proof
- Uniqueness of inverses statement
- Binary relation definition
- Leading coefficient definition
- Order on the reals definition
- Proof of cancellation in an integral domain proof
- Root of a polynomial definition
- Evaluation homomorphism definition
- Partition of a set definition
- Commutativity of addition statement
- Proof of strong induction from ordinary induction proof
- Congruence is compatible with powers statement
- Antisymmetric relation definition
- Reflexive relation definition
- Symmetric relation definition
- Transitive relation definition
- Proof of the laws of exponents in a group proof
- Monic polynomial definition
- Multiplicity of a root definition
- Proof of the degree of a product over an integral domain proof
- Cancellation in an integral domain statement
- Proof of the remainder theorem proof
- Function definition
- Strong induction statement
- Equivalence relation definition
- Preorder definition
- Laws of exponents in a group statement
- Degree of a product statement
- Division algorithm for polynomials statement
- Codomain definition
- Injective function definition
- Proof of the well-ordering principle from strong induction proof
- Partial order definition
- Order of an element definition
- Cyclic subgroup generated by an element definition
- Surjective function definition
- Remainder theorem statement
- Proof that R[x] is an integral domain iff R is proof
- Equivalence class definition
- Well-ordering principle statement
- Total order definition
- Bijective function definition
- Proof of the division algorithm proof
- Proof of the factor theorem proof
- Proof that equivalence classes form a partition proof
- R[x] is an integral domain iff R is statement
- Equinumerous sets definition
- Division algorithm statement
- Factor theorem statement
- Equivalence classes form a partition statement
- Proof that the reals form an ordered field, with the Cauchy sequence construction proof
- Cardinality definition
- Proof that g to the n equals 1 iff the order divides n proof
- Proof of Bézout's identity proof
- Proof that a polynomial over a field has at most as many roots as its degree proof
- The reals form an ordered field statement
- g to the n equals 1 iff the order divides n statement
- Bézout's identity statement
- A polynomial over a field has at most as many roots as its degree statement
- Proof that cosets have the same cardinality as the subgroup proof
- Proof of the approximation property of the supremum proof
- Proof that the order of a cyclic subgroup equals the order of its generator proof
- Proof of the generalized Euclid's lemma proof
- Proof that the integers modulo a prime form a field proof
- Proof that the units of Z/nZ are the residues coprime to n proof
- Cosets have the same cardinality as the subgroup statement
- Approximation property of the supremum statement
- Order of a cyclic subgroup equals the order of its generator statement
- Integers modulo a prime form a field statement
- Generalized Euclid's lemma statement
- Units of Z/nZ are the residues coprime to n statement
- Proof of Lagrange's theorem proof
- Proof that the reals are Archimedean from the completeness axiom proof
- Proof that the order of the group of units of Z/nZ is Euler's totient proof
- Proof of Euclid's lemma proof
- Lagrange's theorem statement
- The reals are Archimedean statement
- Proof that the order of an element divides the order of the group proof
- Euclid's lemma statement
- Order of the group of units of Z/nZ is Euler's totient statement
- Floor function definition
- Order of an element divides the order of the group statement
- Proof of Fermat's little theorem by rearrangement proof
- Fermat's little theorem statement
- Proof of Euler's criterion by counting quadratic residues proof
- Euler's criterion statement
- Proof of the first supplement to quadratic reciprocity from Euler's criterion proof
- Proof of Gauss's lemma on quadratic residues proof
- Proof of Eisenstein's lemma proof
- First supplement to quadratic reciprocity statement
- Gauss's lemma on quadratic residues statement
- Eisenstein's lemma statement
- Proof of the second supplement to quadratic reciprocity from Gauss's lemma proof
- Proof of the law of quadratic reciprocity by counting lattice points proof
- Second supplement to quadratic reciprocity statement
- Law of quadratic reciprocity statement
- Proof of Pépin's test proof
Where this leads
1 page builds on this one.
Further reading
- Web https://en.wikipedia.org/wiki/P%C3%A9pin%27s_test, Proof of correctness
About this page
| Tag | 5F18K7X480 |
|---|---|
| URI | m2://5F18K7X480 |
| Kind | proof |
| Writing | W0 stub |
| MSC | 11Y11 |
| Proves | Pépin's test |
| Uses | Fermat number, Congruence modulo n, Prime number, Legendre symbol, Quadratic residue, Law of quadratic reciprocity, Euler's criterion, Units of Z/nZ are the residues coprime to n, Group of units of a ring, g to the n equals 1 iff the order divides n, Order of an element divides the order of the group, Order of the group of units of Z/nZ is Euler's totient, Euler's totient function |
| Changed | 4 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.