Prime Divisors of Palindromes William D. Banks Department of Mathematics, University of Missouri Columbia, MO 6511 USA bbanks@math.missouri.edu Igor E. Shparlinski Department of Computing, Macquarie University Sydney, NSW 109, Australia igor@ics.mq.edu.au Abstract In this paper, we study some divisibility properties of palindromic numbers in a fixed base g. In particular, if P L denotes the set of palindromes with precisely L digits, we show that for any sufficiently large value of L there exists a palindrome n P L with at least log log n 1+o1 distinct prime divisors, and there exists a palindrome n P L with a prime factor of size at least log n +o1. 1 Introduction For a fixed integer base g, consider the base g representation of an arbitrary natural number n N: L 1 n = a k ng k, 1 k=0 where a k n {0, 1,..., g 1} for each k = 0, 1,..., L 1, and the leading digit a L 1 n is nonzero. The integer n is said to be a palindrome if its digits satisfy the symmetry condition: a k n = a L 1 k n, k = 0, 1,..., L 1. 1
It has recently been shown in [1] that almost all palindromes are composite. For any n N, the number L in 1 is called the length of n; let P L N denote the set of all palindromes of length L. In this paper, as in [1], we estimate exponential sums of the form S q L; c = n P L e q cn, where as usual e q x = expπix/q for all x R. Using these estimates, we show that for all sufficiently large values of L, there exists a palindrome n P L with at least log log n 1+o1 distinct prime divisors, and there exists a palindrome n P L with a prime factor of size at least log n +o1. Throughout the paper, all constants defined either explicitly or implicitly via the symbols O, Ω, and may depend on g but are absolute otherwise. We recall that, as usual, the following statements are equivalent: A = OB, B = ΩA, A B, and B A. We also write A B to indicate that B A B. Acknowledgements. The authors wish to thank Florian Luca for some useful conversations. Most of this work was done during a visit by the authors to the Universidad de Cantabria; the hospitality and support of this institution is gratefully acknowledged. W. B. was supported in part by NSF grant DMS-007068, and I. S. was supported in part by ARC grant DP011459. Preliminary Results For every natural number q with gcdq, g = 1, we denote by t q the order of g in the multiplicative group modulo q. For arbitrary integers a, b, K with K 1 we consider the exponential sums T q a, b = t q e q ag k + bg k and T q K; a, b = where the inversion g k is taken in the residue ring Z q. K e q ag k + bg k, Lemma 1. Let S be a set of primes coprime to g, with gcdt p1, t p = 1 for all distinct p 1, p S. Then for the integer q = p S p one has T q a, b = p S T p a, b.
Proof. Consider the Kloosterman sums K χ a, b; q = χc e q ac + bc 1 c q gcdc,q=1 as χ varies over the multiplicative characters of Z q. Denoting by X q the group of all such characters for which χg = 1, as in the proof of Lemma.1 of [1] one has T q a, b = t q ϕq χ X q K χ a, b; q. Because of the assumed property of the set S, we see that t q = p S t p, and therefore #X q = ϕq = ϕp = #X p. t q t p p S p S By duality theory, it follows that X q is the direct product of the groups {X p : p S}, hence every character χ X q has a unique decomposition χ = p S χ p where χ p X p for each p S. By the well known multiplicative property of Kloosterman sums, K χ a, b; q = p S K χp a, b; p, and therefore T q a, b = t q ϕq The result follows. χ X q p S K χp a, b; p = p S t p ϕp χ p X p K χp a, b; q. Lemma. Let S be a set of primes p such that p z, p 3 mod 4, gcdp, gg 1 = 1, and t p = Ωlog p for every p S. Suppose that gcdt p1, t p for all distinct p 1, p S. If z is sufficiently large, then for some absolute constant A > 0 and all a, b Z one has where q = p S p. Tq a, b tq p S gcda,b,p=1 1 3 A log plog log p 5,
Proof. If t q is odd, then gcdt p1, t p = 1 for all distinct p 1, p S, thus t q = p S t p. By Lemma 1, we also have T q a, b = p S T p a, b. Moreover, T p a, b = t p p 1 x Z p e p ax p 1/t p + bx p 1/tp for all p S. If gcda, b, p = 1, then since t p = Ωlog p, Theorem 1.1 of [] implies that the estimate e p ax p 1/t p + bx p 1/tp A p 1 1 log plog log p 5 x Z p holds for some absolute constant A > 0 provided that z is large enough. On the other hand, T p a, b = t p if gcda, b, p = p. This completes the proof in the case that t q is odd. If t q is even, then the multiplicative order of g modulo q is τ q = t q /, and for each p S the multiplicative order of g modulo p is τ p = t p / or τ p = t p according to whether t p is even or odd, respectively. Since each prime p S is congruent to 3 mod 4, it follows that τ p is odd, and we have τ q = p S τ p. We now write T q a, b = τ q e q af k + bf k + τ q e q agf k + bg 1 f k where f = g. Noting that τ p = Ωlog p for all p, we can apply the preceding argument to both of these sums with g replaced by g, and we derive the stated result in the case that t q is even. 4
Lemma 3. If y is sufficiently large, there is a set S [ylogy, y] of primes p with p 3 mod 4 and gcdp, gg 1 = 1, of cardinality at least #S = Ωy 1/4 log y, such that gcdt p1, t p for any distinct p 1, p S, and t p p 1/4 for all p S. Proof. According to Lemma 1 of [3] taking k = 1, u = 3 and v = 16 in that lemma, for every sufficiently large value of y there are at least Ωy/ log y primes p y with p 3 mod 16 such that either p = r 1 r + 1 where r 1, r y 1/4 are primes, or p = r 0 + 1 where r 0 is a prime. Clearly, the interval [ylog y, y] also contains a set L of Ωy/ log y such primes. Note that for y large enough, we have that p gg 1 for each p L. Take the smallest such prime p 1 L and put it into the set S. Next, remove all primes p L for which gcdp 1, p 1 1 > ; since this condition implies that gcdp 1, p 1 1 y 1/4, we remove at most Oy 3/4 such primes at this step. Now take the smallest remaining prime p L and add it to S, then remove the Oy 3/4 primes p L for which gcdp 1, p 1 >. Continuing in this manner, we eventually put Ω#Ly 3/4 = Ωy 1/4 log y primes into the set S. Noting that each t p > and t p p 1, it follows that t p y 1/4 p 1/4 for every p S. We also need the following bound for incomplete sums: Lemma 4. For any prime p with gcdp, g = 1 and any natural number K t p, the following bound holds: max Tp K; a, b p 1/ log p. gcda,b,p=1 Proof. It is easy to see that for any h = 0,...,t p, t p e p ag k + bg k e tp hk = t p e p ax p 1/t p + bx p 1/tp χx p 1 x F p where χx is a certain multiplicative character on F p. Applying the Weil bound to the last sum see Example 1 in Appendix 5 of [6]; also Theorem 3 of Chapter 6 in [4], and Theorem 5.41 and the comments to Chapter 5 in [5], we derive that t p e p ag k + bg k e tp hk p 1/. Now using the standard reduction from complete sums to incomplete ones, we obtain the desired result. 5
A relation between the sums S q L; c and T q K; a, b has been found in [1] which we now present in a slightly modified form. Lemma 5. Let K = L/. Then Sq L; c g g 1 + 1 K Tq K; c, cg L 1 K/. Proof. As in the proof of Lemma 3.1 of [1] we have Sq L; c K g 1 g e q ac g k + g L 1 k. a=0 Then, using the arithmetic-geometric mean inequality, we derive that Sq L; c g 1 K = g 1 K K g 1 e q ac g k + g L 1 k g 1 a,b=0 a,b=0 K/ K/ K e q ca b g k + g L 1 k. Estimating each inner sum trivially as K for all a and b except for a = 1, b = 0, we obtain the desired statement. 3 Exponential Sums with Palindromes Theorem 6. There exists a constant B > 0 such that for all sufficiently large values of L and any prime p L / log 4 L such that gcdp, gg 1 = 1, the following bound holds: max Sp L; c #PL exp L/ log plog log p B. gcdc,p=1 Proof. Taking K = L/, we have by Lemma 5: Sp L; c g g 1 + 1 K Tp K; c, cg L 1 K/. 6
Suppose that gcdc, p = 1. Let us write K = Qt p + R where Q 0 and 0 R < t p. Let us first consider the case K t p. Since p g tp 1, it is clear that t p = Ωlog p; using Theorem 1.1 of [] as in the proof of Lemma, it follows that for all sufficiently large primes p, Tp c, cg L 1 tp 1 1 log plog log p C 0 for some constant C 0 > 0. Moreover, for any prime p coprime to gg 1, it is clear that t p 1 and that Tp c, cg L 1 < tp. Therefore, adjusting the value of C 0 if necessary, we see that the bound 3 holds for every prime p such that gcdp, gg 1 = 1. Thus, in the case that K t p we have Tp K; c, cg L 1 = Q Tp c, cg L 1 + Tp R; c, cg L 1 1 Qt p 1 + R = K log plog log p C 0 Qt p log plog log p C 0 K 1 When K < t p we apply Lemma 4 to deduce that Tp K; c, cg L 1 p 1/ log p Klog p 1, 1 log plog log p C 0 since K L p 1/ log p. Thus, in this case, we have a much stronger bound. Therefore, for sufficiently large p, g 1 + 1 Tp K; c, cg L 1 K g 1 log plog log p C 0 g 1 exp g log plog log p C 0 Using this estimate in together with the obvious relation #P L g L/, we derive the stated result. 7. 3.
4 Congruences with Palindromes Let us denote P L q = { n P L : n 0 mod q }. Proposition 4. of [1] asserts that if gcdq, gg 1 = 1, then for L 10 + q log q the following asymptotic formula holds: #P L q = #P L #PL + O exp L. q q q Here we obtain a nontrivial bound on #P L q without any restrictions on the size or the arithmetic structure of q. Theorem 7. For all positive integers L and q, the following bound holds: #P L q #P L q 1/. Proof. Let r be the largest integer for which r L mod and g r q. Clearly, g r q. We observe that every palindrome n P L can be expressed in the form n = g L+r/ k 1 + g L r/ m + k where k 1, k < g L r/, g L r/ k 1 + k is a palindrome of length L r, and m < g r. Note that for each choice of k, the value of k 1 is uniquely determined by the palindromy condition. Let d = gcdq, g. If n P L is divisible by q, then d k ; since k 0 there are at most g L r/ /d choices for k. Since g r q, it follows that for each choice of k there are at most d values of m < g r such that the congruence g L+r/ k 1 + g L r/ m + k 0 mod q holds. Therefore, #P L q g L r/ #P L q 1/. 5 Prime Divisors of Palindromes Let ωn denote the number of distinct prime divisors of an integer n. Theorem 8. For all sufficiently large L, there is a palindrome n whose length is L and for which log log n ωn = Ω. log log log n 8
Proof. Define y by the equation C 1 y 1/4 log y 1 = log L, where C 1 is the constant implied by the Ω-symbol in Lemma 3, and let S be a set of primes of cardinality #S = C 1 y 1/4 log y with the properties stated in that lemma. Putting q = p S p, by Lemma we see that max Tq a, b C tq 1 gcda,b,q<q log ylog log y 5 for some constant C > 0 provided that L is large enough. In particular, supposing that gcdc, q = 1, we obtain the estimate Tq c, cg L 1 C tq 1 4 log ylog log y 5 since gcdg, q = 1 for sufficiently large L. Taking K = L/, we have by Lemma 5: Sq L; c g g 1 + 1 Tq K; c, cg L 1 K/. 5 K As in the proof of Theorem 6, we now write K = Qt q +R with integers Q 0 and 0 R < t q. Because K = L/ t q 1/ t q we have Q 1. Thus, provided that L is large enough, using 4 we derive T q K; c, c = Q T q c, c + T q R; c, c C Qt q 1 + R log ylog log y 5 C Qt q = K log ylog log y K C, 5 log ylog log y 5 since Qt q Q > R. Applying this to 5, it follows that Sq L; c #PL exp C 4 L/ log ylog log y 5 9
for some constant C 4 > 0, provided that gcdc, q < q and L is sufficiently large. Now let us denote P L q, a = { n P L : n a mod q }. 6 By the same arguments given in the proof of Proposition 4. of [1], it is easily shown that the preceding estimate implies #P L q, a = #P L q + O #P L exp C 4 L/ log yloglog y 5. In particular P L q, 0 > 0 for sufficiently large L. Taking any n P L q, 0 we obtain ωn ωq #S = Ωy 1/4 log y, and since L log n the result follows. Theorem 9. There is a constant C > 0 such that for all sufficiently large L p p L log L C gcdp,gg 1=1 n P L n Proof. Repeating the same arguments as in the proof of Proposition 4.1 of [1], we derive from Theorem 6 that #P L p, a = #P L p + O #P L exp L/ log plog log p B where, B is defined in Theorem 6 and as before, P L p, a is defined by 6. In particular, #P L p, 0 > 0 provided that L is large enough. Theorem 9 immediately implies that L ω = Ω. log L C n P L n We now use Theorem 7 to derive a more precise result. Theorem 10. For all sufficiently large L, L ω = Ω. log L n P L n 10
Proof. Let W = n P L n, s = ωw. For each prime p, we denote by r p the exact power of p dividing W; then and this implies that n P L n = r p = p rp, p W #P L p α. α=1 By Theorem 7 we have the estimate thus, #P L p W r p #P L α=1 p α/ #P L p 1/ ; log p p r 1/ p log p = log W Lg L. p W Denoting by p j the j-th prime number, we obtain L p W which finishes the proof. log p p 1/ s j=1 log p j p 1/ j s log s 1/ 6 Remarks It is an open question posed in [1] as to whether there exist infinitely many prime palindromes in a given base g, and the solution appears to be quite difficult. Indeed, since the collection of palindromes in any base forms a set as thin as that of the square numbers, this question is likely to be as difficult as that of showing the existence of infinitely many primes of the form p = n + 1. At the present time, however, even the question as to whether there exist infinitely squarefree palindromes remains open. 11
References [1] W. Banks, D. Hart and M. Sakata, Almost all palindromes are composite, to appear in Math. Res. Lett. [] T. Cochrane, C. Pinner and J. Rosenhouse, Bounds on exponential sums and the polynomial Waring problem mod p, J. London Math. Soc. 67 003 no., 319 336. [3] D. R. Heath-Brown, Artin s conjecture for primitive roots, Quart. J. Math., 37 1986, 7 38. [4] W.-C. W. Li, Number theory with applications, World Scientific, Singapore, 1996. [5] R. Lidl and H. Niederreiter, Finite fields, Cambridge University Press, Cambridge, 1997. [6] A. Weil, Basic number theory, Springer-Verlag, New York, 1974. 1