Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 2.8.24* (Primality certificate (another result of Edouard Lucas))
Exercise 2.8.24* (Primality certificate (another result of Edouard Lucas))
Let and be any integers such that but for every proper divisor of . Prove that is a prime.
Answers
Note: we must add the hypothesis , otherwise , for instance, satisfy the hypothesis, because has no proper divisor, so the second condition is empty, but is not a prime!
Proof.
We know that , because . So we can consider the order of modulo .
Note that , otherwise .
If , by Lemma 2.31, is a proper divisor of , and , in contradiction with the hypothesis. Hence .
By problem 7, no two elements of are congruent modulo , and these elements are relatively prime to . Therefore there are at least elements in a reduced system of residues modulo , so . If was composite, . Therefore is a prime.
(Alternatively, if we use , then are distincts elements of , thus , and is always true, so . This shows that every element of is invertible, hence is a field. This implies that is a prime.) □
Note: We can give a less strong hypothesis. Let and be the prime factors of .
If , and
then the order of modulo is , and the same reasoning shows that is a prime.
Example:
sage: n = 1234567891234567891234567891 sage: a = Mod(2,n); a^(n-1) 1 sage: factor(n-1) 2 * 3^3 * 5 * 757 * 3607 * 3803 * 440334654777631 sage: for p,_ in factor(n-1): ....: print(’p =’,p,’a^((n-1)/p) =’, a^((n-1)//p)) ....: (’p =’, 2, ’a^((n-1)/p) =’, 1234567891234567891234567890) (’p =’, 3, ’a^((n-1)/p) =’, 530866758173318629029019298) (’p =’, 5, ’a^((n-1)/p) =’, 854954600399764194910596932) (’p =’, 757, ’a^((n-1)/p) =’, 1086212966233513514618043309) (’p =’, 3607, ’a^((n-1)/p) =’, 660467933836326895622483799) (’p =’, 3803, ’a^((n-1)/p) =’, 1094010502560723949804893285) (’p =’, 440334654777631, ’a^((n-1)/p) =’, 1113291225028075564965212267)
This proves that is a prime (easy to remember). But we must prove recursively that the factors such are prime with the same method, to obtain a complete primality certificate for .