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 a and n > 1 be any integers such that a n 1 1 ( mod n ) but a d 1 ( mod n ) for every proper divisor d of n 1 . Prove that n is a prime.

Answers

Note: we must add the hypothesis a 1 ( mod n ) , otherwise a = 9 , n = 8 , for instance, satisfy the hypothesis, because n 1 = 7 has no proper divisor, so the second condition is empty, but 8 is not a prime!

Proof.

We know that a n = 1 , because a m 1 1 ( mod m ) . So we can consider the order h of a modulo m .

Note that h 1 , otherwise a 1 ( mod p ) .

If h n 1 , by Lemma 2.31, h ] ] 1 , n 1 [ [ is a proper divisor of n 1 , and h n 1 1 ( mod n ) , in contradiction with the hypothesis. Hence h = n 1 .

By problem 7, no two elements of a , a 2 , , a h are congruent modulo n , and these elements are relatively prime to n . Therefore there are at least h = n 1 elements in a reduced system of residues modulo n , so ϕ ( n ) n 1 . If n was composite, ϕ ( n ) < n 1 . Therefore n is a prime.

(Alternatively, if we use nℤ , then 1 ¯ , a ¯ , , a ¯ n 2 are distincts elements of ( nℤ ) × , thus | ( nℤ ) × | n 1 , and | ( nℤ ) × | n 1 is always true, so | ( nℤ ) × | = n 1 . This shows that every element of ( nℤ ) { 0 } is invertible, hence nℤ is a field. This implies that n is a prime.) □

Note: We can give a less strong hypothesis. Let n > 2 and p 1 , , p k be the prime factors of n 1 > 1 .

If a 1 ( mod n ) , a n 1 1 ( mod n ) and

a ( n 1 ) p i 1 ( mod n ) , i = 1 , 2 , , k ,

then the order of a modulo n is n 1 , and the same reasoning shows that n 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 n = 1234567891234567891234567891 is a prime (easy to remember). But we must prove recursively that the factors such 440334654777631 are prime with the same method, to obtain a complete primality certificate for n .

User profile picture
2024-09-15 17:12
Comments