aa r X i v : . [ m a t h . N T ] O c t DIGITS OF PRIMES
JAMES MAYNARD
Abstract.
We discuss some different results on the digits of prime numbers,giving a simplified proof of weak forms of a result of Maynard and Mauduit-Rivat. Introduction: Counting primes
Many problems in prime number theory can be phrased as ‘given a set A ofintegers, how many primes are there in A ?’. Two famous examples are whetherthere are infinitely many primes of the form n + 1, and whether there is alwaysa prime between two consecutive squares. Here ‘how many’ might be asking forat least one prime, whether there are finitely many or infinitely many primes, oran asymptotic estimate for the number of primes in A of size depending on someparameter x .Typically in analytic approaches to such questions, one tries to count the numberof primes in a set A of a given size. Almost all our approaches rely on the followingrough principle, originally due to Vinogradov but with important refinements dueto many authors including Fouvry, Friedlander, Harman, Heath-Brown, Iwaniec,Linnik, Vaughan, as well as many others (see [9] for more details). Principle.
Given a set of integers
A ⊆ [1 , x ] , you can count the number of primesin A if you are ‘good’ at counting • The number of elements of A in arithmetic progressions to reasonably largemodulus (at least on average). • Certain bilinear sums associated with the set A . Here we have been deliberately vague as to what we mean by ‘good’, ‘reasonablylarge’, or the bilinear sums, since these can vary from application to application.To give a brief indication as to why such a principle might hold, we see that byinclusion-exclusion on the smallest prime factor P − ( n ) of n we have { p ∈ A : p > x / } = { n ∈ A : P − ( n ) > x / }− X x /
1. By iterating such identities, we cantherefore obtain combinatorial decompositions for the number of primes in A whichcan be estimated by using our knowledge of A in arithmetic progressions or certainbilinear sums over moderately large variables whose product lies in A .Typically it is rather harder to estimate the bilinear sums associated to a set A than it is to estimate A in arithmetic progressions, and particularly so if A issparse in the sense that it contains O ( x − ǫ ) elements. (We fail to prove the n + 1conjecture precisely because we have no way of estimating the bilinear terms- thesparsity of the sequence means that it is insufficient to consider bilinear sums withgeneral coefficients in this case.) Moreover, the condition nm ∈ A in the bilinearsums is difficult to handle unless A has some ‘multiplicative structure’. This is whythe only sparse polynomials known to take infinitely many prime values (such asthe result of Friedlander-Iwaniec [ ? ] on primes of the form X + Y ) are closelyassociated to norm forms which have such multiplicative structure.2. Digital properties of primes
The aim of this article is to discuss some results on primes in sets A describedby their digit properties. Such sets are interesting from a technical point of viewsince they do not possess an obvious multiplicative structure; the digital propertiesof two integers n and m are in general not closely related to the digital propertiesof nm , since carries will destroy any simple structure. Nevertheless, we are able tocount primes in various sets A defined in terms of the digits of integers, even insituations when the set A is sparse.In particular, for our discussion we focus on the following three results: Theorem 2.1 (Mauduit-Rivat [11]) . Let s b ( n ) denote the sum of digits of n inbase b .Then for any fixed choice of ( m, b −
1) = 1 , we have { p < x : s b ( p ) ≡ a (mod m ) } = (1 + o (1)) xm log x . In particular, the result of Mauduit-Rivat shows that asymptotically 50% ofprimes have an even sum of digits, and 50% of primes have an odd sum of digitswhen viewed in base 10.
Theorem 2.2 (Bourgain [1]) . Let c > be a sufficiently small constant, and k bea sufficiently large integer. Then for any index set I ⊆ { , . . . , k } with I ≤ ck ,and for any choice of base-2 digits ǫ i ∈ { , } we have n p = k X i =0 n i i : n i ∈ { , } , n j = ǫ j for j ∈ I o = (1 + o (1)) 2 k − I log 2 k . The result of Bourgain shows that you can prescribe a positive proportion ofthe binary digits (of numbers with k digits), and regardless of which digits areprescribed we can still find primes with the prescribed digits. IGITS OF PRIMES 3
Theorem 2.3 (Maynard [13]) . There are constants < c < C such that for anychoice of a ∈ { , . . . , b − } and for any x > b ≥ , we have c x log( b − / log b log x ≤ { p < x : p has no base b digit equal to a } ≤ C x log( b − / log b log x . In particular, this shows that there are infinitely many primes which have nodigit equal to 7 in their decimal expansion.We aim to give a unified treatment to simplified forms of these results, empha-sising the properties we are using to count primes. In particular, we aim to givefairly complete proofs of Theorem 2.1 and Theorem 2.3 in the case when the base b is a sufficiently large constant, and give a sketch of Bourgain’s result when workingwith a base b which is sufficiently large. Specifically we prove the following: Theorem 2.4 (Weak Theorem 2.1) . Let b be sufficiently large. Let s b ( n ) denotethe sum of digits of n in base b .Then for any fixed choice of ( m, b −
1) = 1 , we have { p < b k : s b ( p ) ≡ a (mod m ) } = (1 + o (1)) b k mk log b . as k → ∞ through the integers. Theorem 2.5 (Weak Theorem 2.3) . Let b be sufficiently large. Then for any choiceof a ∈ { , . . . , b − } and for any x > b , we have { p < b k : p has no base b digit equal to a } = ( κ b ( a ) + o (1))( b − k k log b , as k → ∞ through the integers, where κ b ( a ) = bb − , if ( a , b ) = 1 , b ( φ ( b ) − b − φ ( b ) , if ( a , b ) = 1 . In both cases, extra ideas are required to show the full theorem which go beyonda simple refinement of the method presented here. Nevertheless, the proofs ofTheorems 2.4 and 2.5 still contain most of the qualitatively important aspects,which also appear in Theorem 2.2. The overall approach has much in common withwork of Drmota, Mauduit and Rivat on the sum of digits function for polynomials[4]. 3.
Sum of digits of primes
Any number n whose sum of digits s ( n ) in base 10 is a multiple of 3 must itselfbe a multiple of 3. More generally, in base bn = X i n i b i ≡ X i n i = s b ( n ) (mod b − , so any integer whose sum of digits in base b has a common factor h with b − h . In particular, the sum of digits s b ( p ) in base b of a primenumber p > b − b − JAMES MAYNARD sum of digits equal to a ’ are roughly independent, apart from the property that a must be coprime with b −
1. In particular, we might guess that asymptotically 50%of prime numbers have an even sum of digits, and 50% have an odd sum of digits,or that 50% of primes have sum of digits which is 1 (mod 3) and 50% a sum ofdigits which is 2 (mod 3) (since 3 is the only prime with sum of digits 0 (mod 3)).Theorem 2.1 is confirming this guess.4.
Restricted digits of primes
Many basic and fundamental properties of primes can be recast as problemsabout their digits. The problem of how many primes there are in a short inter-val [ x, x + x θ ] is essentially equivalent to asking whether there are primes with ⌈ log x/ log 10 ⌉ digits which have a specified string of ⌈ θ log x/ log 10 ⌉ numbers astheir leading decimal digits. Similarly, asking for primes with k decimal digitswhich end in a specific string of θk digits is asking for primes less than 10 k in anarithmetic progression modulo 10 θk . The question as to whether there are infinitelyMersenne primes is equivalent to asking whether there are infinitely many primeswith no digit 0 in their base 2 expansion.The final decimal digit of a prime number larger than 10 must be 1, 3, 7 or 9,since any integer ending in 0, 2, 4, 5, 6 or 8 must be a multiple of 2 or 5. Moregenerally, the final digit in base b of a prime p > b must be coprime to b . Beyondthis condition, however, it is not clear that there is any simple property of individualdigits of primes which is constrained in any way. We might guess that for any largeset A ⊆ [ X, X ] defined only in terms of base b digital properties and containingonly integers with last digit coprime to b , the density of primes in A is the sameas the density of primes in the set of all integers in [ X, X ] which have last digitcoprime to b . This density is ≍ b/ ( φ ( b ) log X ), so we might guess that { p ∈ A} ≈ bφ ( b ) log X A in this case. Theorems 2.2 and 2.3 confirm this heuristic for the set A of integerswith some prescribed binary digits, or the set of integers with a digit missing intheir decimal expansion. (Note that A ≈ X log ( b − / log b for numbers with nobase b digit equal to a .)5. Fourier Analysis on digit functions
The proofs of Theorems 2.1-2.3 are Fourier-analytic in nature, and ultimatelyrely on the fact that many digit-related functions are very well controlled by theirFourier transform. Given a function f : Z → C , we define the Fourier transform b f x : R / Z → C of f restricted to [0 , x ] by b f x ( θ ) := X n Each of the results fundamentally relies on an application of the Hardy-Littlewoodcircle method. If we wish to count primes in a set A ⊆ [1 , b k ) then by Fourier in-version on Z /b k Z , we have X n
Given the above heuristic, we split the contribution up depending on whether a/b k is close to a rational with small denominator or not. (This distinguishesbetween those a when b Λ( a/b k ) is large or not.) For the a ’s for which a/b k isclose to a rational with small denominator (known as the ‘major arcs’), we obtainan asymptotic estimate for b Λ( − a/b k ) and for c A ( a/b k ) by counting primes andelements of A in arithmetic progressions. For those a where a/b k is not close toa rational of small denominator (the ‘minor arcs’), we wish to obtain a suitableupper bound for the contribution to show such terms do not contribute much toour count. This relies on a L ∞ bound for ˆΛ and a L bound for c A for such a .For counting primes with restricted digits, we apply this directly with A beingthe set B of integers with no digit equal to a . For the case of the sum of digits ofprimes, we perform a small variation to simplify things. We we see that if A is theset of integers n with s b ( n ) ≡ a (mod m ) then recalling g ( n ) = e ( αs b ( n )), we have b A ,x ( θ ) = 1 m + 1 m X α ∈{ /m,..., ( m − /m } e ( − aα ) b g x ( θ ) , so X n
We first establish our key result for exponential sums over primes. This showsthat whenever θ is far from a rational with small denominator, b Λ( θ ) is small. Thebounds here are well-known, based on the original work of Vinogradov but we givea complete proofs for completeness following the approach of Vaughan (see, forexample [3, Chapter 25]). Lemma 7.1. Let α = a/d + β with a, d coprime integers and β ∈ R satisfying | β | < /d . Then we have N X n =1 min (cid:16) M, k αn k − (cid:17) ≪ (cid:16) N + N M d | β | + 1 d | β | + d (cid:17) log N. Proof. If N d | β | < / n = n + dn for non-negative integers n , n with n < d and n < N/d . If n = 0 then k αn k = k n a/d + βn k ≥ k n a/d k − k βn k ≥ k n a/d k / IGITS OF PRIMES 7 since N | β | < / d . We let b ∈ { , . . . , d − } be such that b ≡ n a (mod d ). Thusthe terms with n = 0 contribute a total ≪ X n 2. We let n = n + dn + d ⌊ ( d β ) − ⌋ n ,with 0 ≤ n < d , 0 ≤ n ≤ ( d β ) − and 0 ≤ n ≪ N dβ . Thus we obtain N X n =1 min (cid:16) M, k αn k − (cid:17) ≪ X n ≤ /d βn ≪ Ndβ X ≤ n Let α = a/d + β with ( a, d ) = 1 and | β | < /d . Then b Λ x ( α ) = X n Proof. From [3, (6), Page 142], taking f ( n ) = e ( nα ) we have that for any choice of U, V ≥ U V ≤ x X n M We now establish in turn several properties of the functions b B ,b k and b g b k , whichare the key ingredients in our results. The key property is that although either ofthese Fourier transforms can occasionally be large, they are typically very small. Inparticular, if we average over a set which doesn’t have particular digital structure(such as all points in an interval, or approximations to rationals) then we obtaingood bounds, which show better than square-root cancellation on average providedthat the base b is large enough. Estimates of these types are the standard meansof gaining control over digit-related functions. Lemmas 8.1 and 8.2 should becompared with [6, Th´eor`eme 2], [2, Th´eor`eme 2], [11, Lemme 16] or [10], whilstLemma 8.4 is essentially given by [5, Section 3] or [12, Theorem 2]. Lemma 8.1 ( L bounds) . There exists a constant C ≪ such that sup θ ∈ R X ≤ a
We recall the product formulae for b B and ˆ g : b B ,b k ( t ) = k − Y i =0 (cid:16) e ( b i +1 t ) − e ( b i t ) − − e ( a b i t ) (cid:17) , b g b k ( t ) = k − Y i =0 (cid:16) e ( b i +1 t + bα ) − e ( b i t + α ) − (cid:17) . IGITS OF PRIMES 9 The terms in parentheses can be bounded by (cid:12)(cid:12)(cid:12) e ( b i +1 t ) − e ( b i t ) − − e ( a b i t ) (cid:12)(cid:12)(cid:12) ≤ min (cid:16) b, k b i t k (cid:17) , (1) (cid:12)(cid:12)(cid:12) e ( b i +1 t + bα ) − e ( b i t + α ) − (cid:12)(cid:12)(cid:12) ≤ min (cid:16) b, k b i t + α k (cid:17) . (2)For t ∈ [0 , t = P ki =1 t i b − i + ǫ with t , . . . , t k ∈ { , . . . , b − } and ǫ ∈ [0 , /b k ). We see that k b i t k − = k t i +1 /b + ǫ i k − for some ǫ i ∈ [0 , /b ). Inparticular, k b i t k − ≤ b/t i +1 + b/ ( b − − t i +1 ) if t i +1 = 0 , b − 1. Thus we see thatsup θ ∈ R X ≤ a b k then onaverage our Fourier transforms are of size O ( b δk ) if b is large enough compared with δ > Proof. The key point is that the D points ℓ/d are all fairly evenly spaced in theinterval [0 , FF ( t ) = F ( u ) − Z ut F ′ ( v ) dv. Thus integrating over u ∈ [ t − δ, t + δ ] we have | F ( t ) | ≪ δ Z t + δt − δ | F ( u ) | du + Z t + δt − δ | F ′ ( u ) | du. We note that the fractions ℓ/d + θ + ǫ with ( ℓ, d ) = 1, d < D and | ǫ | < / D are separated from one another by ≫ /D . Thus X d ∼ D X <ℓ B, D ≥ . There is a constant C ≪ suchthat X d ∼ D X ℓ The key idea here is to use our product formula to essentially factorize thedouble summation into the product of two single summations, since only certainterms in the product really depend on η . IGITS OF PRIMES 11 The result follows immediately from Lemma 8.1 if B ≥ b k , so we may assume B < b k . For any integer k ∈ [0 , k ] we have b B ,b k ( α ) = k − k − Y i =0 (cid:16) X n i B , and extend the inner sum to | η | < b k .Applying Lemma 8.1 to the inner sum, and then Lemma 8.2 to the sum over d, ℓ gives X d ∼ D X ℓ 1) = 1, and that b B ,b k ( θ ) is small whenever θ is close to a rational withsmall denominator which is not a divisor of b k . Proof. We have that | e ( nθ ) + e (( n + 1) θ ) | = 2 + 2 cos(2 πθ ) < − k θ k ) . This implies that (cid:12)(cid:12)(cid:12) X n i
1) exp (cid:16) − k θ k b (cid:17) . We substitute this bound into our expression for b B , which gives (cid:12)(cid:12)(cid:12)b B ,b k ( t ) (cid:12)(cid:12)(cid:12) = k − Y i =0 (cid:12)(cid:12)(cid:12) X n i 1, ( d , b ) = 1and ( ℓ, d ) = 1 then k b i t k ≥ /d d for all i . Similarly, if t = ℓ/d d + ǫ with ℓ, d , d as above | ǫ | < b − k/ / d = d d < b k/ then for i < k/ k b i t k ≥ /d − b i | ǫ | ≥ / d . Thus, for any interval I ⊆ [0 , k/ 3] of length log d/ log b ,there must be some integer i ∈ I such that k b i ( ℓ/d + ǫ ) k > / b . This implies that k X i =0 (cid:13)(cid:13)(cid:13) b i (cid:16) ℓd + ǫ (cid:17)(cid:13)(cid:13)(cid:13) ≥ b j k log b d k . Substituting this into the bound for b B ,b k , and recalling we assume d < b k/ givesthe first result.For b g , we notice that since k t k ≥ k bt k /b and k t k + k t k ≥ k t − t k , we have k b i θ + α k + k b i +1 θ + α k ≥ b (cid:16) k b i +1 θ + bα k + k b i +1 θ + α k (cid:17) ≥ k ( b − α k b . Thus k − X i =0 k b i θ + α k ≥ k − X i =0 (cid:16) k b i θ + α k + k b i +1 θ + α k (cid:17) ≥ k b k ( b − α k . IGITS OF PRIMES 13 Using this in an analogous argument to the one for b B ,b k , we find | b g b k ( θ ) | ≤ k − Y i =0 (cid:12)(cid:12)(cid:12) X n i
We now use the exponential sum estimates from the previous sections to showthat when α is ‘far’ from a rational with small denominator the quantities b B ,b k ( α )ˆΛ b k ( − α )and b g ( α )ˆΛ b k ( − α ) are typically small in absolute value. Lemma 9.1. Let ≪ B ≪ b k /D D and ≪ D ≪ D ≪ b k/ . Then we have X d ∼ D X <ℓ By Lemma 8.3 we have that if D B ≪ b k then X d ∼ D X ℓ We now consider b B ,b k ( α ) b Λ b k ( − α ) and b g b k ( α ) b Λ b k ( − α ) when α is close to a ratio-nal with small denominator. By Lemma 8.4, b B ,b k is small unless the denominatoris a divisor of b k , and b g b k is always small for such α . Since there are very few such α , this means they make a negligible contribution. Lemma 10.1. If D , B ≪ exp( c / b k / / , then we have X d For any