Proof of the Lucas–Lehmer test
Builds on Mersenne numberCongruence modulo nPrime numberSubringCommutative ringTwo-sided idealQuotient ringIrrationality of square roots of non-squaresUnit of a ringGroup of units of a ringOrder of an elementg to the n equals 1 iff the order divides nOrder of an element divides the order of the groupComposite numberA composite number has a prime factor at most its square rootQuadratic residueLegendre symbolEuler's criterionLaw of quadratic reciprocityBinomial theoremFactorial formula for binomial coefficientsEuclid's lemmaFermat's little theorem in the form a^p = aMathematical induction
Proof
Let be an odd prime and , the Mersenne number. Then , so and is odd.
Setup.
- Let . It contains and is closed under differences and under products, since .
- So is a subring of , and it is a commutative ring.
- If with integers and , then is rational. This contradicts the irrationality of square roots of non-squares. So and .
- For an integer , the set is a two-sided ideal of . Let be the quotient ring. We write for the coset of .
- Let be an integer. If , then for integers . By step 3, and . So in exactly when .
- Put and in . Then .
- We show by induction on . For , .
- If , then , by step 6.
- Put . So , and .
If , then is prime.
- Assume and, for a contradiction, that is composite. By the square root bound, has a prime factor with . Since is odd, is odd.
- Work in . Since , step 5 gives .
- Multiply by and use . This gives , so and .
- In we have : otherwise , so by step 5, but is odd.
- By step 6, is a unit of , so it lies in the group of units . Let be its order.
- By step 12 and the order criterion, divides , so with . If , then , against steps 12 and 13. So .
- Each element of is congruent modulo to some with . So has at most elements.
- The element of is not a unit, since by step 13. So has at most elements.
- Since the order of an element divides the order of the group, . This is false. So is prime.
If is prime, then .
- Assume is prime. Congruences below are modulo . Since and is odd, .
- So is a quadratic residue modulo , and . By Euler's criterion, .
- Since is odd, . So , and .
- The number is a quadratic residue modulo , so the Legendre symbol equals .
- Also is odd. By quadratic reciprocity, . So .
- By Euler's criterion, .
- For , the factorial formula gives . The prime divides but no factor of . By Euclid's lemma, .
- Work in . For integers , the binomial theorem and step 25 give . Here , since is odd.
- By Fermat's little theorem and step 24, and . So .
- Note . With step 27 for ,
- By step 20, . So .
- The element is a unit of , with inverse . Hence , that is, by step 9.
- Multiply by and use . This gives , so .
- By step 5, divides . So .
Idea
The sequence is with . If divides , then has order modulo any prime factor , which is too large when . If is prime, is a nonresidue, so the -th power map acts like conjugation on . This forces .
Reading path
To understand this page from the ground up, read these 203 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 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 of the fundamental theorem of arithmetic, Proof that the integers modulo a prime form a field, Proof of Pascal's rule from the recursive definition, Proof of Fermat's little theorem in the form a^p = a, Proof that congruence is compatible with addition, Proof of Euler's criterion by counting quadratic residues, Proof of the existence of prime factorization, 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 of the factorial formula for binomial coefficients by induction, Proof that congruence is compatible with multiplication, Proof of the binomial theorem by induction, 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 a composite number has a prime factor at most its square root, Proof of Lagrange's theorem, Proof of the irrationality of square roots of non-squares, Proof of the factor theorem, Proof that cosets have the same cardinality as the subgroup, Proof of the existence of a prime divisor, Proof that congruence is compatible with powers.
- Binary operation definition
- Binomial coefficient definition
- Construction of the reals from Cauchy sequences concept
- Definition by recursion concept
- Divisibility definition
- Element definition
- Factorial definition
- Group concept
- Integers object
- Left coset concept
- Mathematical induction concept
- Mersenne number definition
- Natural numbers object
- Order of an element concept
- Ordered field definition
- Peano axioms concept
- Proposition concept
- Rational numbers object
- Real numbers object
- Set bounded above definition
- Identity element definition
- Proof of Pascal's rule from the recursive definition proof
- 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
- Successor function definition
- Archimedean ordered field definition
- Conjunction definition
- Disjunction definition
- Implication definition
- Predicate definition
- Irrational number definition
- The reals form a field statement
- Supremum definition
- Inverse element definition
- Pascal's rule statement
- Quadratic residue definition
- Residue class definition
- Coprime integers definition
- Proof that congruence is compatible with addition proof
- Proof that congruence is compatible with multiplication proof
- Composite number definition
- Prime factorization definition
- Empty set object
- Family of sets definition
- Ordered pair definition
- Commutative ring definition
- Ideal definition
- Polynomial ring definition
- Ring homomorphism definition
- Subring definition
- Unit of a ring definition
- Zero divisor definition
- Intersection definition
- Union definition
- Left coset definition
- Right coset definition
- Addition of natural numbers definition
- Set-builder notation concept
- The successor function is injective statement
- Zero is not a successor statement
- Biconditional definition
- The rationals form a field statement
- Existential quantifier definition
- Universal quantifier definition
- Completeness axiom statement
- Proof of the factorial formula for binomial coefficients by induction proof
- Legendre symbol definition
- Congruence is compatible with addition statement
- Proof of the uniqueness of inverses proof
- Congruence is compatible with multiplication statement
- Cartesian product definition
- Divisibility in a commutative ring definition
- Group of units of a ring definition
- Two-sided ideal definition
- Subset definition
- Degree of a polynomial definition
- Disjoint sets definition
- Polynomial evaluation definition
- Proof of the commutativity of addition by induction proof
- Field definition
- Integral domain definition
- Axiom of extensionality statement
- Order on the natural numbers definition
- Union of a family of sets definition
- The rationals form an ordered field statement
- Uniqueness quantifier definition
- Factorial formula for binomial coefficients statement
- Integers modulo n definition
- Proof that congruence is compatible with powers proof
- Uniqueness of inverses statement
- Binary relation definition
- Quotient ring definition
- Leading coefficient definition
- Order on the reals definition
- Proof of cancellation in an integral domain proof
- Root of a polynomial definition
- Partition of a set definition
- Evaluation homomorphism definition
- Commutativity of addition statement
- Proof of strong induction from ordinary induction proof
- Congruence is compatible with powers statement
- Proof of the binomial theorem by induction proof
- 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
- Binomial theorem 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
- Well-ordering principle statement
- Equivalence class definition
- Total order definition
- Proof of the existence of a prime divisor proof
- 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
- Existence of a prime divisor statement
- 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
- Smallest prime factor 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 composite number has a prime factor at most its square root proof
- Proof of the existence of prime factorization 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 composite number has a prime factor at most its square root statement
- Existence of prime factorization 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 of the generalized Euclid's lemma proof
- Proof that the order of a cyclic subgroup equals the order of its generator proof
- Proof that the integers modulo a prime form a field proof
- Cosets have the same cardinality as the subgroup statement
- Approximation property of the supremum statement
- Integers modulo a prime form a field statement
- Order of a cyclic subgroup equals the order of its generator statement
- Generalized Euclid's lemma statement
- Proof of Lagrange's theorem proof
- Proof that the reals are Archimedean from the completeness axiom 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
- Floor function definition
- Order of an element divides the order of the group statement
- Proof of Fermat's little theorem by rearrangement proof
- Proof of the fundamental theorem of arithmetic proof
- Fermat's little theorem statement
- Fundamental theorem of arithmetic statement
- Proof of Euler's criterion by counting quadratic residues proof
- Proof of Fermat's little theorem in the form a^p = a proof
- Proof of the irrationality of square roots of non-squares proof
- Euler's criterion statement
- Fermat's little theorem in the form a^p = a statement
- Irrationality of square roots of non-squares 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 the Lucas–Lehmer test proof
Where this leads
1 page builds on this one.
Further reading
- Web https://en.wikipedia.org/wiki/Lucas%E2%80%93Lehmer_primality_test, Proof of correctness
About this page
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.