TRANSACTIONS OF THE AMERICAN MATHEMATICAL SOCIETY Volume 367, Number 1, January 2015, Pages 355–376 S 0002-9947(2014)06083-2 Article electronically published on September 23, 2014

SIERPINSKI´ AND CARMICHAEL NUMBERS

WILLIAM BANKS, CARRIE FINCH, FLORIAN LUCA, CARL POMERANCE, AND PANTELIMON STANIC˘ A˘

Abstract. We establish several related results on Carmichael, Sierpi´nski and Riesel numbers. First, we prove that almost all odd natural numbers k have the property that 2nk + 1 is not a for any n ∈ N; this implies the existence of a K of positive lower density such that for any k ∈ K the number 2nk + 1 is neither prime nor Carmichael for every n ∈ N.Next, using a recent result of Matom¨aki and Wright, we show that there are  x1/5 Carmichael numbers up to x that are also Sierpi´nski and Riesel. Finally, we show that if 2nk + 1 is Lehmer, then n  150 ω(k)2 log k,whereω(k)isthe number of distinct primes dividing k.

1. Introduction In 1960, Sierpi´nski [25] showed that there are infinitely many odd natural num- bers k with the property that 2nk + 1 is composite for every n; such an k is called a Sierpi´nski number in honor of his work. Two years later, J. Selfridge (unpublished) showed that 78557 is a Sierpi´nski number, and this is still the smallest known example.1 Every currently known Sierpi´nski number k possesses at least one P, which is a finite set of prime numbers with the property that 2nk + 1 is divisible by some prime in P for every n ∈ N. For example, Selfridge showed that 78557 is Sierpi´nski by proving that every number of the form 2n·78557 + 1 is divisible by a prime in P := {3, 5, 7, 13, 19, 37, 73}. When a covering set is used to show that a given number is Sierpi´nski, every natural number in a certain arithmetic progression (determined by the covering set) must also be Sierpi´nski; in particular, the set of Sierpi´nski numbers has a positive lower density. If N is a , Fermat’s little theorem asserts that (1) aN ≡ a (mod N) for all a ∈ Z. Around 1910, Carmichael [9, 10] initiated the study of composite numbers N with the same property; these are now known as Carmichael numbers. In 1994, Alford, Granville and Pomerance [1] proved the existence of infinitely many Carmichael numbers. Since prime numbers and Carmichael numbers share the property (1), it is natural to ask whether certain results for primes can also be established for Carmichael numbers; see, for example, [2,3,5,14,20,29] and the references contained therein.

Received by the editors October 1, 2012 and, in revised form, January 16, 2013. 2010 Subject Classification. Primary 11J81, 11N25; Secondary 11A07, 11A51. 1At present, there are only six smaller numbers that might have the Sierpi´nski property: 10223, 21181, 22699, 24737, 55459, 67607; see http://www.seventeenorbust.com for the most up-to-date information.

c 2014 American Mathematical Society Reverts to public domain 28 years from publication 355

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 356 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

Our work in this paper originated with the question as to whether there exist Sierpi´nski numbers k such that 2nk +1is not a Carmichael number for any n ∈ N. Since there are many Sierpi´nski numbers and only a few Carmichael numbers, it is natural to expect there are many such k. However, because the parameter n can take any positive integer value, the problem is both difficult and interesting. Later on, we dropped the condition that k be Sierpi´nski and began to study odd numbers k for which 2nk + 1 is never a Carmichael number. Our main result is the following theorem. Theorem 1. Almost all odd natural numbers k have the property that 2nk +1 is not a Carmichael number for any n ∈ N. This is proved in §2. Our proof uses results and methods from a recent paper of Cilleruelo, Luca and Pizarro-Madariaga [11], where it is shown that the bound 2 2 (2) n  22000000 τ(k) ω(k)(log k) holds for every Carmichael number 2nk + 1. Here, τ(k)isthenumberofpositive integer of k,andω(k) is the number of distinct prime factors of k. To give some perspective on this result, let v2(·) be the standard 2-adic valuation, so that − 2 v2(m)m is the odd part of any natural number m. Theorem 1 implies that the set   − − k =2 v2(n 1)(n − 1) : n is a Carmichael number has asymptotic density zero.2 By comparison, Erd˝os and Odlyzko [15] have shown that the set   − − k =2 v2(p 1)(p − 1) : p is a prime number has a positive lower density. Since the collection of Sierpi´nski numbers has a positive lower density, the fol- lowing corollary is an immediate consequence of Theorem 1. Corollary 1. There exists a set K ⊆ N of positive lower density such that for any fixed k ∈ K,thenumber2nk +1 is neither prime nor Carmichael for each n ∈ N. Riesel numbers have a similar definition to that of Sierpi´nski numbers. An odd natural number k is called a if 2nk − 1iscompositeforalln ∈ N. Such numbers were first investigated in 1956 by Riesel [24]. At present, the smallest known example is 509203.3 It is known that there are infinitely many natural numbers that are both Sierpi´nski and Riesel. Using recent results of Matom¨aki [20] and Wright [29] coupled with an extensive computer search, we prove the following result in §3. Theorem 2. Infinitely many natural numbers are simultaneously Sierpi´nski, Riesel, and Carmichael. In fact, the number of them up to x is  x1/5 for all sufficiently large x.  · − −1 Let ϕ( )betheEuler function, which is defined by ϕ(n):=n p | n(1 p )for all n ∈ N; in particular, one has ϕ(p)=p−1 for every prime p. In 1932, Lehmer [19] asked whether there are any composite numbers n such that ϕ(n) | n − 1, and the answer to this question is still unknown. We say that n is a Lehmer number if

2In [11] it is shown that 27 is the smallest number in this set. 3As of this writing, there are 55 candidates smaller than 509203 to consider; see http://www.prothsearch.net/rieselprob.html for the most recent information.

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use SIERPINSKI´ AND CARMICHAEL NUMBERS 357

n is composite and ϕ(n) | n − 1. It is easy to see that every Lehmer number is Carmichael, but there are infinitely many Carmichael numbers which are not Lehmer (see [4]). We prove the following result in §4. Theorem 3. Let k be an odd natural number. If 2nk +1 is Lehmer, then n  150 ω(k)2 log k. Remark. The situation for Lehmer numbers of the form 2nk − 1 is trivial. Indeed, when N := 2nk − 1 is Lehmer, then ϕ(N) | N − 1=2(2n−1k − 1). For n  2this implies that 4 ϕ(N), which is impossible since N is odd, squarefree and composite. Therefore, n must be 1.

Throughout the paper, we use logk x to denote the k-th iterate of the function log x := max{ln x, 1},wherelnx is the natural logarithm. We use the notation O, o, ,  with their customary meanings. Any constant or function implied by one of these symbols is absolute unless otherwise indicated.

2. Proof of Theorem 1 2.1. Preliminary estimates. Let x be a large real parameter, and put   C(x):= odd k ∈ (x/2,x]:2nk + 1 is Carmichael for some n . If S(x) ⊆ C(x) for all large x,wesaythatS(x)isnegligible if |S(x)| = o(x)as x →∞. Below, we construct a C1(x), C2(x),... of negligible subsets of C(x), and for each j  1wedenote j C∗ C \ C j (x):= (x) i(x). i=1 Theorem 1 is the statement that C(x) is itself negligible; thus, we need to show that C∗ j (x) is negligible for some j. Let Ω(n) be the number of prime factors of n, counted with multiplicity, and put   N  1(x):= k x :Ω(k) > 1.01 log2 x .  Since log2 x is the normal order of Ω(n)overnumbersn x, it follows that

(3) |N1(x)| = o(x)(x →∞).

In fact, using the Tur´an-Kubilius inequality (see [27]) one sees that |N1(x)| x/ log2 x, and stronger bounds can be deduced from results in the literature (al- though they are not needed here). Using (3) it follows that

C1(x):=C(x) ∩ N1(x) is negligible. Next, let Ω(z; n) denote the number of prime factors p ≤ z of n,countedwith multiplicity. Set   N  10 2(x):= k x :Ω(z1; k) > 2log3 x with z1 := (log x) .  ∼ Since the normal order of Ω(z1; n)overnumbersn x is log2 z1 log3 x, it follows that |N2(x)| = o(x)asx →∞; therefore,

C2(x):=C(x) ∩ N2(x) is negligible.

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 358 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

In what follows, we denote 1/2−10ε 1/2+10ε yl := x and yu := x , where 1 ε = ε(x):= . log2 x According to Tenenbaum [26, Th´eor`eme 1] (see also Ford [17, Theorem 1]) there δ+o(1)  ∈ are precisely x/(log2 x) numbers k x that have a d [yl,yu], where δ := 1 − (1+lnln2)/ ln 2; in particular, the set   N3(x):= k  x : k has a divisor d ∈ [yl,yu]

is such that |N3(x)| = o(x)asx →∞; therefore,

C3(x):=C(x) ∩ N3(x) is negligible. n For each k ∈ C(x), let n0(k) be the least n ∈ N for which 2 k +1 is a Carmichael number. For any real X  1let   F(X):= k ∈ C(x):n0(k)  X , and for any subset Q ⊆ N,letF(Q; X)bethesetofk ∈ F(X) for which there exists n  X with the property that 2nk + 1 is a Carmichael number divisible by some number q ∈ Q. Lemma 1. If X and Q are both defined in terms of x, and one has  X q−1 = o(1) and X|Q| = o(x)(x →∞), ∈Q   q then F(Q; X) = o(x) as x →∞. Proof. For fixed n  X and q ∈ Q,if2nk+1 is a Carmichael number that is divisible by q,thenk lies in the arithmetic progression −2−n mod q;thus,thenumberof such k  x cannot exceed x/q + 1. Summing over all n  X and q ∈ Q we derive that     F(Q; X)  (x/q +1) xX q−1 + X|Q| = o(x)(x →∞), nX q∈Q q∈Q as required. 

2.2. Small values of n0(k). Consider the set log x C4(x):=F(X1), where X1 := . log2 x According to Pomerance [22] there are  t/L(t) Carmichael numbers that do not exceed t,where  log t log t L(t):=exp 3 . log2 t n0(k) Since the function f(k):=2 k + 1 is one-to-one and maps C4(x)intothesetof Carmichael numbers not exceeding 2X1 x +1,wehave 2X1 x x |C4(x)| = = o(x)(x →∞). L(2X1 x) L(x)1+o(1)

In other words, C4(x) is negligible.

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use SIERPINSKI´ AND CARMICHAEL NUMBERS 359

2.3. Medium values of n0(k). Our aim in this subsection is to show that  log x S(x):=F(X2) \ F(X1) with X2 := exp log2 x C C is negligible. To do this, we define five more negligible sets 5(x),..., 9(x)and S 9 C show that (x) is contained in i=1 i(x). We denote j S∗ S \ C   j (x):= (x) i(x)(1j 9). i=1 As before, we put

10 1/2−10ε 1/2+10ε 1 z1 := (log x) ,yl := x ,yu := x ,ε:= . log2 x ε Note that X2 = x with this notation. n ∈ S∗  Let N := 2 k + 1 be a Carmichael number with k 4(x)andn X2.For any prime p dividing N we have p − 1 | N − 1=2nk (the well–known Korselt’s criterion); thus, p =2md +1 forsome m  n and some divisor d | k.Notethat d ∈ [yl,yu]sincek ∈ C3(x). Suppose that d>yu.Writingk = dd1 we see that d1  x/d < x/yu = yl. n−m n−m Furthermore, 2 d1 =(N − 1)/(p − 1) ≡ 1(modp); that is, p | 2 d1 − 1. n−m Note that 2 d1 − 1=(N − p)/(p − 1) is nonzero since N is Carmichael, hence composite. m Now let P be the set of primes of the form 2 d +1 with m  X2 and d ∈ [yu,x], and let P1 be the subset of P consisting of those primes p that divide at least one n ∈ S∗  Carmichael number N =2 k +1 withk 4(x)andn X2. In view of the above discussion we have     −  X2  2 p  (2 d1 1) e exp(2X2 yl).

p∈P1 0X2 0X2 d1yl d1yl (,d1)=(0 ,1)

 X2 X2 Here,wehaveusedthefactthat2d1 − 1  2 yl  e holds for x>x0.Since 1/2 p  yu  x for all p ∈ P, it follows that  log p 2 1/2−8ε p∈P1 4X yl 4x |P |   2 = 1 log(x1/2) log x log x

for x>x0;inparticular,X2|P1| = o(x)asx →∞. Using this inequality for |P1| we also have  |P | −17ε −1 X2 1 4x X2 p   = o(1) (x →∞). yu log x p∈P1 Applying Lemma 1 we see that the set C S∗ ∩ F P C∗ ∩ F P 5(x):= 4(x) ( 1; X2)= 4(x) ( 1; X2) is negligible. m Similarly, let P2 be the set of primes of the form 2 d +1withm  log x and d  yl. Clearly, for x>x0 we have the bound     1/2−9ε (4) |P2|  (m, d):1 m  X2,d yl  X2yl = x .

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 360 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

Therefore, X2|P2| = o(x)asx →∞.Moreover,  X |P | X p−1  2 2  x1/2−ln 2−8ε = o(1) (x →∞). 2 2log x p∈P2 Applying Lemma 1 we see that the set C S∗ ∩ F P C∗ ∩ F P 6(x):= 5(x) ( 2; X2)= 5(x) ( 2; X2) is negligible. ∈ S∗ We now take a moment to observe that for every k 6(x) one has 3 n0(k)  X3 with X3 := (log x) . n n Indeed, let 2 k + 1 be a Carmichael number such that n  X2.Ifp | 2 k +1, m then p =2 d +1 with m  log x, d  yl and d | k. Taking into account that 1/2 log x m 2logx d  yl  x  2 − 1forx>x0, it follows that 2 d +1 2 ,andso

2 2n  2nk +1 (2md +1) 22(log x) τ(k). mlog x dyl,d| k

Since k ∈ N1(x)wehave

(5) τ(k)  2Ω(k)  21.01 log2 x  (log x)0.8, and therefore, 2.8 n  2(log x)  X3 (x>x0). m Let P3 be the set of primes of the form 2 d +1withm  M and d  yl,where

M := 10 log2 x. 1/2−9ε The estimation in (4) shows that |P3|  x ;thusX3|P3| = o(x)asx →∞. Also,      −1 −m −1 4−10 ln 2 X3 p  X3 2 d  (log x) = o(1)

p∈P3 mM dyl as x →∞. By Lemma 1 it follows that the set C S∗ ∩ F P C∗ ∩ F P 7(x):= 6(x) ( 3; X3)= 6(x) ( 3; X3) is negligible. Next, let Q1 be the collection of almost primes of the form q = p1p2,where m1 m2  p1 =2 d +1,p2 =2 d +1, m1 z1. Here, M := 10 log2 x 10 and z1 := (log x) as before. Clearly, the bound     2 1/2−9ε |Q1|  (m1,m2,d):m1,m2  M, d  yl  M yl  x

holds if x>x0, and thus X3|Q1| = o(x)asx →∞.Also,     2  −1 −m −2 X3 −7 X3 q  X3 2 d  = (log x) = o(1) z1 q∈Q1 m1 d>z1 as x →∞. Applying Lemma 1 again, we see that C S∗ ∩ F Q C∗ ∩ F Q 8(x):= 7(x) ( 1; X3)= 7(x) ( 1; X3) is negligible.

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use SIERPINSKI´ AND CARMICHAEL NUMBERS 361

Similarly, let Q2 be the collection of almost primes of the form q = p1p2,where m1 m2 p1 =2 d1 +1, p2 =2 d2 +1, m1 z .Wehave  1    2 2 1−19ε |Q2|  (m1,m2,d1,d2):m1,m2  M, d1,d2  yl  M yl  x

if x>x0, hence X3|Q2| = o(x)asx →∞.Furthermore,      2  −1 −m −1 q  2 (d1d2)

q∈Q2 m1 d1=ruyl d2=rvyl r>z   1   2  r−2 u−1  (log x)−8,

r>z1 uyl and therefore  −1 −5 X3 q  (log x) = o(1) (x →∞).

q∈Q2 By Lemma 1 the set C S∗ ∩ F Q C∗ ∩ F Q 9(x):= 8(x) ( 2; X3)= 8(x) ( 2; X3) is negligible. S∗ ∅ S To conclude this subsection, we now show that 9(x)= ; this implies that (x) is contained in C1(x) ∪···∪C9(x) as claimed. S∗ ∅ ∈ S∗ Suppose on the contrary that 9(x) = .Foreachk 9(x)thereexists n n ∈ (X1,X3] such that 2 k + 1 is Carmichael; let  n mj (6) 2 k +1= (2 dj +1) j=1 be its factorization into (distinct) primes. Grouping the primes on the right side of (6) according to the size of dj ,weset 2nk +1 A := (2mj d +1) and B := . j A 1j dj z1

mj For every prime pj := 2 dj + 1 dividing A we have mj

3M 3M 2τ(k) 300(log x)2(log x)0.8 (log x)0.9 (7) A  2  2  2 2  2 (x>x0). d | k m

mj On the other hand, every prime pj := 2 dj + 1 dividing B has dj >z1.Since each mj z1]. The + numbers {d } are coprime in pairs since k ∈ C9(x); consequently, j +  dj k

pj | B

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 362 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

{ −} as the product on the left side is a divisor of k.Asforthenumbers dj ,wenote that − Ω(z ;k) 2  1  20 log3 x  (log2 x) dj z1 (log x) 2 (x>x0), where we have used the fact that k ∈ N2(x) for the second inequality. Putting everything together, we derive the bound

− 2 0.9  M+1 +  10 log2 x+1+(log2 x) τ(k) +  (log x) (8) B 2 dj dj (2 ) dj 2 k

pj | B pj | B

for all x>x0. Combining (6), (7) and (8) it follows that 0.9 2nk +1=AB  22(log x) k,  0.9 and therefore, n 2(log x) . However, since n>X1 = (log x)/ log2 x this is S∗ ∅ impossible for large x. The contradiction implies that 9(x)= as claimed. 2 2.4. Large values of n0(k). Recall that a number k is said to be powerful if p | k for every prime p dividing k.Wedenote   C10(x):= k  x : k is powerful . 1/2 By the well-known bound |C10(x)|x ,thesetC10(x) is negligible. ∈ C∗ From now on, fix k 10(x), and let n>X2 := exp((log x)/ log2 x) be such that 2nk + 1 is a Carmichael number. Also, let p =2md + 1 be a fixed prime factor of 2nk + 1. For convenience, we denote   n n N1 := and N2 := . log x N1 2 Since numbers of the form um + vn with (u, v) ∈ [0,N1] all lie in the interval 2 [0, 2nN1], and there are (N1 +1) such pairs (u, v), by the pigeonhole principle there exist (u1,v1) =( u2,v2) such that    −   2N1n  2n (u1m + v1n) (u2m + v2n) 2 =2N2. (N1 +1) − 1 N1

Put u := u1 − u2 and v := v1 − v2.Then

(9) (u, v) =(0 , 0), max{|u|, |v|}  N1, |um + vn|  2N2. Replacing u, v with u/d, v/d,whered is either gcd(u, v)or− gcd(u, v), we can further assume that (10) gcd(u, v)=1 and u  0. From the congruences (11) 2md ≡−1(modp)and2nk ≡−1(modp) we derive that 2um+vndukv ≡ (−1)u+v (mod p). Therefore, p divides the numerator of the rational number G := 2um+vndukv − (−1)u+v. We claim that G = 0. Indeed, suppose on the contrary that G =0.Sincek and d are both odd, it follows that um + vn =0anddukv =1.Ifu =0orv =0,the first equation implies that (u, v)=(0, 0), which is not allowed; hence uv =0,and by (10) we have u>0. Since u and v are coprime, the equality du = k−v implies u ∈ C | that k = k1 for some k1 > 1. As k 10(x), it follows that u = 1. Then, as d k

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use SIERPINSKI´ AND CARMICHAEL NUMBERS 363

and d = k−v, we also have v = −1, d = k,and0=um + vn = m − n,som = n. But this shows that 2nk +1 = p, which is not possible since 2nk +1 is a Carmichael number. This contradiction establishes our claim that G =0. Since p divides the numerator of G, using (9) we derive the bound | | | | | | (12) p  2 um+vn d u k v +1 22N2+1x2N1 =2(2+2/ ln 2)N2+1, whichisusedbelowandin§2.5. We also need the following: Lemma 2. Let √ 2(log x)3/2 Δ := 2 . 1 (log n)1/4 n 1/3 For x>x0, the Carmichael number 2 k +1 has no more than n prime divisors m p =2 d +1 with m>Δ1N2. Proof. With the minor modifications outlined here, this result is essentially con- tained in [11, Lemma 7]. The underlying argument is fairly standard (see, for ex- ample, [6,7,12,13,18]), although it relies on a quantitative version of the Subspace Theorem due to Evertse [16], a bound of Pontreau [23] on the number of solutions to certain S-unit equations, and Baker’s bound on linear forms in logarithms (see [21] or [8, Theorem 5]). m n Let p =2 d +1 bea primedivisorof2 k +1 with m>Δ1N2.Usingthe Euclidean algorithm, we write

(13) n = mq + r with 0  r

(15) −1 −1 (5N2+1)+(Δ N1+1)(log x)/ ln 2 2Δ N2  2 1  2 1 (x>x0). We also have the lower bound (16) p − 1=2md  2m > 2Δ1N2 . Put m q q r U := 2 d, V1 := d and V2 := (−1) 2 k.

Then, taking into account the fact that V1 + V2 = G, the inequalities (15) and (16) together imply that (log x)3 U>|V + V |Δ2 with Δ := 1 Δ2 = 2 . 1 2 2 2 1 (log n)1/2

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 364 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

Taking into account the bound (5) and the combination of [11, Lemmas 2, 3], for x>x0 we see that all but O(log2 x) of the triples (U, V1,V2) constructed in this manner satisfy the conditions of [11, Lemma 7] if the parameter δ2 in that lemma is replaced by Δ2. Following the proof, we conclude that the bound [11, Equation (47)] on the number t1t2 of such triples (U, V1,V2) can be replaced by 100μ2s t1t2  2 (x>x0) in our situation, where   −1 μ := 2 3Δ2 +1 and s := ω(k)+2.  −1  ∈ N As μ 7Δ2 and s 1.1log2 x (since k 1(x)), we see that 2  log n  log n − 100μ s 5400 5 1(x>x0). (log2 x) 3ln2 Putting everything together, it follows that the Carmichael number 2nk +1hasat  1 1/3 m most t1t2 + O(log2 x) ( 2 + o(1))n prime divisors p =2 d +1 with m>Δ1N2. The result follows.  2.5. The final argument. We continue to use notation introduced earlier.   C ∈ C∗ Put z2 := log4 x , and let 11(x) be the set of numbers k 10(x) such that 2 2 q | k for some q>z2. For any such q the number of k  x cannot exceed x/q ; summing over all q we have  |C |  x  x  x →∞ 11(x) 2 = o(x)(x ); q z2 log4 x q>z2

thus, C11(x) is a negligible set. C ∈ C∗ Next, let 12(x)bethesetofk 11(x) with the property that there is a prime q such that qz2 | k. For any such q the number of k  x does not exceed x/qz2 . Also, since z2 > 2forx>x0 and k ∈ C11(x), it follows that q  z2.Consequently,  · x x π(z2) 2x log4 x |C12(x)|    = o(x)(x →∞), z2 z2 ln 2 q 2 (log3 x) qz2

hence, C12(x) is negligible. C C∗ Finally, we put 13(x):= 12(x). To complete the proof of Theorem 1 it is enough to show that C13(x) is negligible. We begin by noting that for every k ∈ N1(x) the bound 4 n  K1 := exp((log x) ) holds whenever 2nk + 1 is Carmichael; in fact, it is an easy consequence of (2) since  0.8   τ(k) (log x) (by (5)) and ω(k) Ω(k) 1.01 log2 x. n In particular, for every k ∈ C13(x)thereexistsn ∈ [X2,K1] such that 2 k+1 is a Carmichael number. The interval [X2,K1] can be covered with at most O(log K1)= 4 O((log x) ) intervals of the form [a, 2a). Thus, if we denote by C13(a; x)thesetof n k ∈ C13(x) such that 2 k + 1 is a Carmichael number for some n ∈ [a, 2a), we have 4 |C13(x)|(log x) max |C13(a; x)|, X2aK1 hence it suffices to show that |C | x (17) max 13(a; x) 5 . X2aK1 (log x) From now on, we work to prove (17).

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use SIERPINSKI´ AND CARMICHAEL NUMBERS 365

Now, fix a ∈ [X2,K1]andk ∈ C13(a; x), and let n ∈ [a, 2a) be such that N := 2nk + 1 is Carmichael. Let P denote the set of prime divisors p =2md +1of N with m>Δ1N2.Put 2nk +1 A := p and B := . A p | 2nk+1 p∈P Since every prime p | N satisfies (12), and |P|  n1/3 by Lemma 2, we have

1/3 5/6 1/2 5/6 1/2 5N2 n 5n (log x) 10a (log x) (18) A  (2 ) =2  2 (x>x0).   0.9 Put s := log2 x and z3 := (log x) . We split the prime factors of B into three sets according to the following types: (i)Primesp =2md +1 of type I are those for which either m  a1/3,orp nj divides 2 kj +1forj =1,...,s,wherek1,...,ks are distinct numbers in C13(a; x)andn1,...,ns ∈ [a, 2a). (ii)Primesp =2md +1 oftype II have the property that 2td +1 isa prime factor of B for at most 100 values of t in the interval [m, m + z3]. (iii)Primesp of type III are prime factors of B that are neither of type I nor of type II . Factor B = B B B ,where I II III BI := p, BII := p and BIII := p. p | B p | B p | B p of type I p of type II p of type III Our approach is to show that primes of type I are small, whereas primes of type II are few in number. As for primes of type III , there may be many for a given k; however, we show that there are only a few such primes on average, and this is sufficient to finish the proof. Case 1. Primes of type I. Let p := 2md + 1 be a prime of type I.Sinced  x for all p | B,inthecasethat m  a1/3 it is easy to see that

1/3 M3 (19) m  M3 := 10a log x and p  2 (x>x0). Our goal is to show that (19) holds for every type I prime. Assuming this result for the moment and using (5), we derive the bound

2 2/3 3 M3 M τ(k) a (log x) (20) BI  2  2 3  2 (x>x0).

mM3 d | k m 1/3 Now suppose that p := 2 d +1isoftypeI with m>a , and let k1,...,ks and n1,...,ns have the properties described in (i). We claim that there are two numbers kj ,sayk1 and k2, for which there exists a prime q dividing k2 but not k1; in particular, since d divides each kj , q does not divide d. Indeed, suppose on the contrary that every kj is divisible by the primes q1,...,qt, which we order by

q1 < ···

with 0  r  t.Sincekj ∈ C11(x) ∪ C12(x)foreachj, it follows that r ··· αi,j       kj = qr+1 qt qi with 1 αi,j z2 (1 i r, 1 j s). i=1

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 366 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

As s cannot exceed the number of all such factorizations, we have (using the bound π(u)  2u/ log u for all large u)

   r  π(z2)   2 log2 x = s z2 z2 exp(2z2) (log3 x) ,

which is impossible for x>x0. This contradiction proves the claim. Next, we apply a three-dimensional analogue of the argument used in §2.4 to derive inequality (12).  1/3 { }  3 Put N3 := (2a) . Since max m, n1,n2 2a = N3 ,allnumbersoftheform ∈ 3 4 um + vn1 + wn2 with (u, v, w) [0,N3] lie in the interval [0, 3N3 ]; as there are 3 (N3 +1) such triplets (u, v, w), it follows that there exist (u1,v1,w1) =( u2,v2,w2) for which   4  −   3N3  (u1m + v1n1 + w1n1) (u2m + v2n1 + w2n2) 3 3N3. (N3 +1) − 1

Put (u, v, w):=(u1 − u2,v1 − v2,w1 − w2) =(0 , 0, 0), and note that

(21) max{|u|, |v|, |w|}  N3, |um + vn1 + wn2|  3N3. In view of the congruences

m nj 2 d ≡−1(modp)and2kj ≡−1(modp)(j =1, 2), we have um+vn1+wn2 u v w ≡ − u+v+w 2 d k1 k2 ( 1) (mod p). Therefore, p divides the numerator of the rational number

um+vn1+wn2 u v w − − u+v+w G := 2 d k1 k2 ( 1) .

We claim that G = 0. Indeed, suppose on the contrary that G =0.Sincedk1k2 is u v w odd, it follows that um + vn1 + wn2 =0,u + v + w is even, and d k1 k2 =1.Since there is a prime q that divides k2 but neither k1 nor d, it follows that w =0,and therefore um+vn1 u v − u+v 2 d k1 =( 1) . However, by the arguments of §2.4 we see this relation is not possible unless (u, v)= (0, 0); but this leads to (u, v, w)=(0, 0, 0), which is not allowed. We conclude that G =0. Since p divides the numerator of G, using (21) we derive the bound | | | | |v| |w|  um+vn1+wn2 u  3N3+1 3N3  M3 p 2 d k1 k2 +1 2 x 2 (x>x0). Since p>2m, this establishes the promised result that (19) holds for every type I prime. Case 2. Primes of type II . We first observe that every prime factor p =2md +1ofB satisfies 2a1/2(log x)1/2(log x)3/2 (22) m  Δ N  2  M := 2a1/2(log x)2, 1 2 (log n)1/2 4 2 wherewehaveusedthefactthat log x log n>log X2 = . log2 x

Let d be fixed and split the interval [0,M4] into subintervals Ij of length z3,where Ij := [jz3, (j +1)z3)forj =0,...,M4/z3.EverysuchIj contains at most 100

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use SIERPINSKI´ AND CARMICHAEL NUMBERS 367

indices m for which p =2md + 1 is a type II prime factor of 2nk + 1; these primes clearly satisfy m 2M4 p =2 d +1 2 (x>x0). Thus, for fixed d we have

2 2M4 100(M4/z3+1) 300M /z3 p  (2 )  2 4 (x>x0).

p | BII p=2md+1 Then, taking the product over all divisors d of k, we derive that

2 300M τ(k)/z3 BII  2 4 (x>x0).

Finally, using (5) and the definitions of M4 and z3, for all x>x0 we have 2 4 0.8 300M4 τ(k)  1200a(log2 x) (log x)  a 0.9 0.09 (x>x0) z3 (log x) (log x) hence we obtain the bound a/(log x)0.09 (23) BII  2 (x>x0). Case 3. Primes of type III . Combining the bounds (18), (20) and (23), we have

10a5/6(log x)1/2+a2/3(log x)3+a/(log x)0.09 a/2 ABI BII  2  2 (x>x0); therefore, since a n 2  2 k +1=AB = ABI BII BIII , it follows that a/2 (24) BIII  2 (x>x0).

We now adopt the convention that for every k ∈ C13(a; x), the number n is chosen to be the least integer in [a, 2a) such that 2nk + 1 is a Carmichael number. With this convention in mind, we use the notation BIII (k) instead of BIII to emphasize that this number depends only on k. Multiplying the bounds (24) over all k ∈ C (a; x), we get 13  s (a/2)|C13(a;x)| (25) 2  BIII (k)  p ,

k∈C13(a;x) p∈Ba

where we have used Ba to denote the collection of type III primes that divide some BIII (k) with k ∈ C13(a; x). Note that every prime in Ba is repeated no more than s times since p is not of type I. m ∈ B   1/3  1/3  Let p =2 d +1 a.Sinced x and m a X2 2logx for all 2m x>x0, it follows that p  2 . Thus, fixing m and denoting by Da,m the set of numbers d for which 2md +1∈ B , it follows that a |D | |D | (2md +1) 22m a,m  22M4 a,m ,

d∈Da,m where we used (22) for the second inequality. Taking the product over all values of m  M ,wehaveforx>x : 4 0 2 2M Da (26) p  2 4 with Da := max |Da,m|. mM4 p∈Ba

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 368 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

Hence, to get an upper bound for the product in (26), it suffices to find a uniform upper bound for Da. Observe that, as the primes in Ba are not of type II ,everyd ∈ Da,m has the t property that 2 d + 1 is prime for at least 100 values of t in the interval [m, m + z3]. Let m be fixed, and let λ1 < ···<λ100 be fixed integers in the interval [0,z3]. We m+λ begin by counting the number of d  x for which the 100 numbers 2 j d +1: 1  j  100 are simultaneously prime. By the Brun sieve, the number of such d  x is    100 x E − O , where E := (2λj λi − 1). (log x)100 ϕ(E) i

Hence, for fixed λ1 < ···<λ100 the number of possibilities for d is  x(log x)100 O 2 . (log x)100 100 90 As the number of choices for λ1,...,λ100 in [0,z3]is (z3 +1)  (log x) ,it follows that x(log x)100 |D | 2 . a,m (log x)10 Consequently, |D |  x Da := max a,m 9 (x>x0), mM4 (log x) and we have 8ax(log x)4 ax (27) 2M 2D  2  (x>x ). 4 a (log x)9 (log x)8 0 Inserting estimate (27) into (26), and combining this with (25), we see that

|C | 8 2(a/2) 13(a;x)  2axs/(log x) , and therefore 2xs 2x log x |C (a; x)|   2 (x>x ). 13 (log x)8 (log x)8 0 Since this bound clearly implies (17), our proof of Theorem 1 is complete.

3. Proof of Theorem 2 The following statement provides the key to the proof of Theorem 2. Theorem 4 (Matom¨aki). If gcd(b, m)=1and b is a quadratic residue mod m, 1/5 then for all large x there are m x Carmichael numbers up to x in the arithmetic progression b mod m.

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use SIERPINSKI´ AND CARMICHAEL NUMBERS 369

In the recent preprint [29], Wright extends the previous theorem to remove the condition on b being a quadratic residue modulo m. Precisely, he showed (under gcd(b, m) = 1) that the number of Carmichael numbers up to x that are congruent K 2 to b mod m is  x (log3 x) ,forsomeconstantK>0. Using this result would allow a somewhat easier approach to the problem, but we prefer to use Matom¨aki’s Theorem 4, since it gives a better lower bound for the count. The next proposition illustrates our approach to the proof of Theorem 2. Proposition 1. For all large x, there are  x1/5 natural numbers up to x that are both Sierpi´nski and Carmichael. Proof. In view of Theorem 4, to prove this result it suffices to find coprime b, m such that b is a quadratic residue mod m, and every sufficiently large number in the arithmetic progression b mod m is a Sierpi´nski number. C { }N Suppose that we can find a finite collection := (aj,nj; bj ,pj ) j=1 of ordered quadruples of with the following properties:

(i) n1,...,nN are natural numbers, and p1,...,pN are distinct primes; (ii) every integer lies in at least one of the arithmetic progressions aj mod nj ; nj (iii) pj | 2 − 1foreachj; aj (iv) pj | 2 bj +1foreachj; (v) bj is a quadratic residue mod pj for each j.

Put m := p1 ···pN , and let b ∈ Z be such that b ≡ bj (mod pj)foreachj.Since p1,...,pN are distinct primes, it is clear from (v)thatb is a quadratic residue mod m.Letk be an arbitrary element of the arithmetic progression b mod m that exceeds max{p1,...,pN }. For every n ∈ Z there exists j such that n ≡ aj n n (mod nj). For such j,using(iii)and(iv) one sees that pj | 2 k+1, hence 2 k+1 is composite since k>pj . As this is so for every n ∈ Z, it follows that k is Sierpi´nski. To complete the proof of the theorem it suffices to observe that C := {(1, 2; 1, 3), (2, 4; 1, 5), (4, 8; 1, 17), (8, 16; 1, 257), (28) (16, 32; 1, 65537), (32, 64; 1, 641), (0, 64; −1, 6700417)} is a collection with the properties (i) − (v).  Proof of Theorem 2. In view of Theorem 4, it suffices to find coprime b, m such that b is a quadratic residue mod m, and every sufficiently large number in the arithmetic progression b mod m is both Sierpi´nski and Riesel. C { }N C Suppose that we can find two finite collections := (aj,nj; bj ,pj ) j=1 and := { }M C (cj,mj ; dj ,qj ) j=1 such that has the properties (i)–(v) listed in Proposition 1, and C has the properties:

(vi) m1,...,mN are natural numbers, and q1,...,qN are distinct primes; (vii) the union of the arithmetic progressions cj mod mj is Z; mj (viii) qj | 2 − 1foreachj; cj (ix) qj | 2 dj − 1foreachj; (x) dj is a quadratic residue mod qj for each j. Furthermore, assume that

(xi)gcd(p1 ···pN ,q1 ···qM )=1.

Put m := p1 ···pN q1 ···qM , and let b ∈ Z be such that b ≡ bi (mod pi)fori = 1,...,N and b ≡ dj (mod qj )forj =1,...,M. Since all the primes pi and qj are distinct, it is clear from (v)thatb is a quadratic residue mod m. Arguing as in the

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 370 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

proof of Proposition 1 we see that every sufficiently large number in the arithmetic progression b mod m is both Sierpi´nski (using (iii)and(iv)) and Riesel (using (viii) and (ix)). Hence, to prove the theorem it suffices to exhibit collections C and C with the stated properties. For this, we take C to be the collection listed in (28), whereas for C we use the collection disclosed in the Appendix. 

4. Proof of Theorem 3 Let us now suppose that N := 2nk + 1 is Lehmer. We can clearly assume that n  150 log k, and by Wright [28] we must have k  3; therefore, log k n (29) 1  ω(k)  < . log 3 150 Since every Lehmer number is Carmichael, we can apply the following lemma, which is a combination of [11, Lemmas 2, 3, 4]. Lemma 3. Suppose that p =2md +1 is a prime divisor of the Carmichael number N =2nk +1,whered | k and n>3logk. (i) If d =1,thenm =2α for some integer α  0,andp1 and the numbers 2md and 2nk are multiplicatively dependent, then p<2n/3k1/3 +1. m n (iii) If d>1 and√ the numbers 2 d and 2 k are multiplicatively independent, then m<7 n log k. Moreover, N has at most one prime divisor for which (ii) holds.

Let A1,A2,A3 respectively denote the product of the primes p | N for each 2α possibility (i), (ii), (iii) in Lemma 3. If A1 > 1andp =2 + 1 is the largest prime dividing A1,thenwehave α 2j 2α+1 2 2 4 (30) A1  (2 +1)=2 − 1=(p − 1) − 1  p  k , j=0 and clearly Lemma 3 implies that n/3 1/3 n/3+1 1/3 (31) A2  2 k +1 2 k .

mj Furthermore, if the prime divisors of A3 are pj := 2 dj +1,j =1,...,r,then n d1 ···dr | ϕ(A3) | ϕ(N) | N − 1=2 k,

so we see that d1 ···dr | k and r  ω(k). Consequently, r r √ mj mj +1 (7 n log k+1)ω(k) (32) A3 = (2 dj +1) 2 dj  2 k. j=1 j=1 Combining (30), (31) and (32), it follows that √ n n/3+1+(7 n log k+1)ω(k) 16/3 2 k  N = A1A2A3  2 k . Taking the logarithm and using the inequalities of (29) we derive that n    13 log k n  +1+ 7 n log k +1 ω(k)+ 3 3ln2 n    19n  + 7 n log k ω(k)+ , 3 450 ln 2

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use SIERPINSKI´ AND CARMICHAEL NUMBERS 371

and it follows that

 − 2 19 2 n  49 − ω(k)2 log k  150 ω(k)2 log k 3 450 ln 2

as stated.

5. Appendix A The collection C that is needed for our proof of Theorem 2 (see §3) consists of the quadruples (cj,mj ; dj ,qj ) disclosed in the following tables.

cj mj dj qj c m d q j j j j 23 63 55318 92737 0 2 1 3 1 3 4 7 2 63 487243 649657 2 5 8 31 1 70 a1 p1 6 7 2 127 38 75 15604 100801 0 9 1 73 63 75 4096 10567201 0 15 1 151 3 81 2269 2593 14 21 128 337 23 25 4 601 30 81 69097 71119 3 25 1576 1801 47 81 84847359 97685839 21 27 64 262657 5 90 4120594 18837001 11 35 58 71 89 105 7154 29191 31 35 16 122921 59 105 48124 106681 24 45 22473 23311 35 45 393 631 26 105 48168 152041 a1 := 290641821624556480; p1 := 581283643249112959

cj mj dj qj 38 135 43817595232267 49971617830801 39 135 41 271 66 135 41811 348031 51 150 1133819953185 1133836730401 29 162 134527 135433 137 162 33554432 272010961 158 175 12419 39551 8 175 30170438 60816001 33 175 a2 p2 155 189 1072100 1560007 92 189 a3 p3 51 210 247125 664441 179 210 412036 1564921

a2 := 311219987433457559260630 p2 := 535347624791488552837151 a3 := 44183558259521350402959571 p3 := 207617485544258392970753527

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 372 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

cj mj dj qj 93 225 68316 115201 168 225 111534 617401 183 225 196089342 1348206751 141 225 5524543637190621 13861369826299351 65 270 14107 15121 134 315 465324 870031 44 315 944338 983431 296 315 524288 29728307155963706810228435378401 245 405 421858 537841 155 405 794228530486264 11096527935003481 219 405 a4 p4 33 450 4714696801 4714696801 143 450 a5 p5 231 525 2325 4201 458 525 3644 7351 336 525 108146490 181165951 21 525 a6 p6 138 567 a7 p7 518 675 a8 p8 68 675 a9 p9 a4 := 5374027197450830037173993714239791208197682 p4 := 17645665556213400107370602081155737281406841 a5 := 277105769675251661059822497 p5 := 281941472953710177758647201 a6 := 130389571378501740404359908566659664918592879449898771616 p6 := 325985508875527587669607097222667557116221139090131514801 a7 := 341757923201050642765095988830864709188696407521745483998618851 28941214865520182674355385966526465 p7 := 341757923201050642765096006499335356972539703354720491427804009 56425111741139140798213387072831489 a8 := 1086551216887830778103354063694 p8 := 1094270085398478390395590841401 a9 := 375881803356253828783891377794842091038 p9 := 470390038503476855180627941942761032401

cj mj dj qj 668 675 128 2842496263188647640089794561760551 68 675 378466 1605151 293 675 31900530 289511839 83 810 2980 9721 141 810 1619 6481 425 810 1113369644664597 1969543281137041 29 945 a10 p10 96 945 a11 p11 96 1575 79759849 82013401 1356 1575 21286182334 32758188751 344 1575 27829883893510195 76641458269269601 233 1575 a12 p12 411 1575 a13 p13 1806 2025 29194 81001 1191 2025 375769199 429004351 1131 2025 a14 p14 a10 := 50835936807709736817104784421509870 p10 := 124339521078546949914304521499392241 a11 := 59062237672015342892330136827234845353476843214908095835470998053274 553710744754308864210671730 p11 := 89371283318924988713544642472309024678004403189516730060412595564942 724011446583991926781827601 a12 := 499918989349861832576268113521739 p12 := 764384916291005220555242939647951 a13 := 415411639487789290827522873736236492723576906851307827673621379441482 p13 := 745832506848141808511611576240568244832258614550704416204357517716551 a14 := 462022372600473167169237015384303310307 p14 := 2029839982282855554442383177052070534551.

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use SIERPINSKI´ AND CARMICHAEL NUMBERS 373

6. Appendix B We conclude with examples of Sierpi´nski-Carmichael, Riesel-Carmichael, and Sierpi´nski-Riesel-Carmichael numbers. The idea behind the construction is the same for each of the three examples. We construct a Carmichael number of the form N = f(t)=(2t + 1)(4t + 1)(6t + 1), where each of the factors 2t +1,4t +1 and 6t + 1 is prime. We can then check that N is Carmichael since 2t,4t and 6t are easily seen to be factors of N − 1. What remains is to construct the coverings necessary to produce Sierpi´nski or Riesel numbers (or both): we have called the elements in these coverings (cj ,mj; dj ,qj ) throughout this article. The final step is to solve the congruence f(tj) ≡ dj (mod qj ). Thus, we have an additional column for tj in the tables presented below. Sierpi´nski-Carmichael number. Let f(t)=(6t + 1)(12t + 1)(18t +1).

cj mj dj qj tj 1 2 1 3 0 2 4 1 5 0 4 8 1 17 0 8 16 1 257 0 16 32 1 65537 0 0 48 96 97 76 16 24 226 241 42 32 96 655316 2225377 9066929

Now observe that (cj ,mj) forms a covering, t = 1034170868575402949878725 satisfies all the congruences tj (mod qj ), and that f(t) ≡ dj (mod qj )foreachj. Thus, for this value of t, f(t)isSierpi´nski. To see that f(t) = 1433447863276475102293771681784302201846076475365432242305613689102632631601 is also Carmichael, notice that 6t + 1 = 6205025211452417699272351, 12t +1 = 12410050422904835398544701, and 18t + 1 = 18615075634357253097817051 are all prime, and f(t) − 1 is divisible by 6t,12t,and18t. Riesel-Carmichael number. Let f(t)=(2t + 1)(4t + 1)(6t +1).

cj mj dj qj tj 0 2 1 3 0 0 3 1 7 0 4 9 32 73 1 5 12 11 13 5 7 8 2 17 11 11 18 14 19 11 25 36 13 37 22 11 48 53 97 44 1 36 55 109 28 19 24 32 241 73 3 16 225 257 196 37 48 29 673 210

Again, the congruences cj (mod mj) form a covering. Moreover, observe that t = 383045479078858981706118 satisfies all the congruences tj (mod qj ), and that f(t) ≡ dj (mod qj )foreachj. Thus, for this value of t, f(t) is Riesel. To see that f(t) = 2697691354484186943747008650234933049993410660498697822360729113096591609 is also Carmichael, notice that 2t + 1 = 766090958157717963412237, 4t +1 = 1532181916315435926824473, and 6t + 1 = 2298272874473153890236709 are all prime, and f(t) − 1 is divisible by 2t,4t,and6t.

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 374 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

Sierpi´nski-Riesel-Carmichael number. Let f(t)=(2t + 1)(4t + 1)(6t +1).

cj mj dj qj tj 1 2 1 3 0 0 4 4 5 3 6 12 1 13 0 4 9 41 73 8 10 18 10 19 1 2 24 60 241 91 14 36 16 37 14 34 36 105 109 1 38 72 325 433 91 62 72 37713 38737 1256 0 2 1 3 0 0 3 1 7 0 0 5 1 31 0 5 8 8 17 10 1 10 6 11 1 2 15 38 151 32 11 16 32 257 141 3 20 36 41 26 7 30 75 331 196 3 32 57345 65537 51629 9 40 59633 61681 59393 7 48 72 97 54 19 48 641 673 224 59 60 2 61 26 13 60 1028 1321 129 79 80 2 4278255361 1351662299 113 120 128 4562284561 3018421270

In the table above, the congruence cj (mod mj ) in the top part of the table form a covering, and the congruences in the bottom part of the table form a separate covering. The integer t = 1338979105545414811992186692235778298273840303222085925082378476296462844923 satisfies all of the congruences tj (mod qj ) in the entire table. Thus, f(t) ≡ dj (mod qj ) for both the top and bottom parts of the table. This implies that f(t)is both Sierpi´nski (from the top part) and Riesel (from the bottom part). Finally, f(t) = 115229224052855887100756588659264307276443422419402462627311319917631839876768− 543292399537807831615677851203822707234896300064793740772960178584232868017442980971− 810181759397938835296681335113793727167516391877007957575147486369 is Carmichael, since the factors 2t + 1 = 2677958211090829623984373384471556596547680606444171850164756952592925689847, 4t+1 = 5355916422181659247968746768943113193095361212888343700329513905185851379693, and 6t + 1 = 8033874633272488871953120153414669789643041819332515550494270857778777069539 are all prime, and f(t) − 1 is divisible by 2t,4t,and6t.

Acknowledgments The authors thank the referee for a careful reading of the manuscript and for use- ful suggestions, and Jan-Hendrik Evertse for helpful advice and for providing some references. They also thank Pedro Berrizbeitia for an enlightening conversation. The third-named author was supported in part by Project PAPIIT 104512 and

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use SIERPINSKI´ AND CARMICHAEL NUMBERS 375

a Marcos Moshinsky fellowship. The fourth-named author would like to acknowl- edge support from NSF grant DMS-1001180. The fifth-named author acknowledges sabbatical support from the Naval Postgraduate School.

References

[1] W. R. Alford, Andrew Granville, and Carl Pomerance, There are infinitely many Carmichael numbers, Ann. of Math. (2) 139 (1994), no. 3, 703–722, DOI 10.2307/2118576. MR1283874 (95k:11114) [2] William D. Banks, Carmichael numbers with a square totient, Canad. Math. Bull. 52 (2009), no. 1, 3–8, DOI 10.4153/CMB-2009-001-7. MR2494305 (2010d:11107) [3] William D. Banks, Carmichael numbers with a totient of the form a2 + nb2, Monatsh. Math. 167 (2012), no. 2, 157–163, DOI 10.1007/s00605-011-0306-4. MR2954522 [4] William D. Banks, C. Wesley Nevans, and Carl Pomerance, A remark on Giuga’s conjec- ture and Lehmer’s totient problem, Albanian J. Math. 3 (2009), no. 2, 81–85. MR2515950 (2010e:11086) [5] William D. Banks and Carl Pomerance, On Carmichael numbers in arithmetic progressions, J. Aust. Math. Soc. 88 (2010), no. 3, 313–321, DOI 10.1017/S1446788710000169. MR2661452 (2011i:11146) [6] Yann Bugeaud, Pietro Corvaja, and Umberto Zannier, An upper bound for the G.C.D. of an − 1 and bn − 1, Math. Z. 243 (2003), no. 1, 79–84, DOI 10.1007/s00209-002-0449-z. MR1953049 (2004a:11064) [7] Yann Bugeaud and Florian Luca, A quantitative lower bound for the greatest prime factor of (ab +1)(bc +1)(ca + 1), Acta Arith. 114 (2004), no. 3, 275–294, DOI 10.4064/aa114-3-3. MR2071083 (2005j:11069) [8] Yann Bugeaud, Maurice Mignotte, and Samir Siksek, Classical and modular approaches to exponential Diophantine equations. I. Fibonacci and Lucas perfect powers, Ann. of Math. (2) 163 (2006), no. 3, 969–1018, DOI 10.4007/annals.2006.163.969. MR2215137 (2007f:11031) [9] R. D. Carmichael, Note on a new number theory function, Bull. Amer. Math. Soc. 16 (1910), no. 5, 232–238, DOI 10.1090/S0002-9904-1910-01892-9. MR1558896 [10] R. D. Carmichael, On Composite Numbers P Which Satisfy the Fermat Congruence aP −1 ≡ 1modP ,Amer.Math.Monthly19 (1912), no. 2, 22–27, DOI 10.2307/2972687. MR1517641 [11] Javier Cilleruelo, Florian Luca and Amalia Pizarro-Madariaga, Carmichael numbers in the n sequence {2 k +1}n1, Math. Comp., to appear. [12] Pietro Corvaja and Umberto Zannier, On the greatest prime factor of (ab +1)(ac +1),Proc. Amer. Math. Soc. 131 (2003), no. 6, 1705–1709 (electronic), DOI 10.1090/S0002-9939-02- 06771-0. MR1955256 (2003j:11074) [13] Pietro Corvaja and Umberto Zannier, A lower bound for the height of a rational function at S-unit points, Monatsh. Math. 144 (2005), no. 3, 203–224, DOI 10.1007/s00605-004-0273-0. MR2130274 (2005k:11140) [14] Aaron Ekstrom, Carl Pomerance, and Dinesh S. Thakur, Infinitude of elliptic Carmichael numbers, J. Aust. Math. Soc. 92 (2012), no. 1, 45–60, DOI 10.1017/S1446788712000080. MR2945676 [15] P. Erd˝os and A. M. Odlyzko, On the density of odd integers of the form (p−1)2−n and related questions, J. Number Theory 11 (1979), no. 2, 257–263, DOI 10.1016/0022-314X(79)90043-X. MR535395 (80i:10077) [16] Jan-Hendrik Evertse, An improvement of the quantitative subspace theorem,Compositio Math. 101 (1996), no. 3, 225–311. MR1394517 (97e:11080) [17] Kevin Ford, The distribution of integers with a divisor in a given interval,Ann.ofMath.(2) 168 (2008), no. 2, 367–433, DOI 10.4007/annals.2008.168.367. MR2434882 (2009m:11152) [18] Santos Hern´andez and Florian Luca, On the largest prime factor of (ab +1)(ac +1)(bc +1), Bol. Soc. Mat. Mexicana (3) 9 (2003), no. 2, 235–244. MR2029272 (2004i:11028) [19] D. H. Lehmer, On Euler’s totient function, Bull. Amer. Math. Soc. 38 (1932), no. 10, 745–751, DOI 10.1090/S0002-9904-1932-05521-5. MR1562500 [20] K. Matom¨aki, Carmichael numbers in arithmetic progressions, J. Aust. Math. Soc. 94 (2013), no. 2, 268–275. DOI 10.1017/S1446788712000547. MR3109747

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 376 W. BANKS, C. FINCH, F. LUCA, C. POMERANCE, AND P. STANIC˘ A˘

[21] E. M. Matveev, An explicit lower bound for a homogeneous rational linear form in logarithms of algebraic numbers. II (Russian, with Russian summary), Izv. Ross. Akad. Nauk Ser. Mat. 64 (2000), no. 6, 125–180, DOI 10.1070/IM2000v064n06ABEH000314; English transl., Izv. Math. 64 (2000), no. 6, 1217–1269. MR1817252 (2002e:11091) [22] Carl Pomerance, On the distribution of ,Math.Comp.37 (1981), no. 156, 587–593, DOI 10.2307/2007448. MR628717 (83k:10009) G2 [23] Corentin Pontreau, A Mordell-Lang plus Bogomolov type result for curves in m, Monatsh. Math. 157 (2009), no. 3, 267–281, DOI 10.1007/s00605-008-0028-4. MR2520729 (2010e:11060) [24] H. Riesel, Nagra stora primtal,Elementa39 (1956), 258–260. [25] Waclaw Sierpi´nski, Sur un probl`eme concernant les nombres k · 2n + 1 (French), Elem. Math. 15 (1960), 73–74. MR0117201 (22 #7983) [26] G´erald Tenenbaum, Sur la probabilit´e qu’un entier poss`ede un diviseur dans un intervalle donn´e (French), Compositio Math. 51 (1984), no. 2, 243–263. MR739737 (86c:11009) [27] Paul Tur´an, On a Theorem of Hardy and Ramanujan, J. London Math. Soc. S1-9, no. 4, 274, DOI 10.1112/jlms/s1-9.4.274. MR1574877 [28] Thomas Wright, The impossibility of certain types of Carmichael numbers, Integers 12 (2012), no. 5, 951–964, DOI 10.1515/integers-2012-0016. MR2988558 [29] Thomas Wright, Infinitely many Carmichael numbers in arithmetic progressions, Bull. Lond. Math. Soc. 45 (2013), no. 5, 943–952, DOI 10.1112/blms/bdt013. MR3104986

Department of Mathematics, University of Missouri, Columbia, Missouri 65211 E-mail address: [email protected] Department of Mathematics, Washington and Lee University, Lexington, Virginia 24450 E-mail address: [email protected] School of Mathematics, University of the Witwatersrand, P.O. Box Wits 2050, South Africa and Mathematical Institute, UNAM Juriquilla, Santiago de Queretaro´ 76230, Queretaro´ de Arteaga, Mexico´ E-mail address: [email protected] Department of Mathematics, Dartmouth College, Hanover, New Hampshire 03755- 3551 E-mail address: [email protected] Department of Applied Mathematics, Naval Postgraduate School, Monterey, Cali- fornia 93943 E-mail address: [email protected]

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use