On the Residue Classes of Π(n) modulo T

The prime number theorem is one of the most fundamental theorems of analytic number theory, stating that the prime counting function, π(x), is asymptotic to x/ log x. However, it says little about the parity of π(n) as an arithmetic function. Using Selberg's sieve, we prove a positive lower bound for the proportion of positive integers n such that π(n) is r mod t for any fixed integers r and t. Moreover, we generalize this to the counting function of any set of primes with positive density.


Introduction and Statement of Results
The prime counting function π(x) has been a topic of interest for mathematicians throughout history.One of the first main results about this function is the prime number theorem, which states that π(x) ∼ x log x .This asymptotic carries deep implications for the distribution of prime numbers.However, there are many problems about primes which remain unsolved in spite of this theorem.Two examples are the Goldbach conjecture, stating that every even number greater than 2 is the sum of two primes, and the twin prime conjecture, which claims that there are infinitely many pairs of primes that differ by 2.
In spectacular fashion, there has been a spate of recent advances concerning the gaps between prime numbers.In 2005, Goldston, Pintz and Yıldırım [4] proved that there exist infinitely many consecutive primes which are much closer than average.Recent work by Zhang [12] and the polymath project [10] shows that there are infinitely many pairs of primes differing by at most an absolute constant.These advances depend critically on sifting techniques, particularly Selberg's sieve.
In this paper, we provide another application of Selberg's sieve, one which does not seem to have been considered previously in the literature.We treat π(n) as an arithmetic function, and consider its distribution mod t as n varies.The prime number theorem alone says little about the parity of π(n) or the proportion of positive integers n for which π(n) is even.Nevertheless, numerical evidence shows that this seems to be the case about half the time: x 100 1000 10 4 10 5 10 6 10 7 #{n < x | π(n) is even}/x 0.510 0.523 0.486 0.502 0.498 0.499 Define T r,t (x) to be the number of positive integers n < x such that π(n) is r mod t.In this paper, we prove the following.
Theorem 1.1.For any 0 ≤ r < t, we have that 1 The authors are grateful to the NSF's support of the REU at Emory University.
If we assume the Hardy-Littlewood prime k-tuple conjecture, we can replace 16 by 2 above.
Remark 1. Recall that the Hardy-Littlewood prime k-tuple conjecture states that given a = (α 1 , ..., α k ), where α 1 , . . ., α k are distinct integers which do not cover all residue classes to any prime modulus, the number π(x; a) of positive integers m < x for which m − α 1 , ..., m − α k are all prime satisfies π(x; a) ∼ Bx(log x) −k , where B is a certain nonzero infinite product over primes.With this estimate, it is possible to improve Theorem 2.3 by a factor of 2 k k!.In our application, k = 2, explaining the improvement of the lower bound by a factor of 8.
Theorem 1.1 is a special case of a more general theorem.We say that a set S of primes has density δ if  In particular, we may consider T r,t (x; q, a) to be the number of positive integers n < x such that π(n; q, a) is r mod t, where π(x; q, a) is the counting function of the primes congruent to a mod q.In this case, we have the following stronger result.
Remark.Results similar to those in Theorems 1.1, 1.2, and 1.3 can be obtained by making use of Brun's sieve.However, the constants will be weaker.
To prove our theorem, we will rely on a judicious application of Selberg's sieve.In particular, using either Selberg's sieve or the prime k-tuple conjecture, we bound the number of primes which have a particular "small" gap, thus also bounding the number of primes which have any small gap.This lets us say that not all gaps occurring at primes p nt+r can be small, and thus T r,t (x) cannot be too small.

Selberg's sieve
We now introduce the main tool, Selberg's sieve.In this, as well as many other sieve methods (see [2], [7, Ch. 6]), we are given a finite set A and a set of primes P, and we wish to estimate the size of the set S(A, P) := {a ∈ A | (a, p) = 1 for all p ∈ P}.
To do this, we use the inclusion-exclusion principle.For each squarefree integer d, let A d be the set of elements in A divisible by d.Then where P is the product of all the primes in P. Sieve methods are most useful when the elements of A d distribute approximately evenly in A, in which case one would expect The key idea of Selberg's sieve is to replace the Möbius function in the formula of |S(A, P)| by an optimally chosen quadratic form so that the resulting estimates are minimal.Formally, it is stated in the following theorem. then With further restrictions on g(d), one may obtain an estimate for H(D) which is frequently useful in practice.
Lemma 2.2.[6, Lem.5.3, 5.4] Suppose the conditions in Theorem 2.1 hold.Moreover, suppose there exists positive real numbers κ, A 1 , A 2 , L such that If P is the product of all primes p < √ D, then where The implied constant depends only on A 1 , A 2 , and κ.In particular, it is independent of L.
Remark.This is a combination of Lemmas 5.3 and 5.4 of Halberstam and Richert's book [6].Note that exactly this formulation appears in [5].
In our work, we will find the following theorem, which is proved as a direct application of Selberg's sieve, to be useful.Proof.We apply Selberg's sieve (Theorem 2.1).Take A to be the set of polynomial values for positive integers m ≤ x.Take g(p) = ν(p)p −1 and X = x.Note that ν(p) ≤ k for all primes p and ν(p) = k for sufficiently large p; thus, conditions (1) -( 5) hold for κ = k, A . By Lemma 2.2, we have that The result follows.
Remark 2. For our purpose, it is important that the implied constant depends only on k and c but not the individual values of α i since we will take α i to infinity as x → ∞ in the proof of Lemma 3.1.

Proof of Theorem 1.2
We are now ready to begin the proof of the main theorem.For each positive integer k, let S k be the number of positive integers n such that |S(n)| = k.We label the elements in S by q 1 , q 2 . . . . in increasing order, and we note that S k = q k+1 − q k .In other words, S k is just the gap between q k and q k+1 .Observe that for each prime q m , T r,t (q m ; S) = k≤m k≡r(mod t) S k .
By a simple application of the prime number theorem, we see that, for all A > 1, where O t indicates that the implied constant may depend on t.
The proof of Theorem 1.2 relies on the following key lemma, which gives an upper bound on the number of small gaps.Lemma 3.1.Let f (x) tend to infinity as x → ∞ and f (x) = O(log x).Then the number of pairs of primes (p i , p j ) with p i , p j < x such that To prove this lemma, we start with an auxiliary estimate, which follows from Theorem 2.3.
Lemma 3.2.Let a be a positive integer such that a ≤ c log x for some positive constant c.Then the number of prime solutions p i , p j < x to p i − p j = a is at most where and the implied constant depends only on c.Assuming the prime k-tuple conjecture, the upper bound can be improved by a factor of 8.
We also need the following estimate.Proof.
a≤f (x), 2|a where Note that ψ(a) is a multiplicative function, so .
Observe that L(s, ψ) = ζ(s)A(s), where is absolutely convergent in Re(s) > 0. Hence by the Wiener-Ikehara Tauberian theorem [9,Cor. 8.8], Therefore Using Lemma 3.2 and 3.3, we can give an upper bound on the number of pairs of primes with prime gap in a given range.
Proof of Lemma 3.1.By Lemmas 3.2 and 3.3, the number of such pairs (p i , p j ) is bounded by If we take f (x) = α log x with α small, then we can give an upper bound on the number of consecutive primes with an unusually small prime gap.From this regularity result, we will now deduce the main theorem.
Proof of Theorem 1.2.Recall from (6) that T r,t (x; S) = q k <x, k≡r(mod t) Given a function f (x) which tends to ∞ as x → ∞ and f (x) = O(log x), by Lemma 3.1, we know that Note that In particular, for f (x) ≤ δ log x/(8t), the main term is nonnegative.Hence T r,t (x; S) = q k <x, k≡r(mod t) (q k+1 − q k ) + O t x log A x = ∞ y=1 q k <x, k≡r(mod t), q k+1 −q k =y y z=1 q k <x, k≡r(mod t), q k+1 −q k =y 1 + O t x log A x ≥ δ log x/(8t) z=1 q k <x, k≡r(mod t), q k+1 −q k ≥z Proof of Theorem 1.3.Theorem 1.3 follows mutatis mutandis by considering only prime gaps divisible by q and primes congruent to a mod q in Lemma 3.2, in which case we obtain an extra factor of φ(q) in the denominator of the upper bound in (7).We also recall that π(x; q, a) ∼ π(x)/φ(q) by Dirichlet's theorem on arithmetic progressions.

2 .
Given a positive irrational α > 1, the set of primes p of the form αn for some integer n has density α −1 by [8, Thm.2].

Theorem 2 . 3 .
[7, Thm.6.7] Let a = (α 1 , . . ., α k ) be distinct integers which do not cover all residue classes to any prime modulus and α i ≤ c log x for some absolute constant c for all i.Then the number π(x; a) of positive integers m ≤ x for which m − α 1 , . . ., m − α k are all prime satisfiesπ(x; a) ≤ 2 k k!Bx(log x) −k 1 + O log log x log x , p) is the number of roots of the polynomial f (m) = (m − α 1 ) • • • (m − α k ) modulo p.The implied constant depends only on k and c.
,t (x; S) to be the number of positive integers n < x such that |S(n)| is r mod t, where |S(n)| denotes the number of primes in S less than n.If we assume the Hardy-Littlewood prime k-tuple conjecture, we can replace 16 by 2 above.Examples.Two examples of sets of primes with positive density follow.1.Let K/Q be a finite Galois extension with Galois group G, and let C be a conjugacy class in G. Then the set of unramified primes p for which the Frobenius automorphism σ p is in C has density #C/#G by the Chebotarëv density theorem.
where X is approximately the size of A, g(d) is a multiplicative function that is the density of A d in A, so that 0 < g(d) < 1, and R d is a small error term.Typically, a sieve method gives an estimate for |S(A, P)| in the following form |S(A, P)| = X p∈P(1 − g(p)) + error term.The main term is what one would expect if sifting by the primes in P are pairwise independent events, and the error term varies from different sieve methods.However, when the primes in P are fairly large, this independence condition fails.Hence, most sieves can only obtain an upper bound for the sifted quantity in question.
If we assume the prime k-tuple conjecture, the upper bound in Lemma 3.2 can be improved by a factor of 8. Proceeding analogously in our above proof, we obtain