






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Notes on Carmichael numbers, a class of composite numbers that satisfy Fermat's little theorem for some base 'a'. a proof of the Korselt criterion for identifying Carmichael numbers and a discussion on finding such numbers for given prime factors. It also touches upon the bounds for the number of Carmichael numbers with a given prime factor product.
Typology: Assignments
1 / 12
This page cannot be seen from the preview
Don't miss anything!







Notes by G.J.O. Jameson
Introduction
Recall that Fermat’s “little theorem” says that if p is prime and a is not a multiple of p, then ap−^1 ≡ 1 mod p.
This theorem gives a possible way to detect primes, or more exactly, non-primes: if for some positive a ≤ n − 1, an−^1 is not congruent to 1 mod n, then, by the theorem, n is not prime. A lot of composite numbers can indeed be detected by this test, but there are some that evade it. In other words, there are numbers n that are composite but still satisfy an−^1 ≡ 1 mod n for all a coprime to n. Such numbers might be called “false primes”, but in fact they are called Carmichael numbers in honour of R.D. Carmichael, who demonstrated their existence in 1912 [Car] – so the year 2012 marks their centenary. (Composite numbers that satisfy the stated condition for one particular a are called a-pseudoprimes. They are the subject of a companion article [Jam1]).
It is easy to see that every Carmichael number is odd: if n (≥ 4) is even, then (n − 1)n−^1 ≡ (−1)n−^1 = −1 mod n, so is not congruent to 1 mod n.
There is a pleasantly simple description of Carmichael numbers, due to Korselt:
THEOREM 1. A number n is a Carmichael number if and only if n = p 1 p 2... pk, a product of (at least two) distinct primes, and pj − 1 divides n − 1 for each j.
Proof. Let n be as stated, and let gcd(a, n) = 1. By Fermat’s theorem, for each j, we have apj^ −^1 ≡ 1 mod pj. Since pj − 1 divides n − 1, an−^1 ≡ 1 mod pj. In other words, an−^1 − 1 is a multiple of each pj. It follows that it is a multiple of n, so an−^1 ≡ 1 mod n.
We leave out the proof of the converse, that every Carmichael number is of this form. It can be found in many textbooks on number theory, for example [JJ, section 6].
At this point, some texts simply state that 561 (= 3 × 11 × 17) is a Carmichael number, and invite the reader to verify it. This is indeed easily done using Theorem 1. But how was it found? Is it the first Carmichael number? More generally, how might one detect all the Carmichael numbers up to a certain magnitude N? We will show how this can be done very quickly for N = 3000 (this value is chosen because it is just large enough to produce several examples and to illustrate the principles involved; of course, the reader may choose to extend the search). We then go on to show how one can find all the Carmichael numbers of certain
types, such as those having three prime factors, with the smallest one given.
For numbers within the range considered, these investigations require only minimal numerical calculations, and we hope to convince the reader that they offer an entertaining and instructive piece of detective work, easily carried out with bare hands. Of course, a search up to seriously large numbers has to be a computer exercise, and this has been very efficiently undertaken by Pinch [Pi1], [Pi2]; the methods, greatly refining those used here, are described in [Pi1].
We conclude with a brief account of some recent research topics. For any readers whose interest has been stimulated, further information about Carmichael numbers can be found in [Rib] and [Jam2].
We record here some easy consequences of Theorem 1 which we shall use constantly.
LEMMA 2. Let n = pu, where p is prime. Then p − 1 divides n − 1 if and only if it divides u − 1.
Proof. (n − 1) − (u − 1) = n − u = pu − u = (p − 1)u. The statement follows.
PROPOSITION 3. A Carmichael number has at least three prime factors.
Proof. Suppose that n has two prime factors: n = pq, where p, q are prime and p > q. Then p − 1 > q − 1, so p − 1 does not divide q − 1. By Proposition 2, p − 1 does not divide n − 1. So n is not a Carmichael number.
PROPOSITION 4. Suppose that n is a Carmichael number and that p and q are prime factors of n. Then q is not congruent to 1 mod p.
Proof. Suppose that q ≡ 1 mod p, so that p divides q − 1. Since q − 1 divides n − 1, it follows that p divides n − 1. But this is not true, since p divides n.
The Carmichael numbers up to 3000
We start by considering numbers with three prime factors: n = pqr, with p < q < r. By Theorem 1 and Lemma 2, we have to discover triples (p, q, r) that fit together as follows:
(1) p − 1 divides qr − 1 (equivalently, qr ≡ 1 mod p − 1), (2) q − 1 divides pr − 1, (3) r − 1 divides pq − 1.
Given a pair of primes (p, q) with p < q, the following procedure will detect all the
From now on, we will usually present Carmichael numbers by stating the prime factors without multiplying them out, since it is really the factors themselves that are of interest.
Carmichael numbers pqr with given p
What we have been doing is finding the Carmichael numbers of form pqr for a given (p, q). We now establish a much more striking fact: there are only finitely many Carmichael numbers of the form pqr for a given p. Furthermore, we can give an upper bound for the number of them and describe a systematic way of finding them. These results were originated by Beeger [Be] and Duparc [Du].
We restate the previous (1),(2),(3) more explicitly: n = pqr is a Carmichael number if and only if there are integers h 1 , h 2 , h 3 such that
qr − 1 = h 1 (p − 1), (4) pr − 1 = h 2 (q − 1), (5) pq − 1 = h 3 (r − 1). (6)
The rough significance of these numbers is shown by the approximations h 1 ≈ qr/p (etc.) when p, q, r are large.
PROPOSITION 5. We have 2 ≤ h 3 ≤ p − 1.
Proof. Since r − 1 > q, we have qh 3 < pq, hence h 3 < p. Since both are integers, h 3 ≤ p − 1. Also, h 3 6 = 1 since r 6 = pq (r is prime!). So h 3 ≥ 2.
The essential point is that we can express q and r in terms of p, h 2 and h 3 :
PROPOSITION 6. We have
q − 1 = (p^ − h^ 1)(p^ +^ h^3 ) 2 h 3 −^ p^2
Proof. By (5) and (6),
h 2 (q − 1) = p(r − 1) + (p − 1) = (^) hp 3
(pq − 1) + (p − 1),
so h 2 h 3 (q − 1) = p(pq − 1) + h 3 (p − 1) = p[p(q − 1) + (p − 1)] + h 3 (p − 1),
hence (h 2 h 3 − p^2 )(q − 1) = (p + h 3 )(p − 1).
Once p, q and h 3 are known, r is determined by (6).
THEOREM 7. Let p be prime. Then there are only finitely many 3-factor Carmichael numbers with smallest prime factor p. Denote this number by f 3 (p). Then
f 3 (p) ≤ (p − 2)(log p + 2).
Moreover, for any ε > 0 , we have f 3 (p) < εp log p for sufficiently large p, so in fact
f 3 (p) p log p →^0 as^ p^ → ∞. Proof. Choose h 3 satisfying 2 ≤ h 3 ≤ p − 1. Write h 2 h 3 − p^2 = ∆. We will work with ∆ rather than h 2. When ∆ is chosen, q is determined by (7) and then r by (6). By (7),
∆ = (p^ −^ 1)( q −p 1 + h^3 ).
Clearly, ∆ is a positive integer, so ∆ ≥ 1. Also, since p − 1 < q − 1, we have ∆ < p + h 3 , so in fact ∆ ≤ p + h 3 − 1, and ∆ must lie in an interval of length p + h 3 − 2. In addition, ∆ must be congruent to −p^2 mod h 3 , so each block of length h 3 contains only one possible value for ∆. Hence the number of choices for ∆ is no more than
p + h 3 − 2 h 3 + 1 =^
p − 2 h 3 + 2.
We now add over the possible values of h 3 and use the well-known fact that ∑ph=2^1 h < log p to obtain
f 3 (p) ≤
∑^ p−^1 h=
(p − 2 h + 2
< (p − 2)(log p + 2).
The reader is at liberty not to bother with the second half of the proof! For those bothering, the point is that the estimation just found took no notice of the fact that ∆ also has to be a divisor of (p − 1)(p + h 3 ). We use the well-known fact that for any ε > 0, τ (n)/nε^ → 0 as n → ∞, where τ (n) is the number of divisors of n. So the number of choices for ∆ is also bounded by τ [(p − 1)(p + h 3 )], which is less than pε^ for large enough p (since (p − 1)(p + h 3 ) < 2 p^2 ). Using this bound for h 3 ≤ p^1 −ε^ and the previous one for h 3 > p^1 −ε, together with the elementary estimation ∑ y<n≤x^1 n ≤ log x − log y + 1, we see that f 3 (p) ≤ S 1 + S 2 , where S 1 = p^1 −εpε^ = p and
S 2 ≤
p^1 −ε<h<p
( (^) p h + 2
≤ p(ε log p + 1) + 2p = εp log p + 3p,
so f 3 (p) < εp log p + 4p < 2 εp log p for large enough p. Of course, we can now replace 2ε by ε.
These cases have a success rate that is quite untypical of larger numbers! In fact, 11 is already very different: there are no Carmichael numbers 11qr. The reader is invited to work through this for him/herself: there are ten admissible combinations of h 3 and ∆; six cases have q prime, then two have r prime. Both then fail at the hurdle qr ≡ 1 mod 10. At the risk of spoiling the fun, we now list the 3-factor Carmichael numbers pqr for all Remark. If pqr is a Carmichael number and q − 1 is a multiple of p − 1, then so is r − 1.
- 3 19 67 1 7 × 19 × 2 9 1 1 55 c Carmichael numbers to have this property, at least in the early stages: of the 69 numbers listed above, 57 have it. The same comment applies to the q and r generated by the process we have described.
Another consequence of Proposition 6 is that we can give bounds for q, r and n in terms of p:
PROPOSITION 8. If pqr is a Carmichael number, with p < q < r, then q < 2 p(p − 1), r < p^2 (p − 1), n < 2 p^4 (p − 1)^2 (< 2 p^6 ). Proof. By (7) and the fact that h 3 ≤ p − 1, we have q ≤ (p − 1)(p + h 3 ) + 1 ≤ (p − 1)(2p − 1) + 1 < 2 p(p − 1).
Now by (6),
r = (^) h^1 3
(pq − 1) + 1 ≤ 12 (pq − 1) + 1 =^12 (pq + 1) < p^2 (p − 1) +^12 ,
so in fact r < p^2 (p − 1) (equality doesn’t occur, since r is prime!). Hence n = pqr < 2 p^4 (p − 1)^2.
With a bit more care, one can improve these bounds to r < 12 p^2 (p + 1) and n < (^12) p (^4) (p + 1) (^2) , which are close to being optimal (see [Jam2]).
Carmichael numbers pqr with given r
Now let us vary the problem and ask how one might find all the Carmichael numbers pqr for a given r (of course, the results for all r ≤ 71 could be read off from our list, but that really would be cheating!). A very different method is appropriate. Because of Proposition 4, we only need to consider primes p < r that do not divide into r − 1. For such p, (3) demands q such that pq ≡ 1 mod (r − 1). By elementary number theory, there is exactly one integer q < r − 1 that satisfies this, found either by applying the Euclidean algorithm to obtain an expression xp + y(r − 1) = 1 or (more quickly when the numbers are small) by simply trying the numbers k(r − 1) + 1 (k = 1, 2 ,.. .) in turn until a multiple of p is found. If q is prime and different from p, we now check whether (1) and (2) are satisfied. We do this for successive p, but of course leave out any prime that has already appeared as the q corresponding to an earlier p. We set out the result for the case r = 19:
p q (1) (2) Carmichael number 5 11 yes no 7 13 yes yes 7 × 13 × 19 17 17
becomes r − 1 = (pq − 1)(pq + h 4 )/∆, where ∆ = h 3 h 4 − p^2 q^2 , so that
∆ = (pq^ −^ 1)( r −pq 1 +^ h^4 )< p(pq + h 4 ).
Of course, ∆ also has to divide (pq −1)(pq +h 4 ). This limits the number of possible values for it to (pq)ε^ (for any given ε > 0) for large enough pq, so the number of Carmichael numbers of this form is bounded by (pq)1+ε.
The reader may care to work through the first case, (p, q) = (3, 5). In this case, because of the exclusions given by Proposition 4, the smallest possible value for r is 17, so in fact ∆ < 15 + h 4. You should discover that there is only one resulting Carmichael number, 3 × 5 × 47 × 89.
How many Carmichael numbers?
There are just 43 Carmichael numbers up to 10^6 , whereas there are 78,498 primes – so the original idea of using the Fermat property to detect primes is not so bad after all! As mentioned above, Pinch [Pi1], [Pi2] has computed the Carmichael numbers up to 10^18 (more recently, even to 10^21 ). Some of his results are as follows. Here, C(x) denotes the number of Carmichael numbers up to x, and C 3 (x) the number with three prime factors.
x 106 107 108 109 1012 1015 1018 C(x) 43 105 255 646 8 , 241 105 , 212 1 , 401 , 644 C 3 (x) 23 47 84 172 1 , 000 6 , 083 35 , 586
It was an unsolved problem for many years whether there are infinitely many Carmichael numbers. The question was resolved in 1994 in a classic article by Alford, Granville and Pomerance [AGP]. Here it was shown, using sophisticated methods, not only that the an- swer is yes, but that in fact C(x) > x^2 /^7 for sufficiently large x. Harman [Har] has improved the 27 to 0.33.
There is a very wide gap between these estimates and the known upper bounds for C(x). These involve the following rather unwieldy expressions: write log 2 (x) = log log x (etc.) and l(x) = exp(log x log 3 x/ log 2 x). Erd¨os [Erd] obtained the upper bound x/l(x)c for some c > 12 , valid for large enough x. It was improved to x/l(x)^1 −ε^ in [PSW], and the method was simplified in [Pom]. Erd¨os conjectured (with reasons) that C(x) is not bounded above by xα^ for any α < 1. This is a very bold conjecture in view of the computed values (Pinch’s largest figure is only slightly more than x^1 /^3 ), but it is still regarded as a serious possibility. The question is discussed in depth in [GP].
For 3-factor Carmichael numbers, the situation is just the reverse. As yet, nobody has
come near to proving that there are infinitely many of them, though this seems compellingly likely in view of Pinch’s calculations. One approach to this problem is deceptively enticing. Suppose, for some n, that p = 6n + 1, q = 12n + 1 and r = 18n + 1 are all prime. It is easily verified that (1), (2) and (3) hold, for example
(6n + 1)(12n + 1) = 72n^2 + 18n + 1 ≡ 1 mod 18n.
So pqr is a Carmichael number. This occurs, for example, for n = 1 and n = 6. Are there infinitely many values of n for which it occurs? Unfortunately, this question is unsolved: it is a typical example of a whole family of questions about prime numbers that sound simple, but stoutly resist solution.
In contrast, a lot of progress has been made on upper bounds. We remark first the estimation C 3 (x) ≤ Cx^2 /^3 (for some constant C) follows easily from our Theorem 7, together with Chebyshev’s well-known estimate for prime numbers, which states the following: let P (x) denote the set of primes not greater than x, and let θ(x) = ∑ p∈P (x) log p. Then θ(x) ≤ cx for all x, where c is a constant not greater than log 4. By Proposition 7 (in the form f 3 (p) ≤ 2 p log p), we have
C 3 (x) ≤
p∈P (x^1 /^3 )
2 p log p ≤ 2 x^1 /^3 θ(x^1 /^3 ) ≤ 2 cx^2 /^3.
However, much stronger results are known. Following methods developed by earlier authors, it was shown in [BN] that, for any ε > 0, C 3 (x) < x^5 /^14 + ε for large enough x, and the 145 has been further reduced to 207 in [HBr]. In [GP], it is conjectured, with heuristic reasoning, that the true bound is Kx^1 /^3 /(log x)^3 for a certain specified K.
The starting point for all these methods is to consider the gcd g of p − 1, q − 1 and r − 1 and to write p − 1 = ag, q − 1 = bg, r − 1 = cg.
There is an intricate algebra relating these quantities and the hj , and one finds, for example, that there are only finitely many 3-factor Carmichael numbers with a given value of g. A gentle exposition of these results can be seen in [Jam2].