THE DENSITY OF PRIMES OF THE FORM a + km

HYUNG KYU JUN

Abstract. The Dirichlet’s theorem on arithmetic progressions states that the number of prime numbers less than x of the form a + km is approximately x φ(m) log x when x goes to infinity. In this paper, we will present a proof of the theorem and discuss the notion of natural density and analytic density.

Contents 1. Preliminary 1 2. The L-functions L(s, χ) 4 3. The Proof of the Dirichlet’s theorem on Arithmetic Progressions 8 4. Natural Density and Analytic Density 13 5. The Proof of the Wiener-Ikehara Theorem 20 Acknowledgments 24 References 24

The Dirichlet’s theorem on arithmetic progressions describes the density of the prime numbers. Specifically, denote πa(x) to be the number of primes p lesser than x x of the form a + km, then πa(x) ∼ φ(m) log x . In this paper, we will present a proof of Dirichlet’s theorem on arithmetic progressions by analyzing the singularities of certain L-functions. Some preliminary backgrounds will be presented in the first section. In the second section some basic properties of the L- L(s, χ) will be established. Section 3 contains the proof of Dirichlet’s theorem using Wiener- Ikehara theorem, whose proof is postponed to section 5. In section 4 we will compare the natural density and the analytic density of a .

1. Preliminary Let us recall some definitions that will be used throughout the paper in this section. Set a, m to be natural numbers such that m ≥ 2 and gcd(a, m) = 1. Denote ζ(s) to be the , i.e. ∞ X 1 (1.1) ζ(s) = ns n=1 for Re(s) > 1. Facts 1.2.

Date: AUGUST 30, 2013. 1 2 HYUNG KYU JUN

• When Re(s) > 1, we have Y 1 ζ(s) = 1 − 1 p ps where the product is taken over all prime numbers. • ζ(s) is holomorphic and is nonzero when Re(s) > 1. • We have 1 ζ(s) = + φ(s) s − 1 where φ(s) is holomorphic when Re(s) > 0. • ζ(s) can be extended to a meromorphic function on C with a unique simple pole at s = 1, and the residue of ζ(s) at s = 1 is 1. We omit the proofs of these facts. See [1] or [7] for details. Definition 1.3. Let X (1.4) πa(x) = 1 p≤x p≡a(modm) Definition 1.5. Let X n X ψa(x) = log p = Λa(k) pn≤x k≤x p≡a(modm) where ( log n, if n = pk, and p ≡ a (mod m) Λa(n) = 0, otherwise Definition 1.6. Let X θa(x) = log p p≤x p≡a(modm)

Let χ be a group homomorphism from the multiplicative group ((Z/mZ)×, ·) to (C×, ·) such that χ(ab) = χ(a)χ(b). We extend the function to all of Z by putting χ(c) = 0 if gcd(c, m) > 1. we call χ the Dirichlet character mod m.

Lemma 1.7. (Orthogonality) Let G be the multiplicative group (Z/mZ)× Then ( X φ(m), if χ = 1 χ(g) = 0, otherwise g∈G Proof. Let χ 6= 1. Choose h ∈ G such that χ(h) 6= 1. Then, X X X χ(h) χ(g) = χ(hg) = χ(g) g∈G g∈G g∈G Hence, X (χ(h) − 1) χ(g) = 0 g∈G As χ(h) 6= 1, X χ(g) = 0 g∈G  THE DENSITY OF PRIMES OF THE FORM a + km 3

Corollary 1.8. Fix g ∈ G. Then ( X φ(m), if g = 1 χ(g) = 0, otherwise χ∈Gˆ

Proof. We apply lemma 1.5 to the dual group Gˆ.  Next we will present Abel’s summation formula which will be used extensively throughout the paper.

Theorem 1.9. (Abel’s summation formula) Let 0 ≤ λ1 ≤ λ2 ≤ ... be a sequence of real numbers such that λ → ∞ when n → ∞, and let A(x) = P a where n λn≤x n (an) is a sequence of complex numbers. If ρ : R → C is a function(not necessarily continuous), we have

k k−1 X X (1.10) anρ(λn) = A(λk)ρ(λk) − A(λn)(ρ(λn+1) − ρ(λn)) n=1 n=1

Furthermore, if ρ has a continuous derivative in (0, ∞), and x ≥ λ1, then the above equation can be written as Z x X 0 (1.11) anρ(λn) = A(x)ρ(x) − A(t)ρ (t)dt λ1 λn≤x

Proof. For convenience, let A(λ0) = 0. Then, we have

k k X X anρ(λn) = (A(λn) − A(λn−1)ρ(λn) n=1 n=1 k−1 X = A(λk)ρ(λk) − A(λn)(ρ(λn+1) − ρ(λn)) n=1 which proves (1.10). Now, assume that ρ has a continuous derivative ρ0 in (0, ∞). Let k = max{k|λk ≤ x}. Then,

k k−1 Z λn+1 X X 0 anρ(λn) = A(λn) ρ (t)dt n=1 n=1 λn And Z x 0 A(λk)ρ(λk) = A(x)ρ(x) − A(t)ρ (t)dt λn as A(t) is a step function that remains constant in the interval [λk, λk+1). Hence, (1.11) follows from (1.10).  Corollary 1.12. With the same notations as in theorem 1.9, if A(x)ρ(x) → 0 when x → ∞, we have ∞ Z x X 0 anρ(λn) = − A(t)ρ (t)dt n=1 λ1 Proof. Send x → ∞ in the equation (1.11).  4 HYUNG KYU JUN

Corollary 1.13. (Abel’s lemma) Let (an)(bn) be two . Define

l n X X Ak,l = ai and Sk,n = aibi i=k i=k . Then,

n−1 X (1.14) Sk,n = Ak,i(bi − bi+1) + Ak,nbn i=k

Proof. Put ai = An,i − An,i−1 and the result is immediate. 

2. The L-functions L(s, χ) In this section, we will present some facts about L-functions associated to Dirich- let characters.

Definition 2.1. Let χ be a Dirichlet character mod m and s ∈ C. Define ∞ X χ(n) L(s, χ) = ns n=1 for Re(s) > 1. Immediately we have the following lemma: Lemma 2.2. Y L(s, 1) = ζ(s) (1 − p−s) p|m We want to understand the behavior of L(s, χ) when s tends to 1. It turns out that if χ = 1, then L(s, χ) diverges when s → 1 and has a simple pole there. On the other hand, when χ 6= 1, we have that L(1, χ) 6= 0. Corollary 2.3. L(s, 1) extends to a meromorphic function for Re(s) > 0 1 1 It has a unique simple pole at s = 1 with res(L(s, ), 1) = φ(m) . Proof. This follows from the fact that ζ(s) extends to a meromorphic function for Re(s) > 0 with a unique simple pole at s = 1. We also know that res(ζ, 1) = 1. Applying Lemma 2.2, we get Y 1 res(L(s, 1), 1) = (1 − p−1) · res(ζ, 1) = φ(m) p|m  Let G(s) denote the ordinary Dirichlet series, which means that ∞ X an G(s) = . ns n=1 Note that L-functions are ordinary Dirichlet series with positive coefficients. We could use Landau’s theorem as a very powerful tool to determine the radius of convergence for an ordinary Dirichlet series with positive coefficients. THE DENSITY OF PRIMES OF THE FORM a + km 5

Theorem 2.4. (Landau) Let G(s) be an ordinary Dirichlet series with positive coefficients. Then, the domain of convergence of G(s) is bounded by a singularity of G(s) located on the real axis. In other words, if σ > 0 is the abscissa of convergence of G(s), then G(s) has a singularity at σ.

Proof. Let ∞ X an G(s) = ns n=1 where an ≥ 0 for all n ∈ N. Suppose that G(s) converges for Re(s) > ρ with ρ ∈ R. Assume that G(s) can be extended analytically to a function holomorphic in a neighborhood of the point z = ρ in the complex plane. We will show that there exists  > 0 such that G(s) converges for Re(s) > ρ − . Replace s by s − ρ in the equation. Now assume ρ = 0. We see that G(s) is holomorphic in Re(s) > 0 plus a neighborhood of s = 0, so it is holomorphic in a disk |s − 1| ≤ 1 +  for some  > 0. Moreover, the Taylor series of G(s) converges in the disk. From complex analysis, we know that the kth derivative of G(s) can be expressed as

X an G(k)(s) = (− log n)k ns n∈N when Re(s) > 0. Hence, X an G(k)(1) = (−1)k (log n)k n n∈N The Taylor series expansion of G is :

∞ X 1 G(s) = (s − 1)kG(k)(1), where |s − 1| ≤ 1 + . k! k=0 For s = −, we have

∞ X 1 G(−) = (1 + )k(−1)G(k)(1). k! k=0 We know that X an (−1)kG(k)(1) = (log n)k n n is a convergent series with positive terms. Thus,

X 1 an G(−) = (1 + )k(log n)k k! n k, n∈N converges. We get 6 HYUNG KYU JUN

∞ X an X 1 G(−) = (1 + )k(log n)k n k! n k=0 X an X = n1+ = a n n n n n Hence, the series converges for s = −, and it also converges for Re(s) > −.  Now, let us consider L(s, χ) when χ 6= 1. Lemma 2.5. Let ∞ X an f(s) = ns n=1 l P where an ≥ 0. If Ak,l = an are bounded, then f converges for Re(s) > 0. k + Proof. Assume that |Ak,l| < M ∈ R . From (1.14), we see that

m m−1 X ai  X 1 1 1  ≤ M − + is is (i + 1)s ms i=l l and thus, m X ai M | | ≤ . is ls i=l Hence f converges.  Proposition 2.6. If χ 6= 1, L(s, χ) converges when Re(s) > 0 and converges absolutely when Re(s) > 1. If Re(s) > 1, we have

Y 1 L(s, χ) = χ(p) p 1 − ps ∞ P 1 Proof. For Re(s) > 1, the absolute convergence follows from the fact that nk n=1 converges absolutely when k > 1. In order to show the convergence of the series for Re(s) > 0, we use the above lemma 2.5 Using the lemma, it is enough to show

n X Al,n = χ(i) l are bounded for all l, n. l+m−1 From Lemma 1.7 (orthogonality), we know that P χ(i) = 0. Hence, it is i=l enough to consider l ≤ n such that n − l < m. As |χ(i)| = 1 if gcd(i, m) = 1 and |χ(i)| = 0 otherwise, we see that n n X X |Al,n| = χ(i) ≤ |χ(i)| ≤ φ(m) l l THE DENSITY OF PRIMES OF THE FORM a + km 7

The partial sums are bounded, so L(s, χ) converges.  Next we will prove that L(s, χ) 6= 0 when χ 6= 1. In order to show this, we need to define a function ζm and inspect how the function behaves near s = 1. Definition 2.7. Let Y (2.8) ζm(s) = L(s, χ) χ Let p be a prime not dividing m. I will simply write p as the image of p in the × φ(m) group G = (Z/mZ) . Denote f(p) to be the order of p in G. Let g(p) = f(p) .

We can rewrite ζm with respect to prime numbers that do not divide m. Proposition 2.9. Y 1 ζ (s) = m  g(p) p m 1 - 1 − pf(p)s In order to prove the proposition, we need a lemma. Lemma 2.10. If p is a prime not dividing m, we have Y (1 − χ(p)T ) = (1 − T f(p))g(p). χ Proof. Let W be the set of all f(p)th roots of unity. We have Y (1 − wT ) = 1 − T f(p). w∈W For all w ∈ W , we have g(p) characters χ in Gˆ such that χ(p) = w, as g(p) is th order of the quotient of G by the cyclic subgroup < p >. Hence, the lemma follows.  Proof. (of Proposition 2.9) Y ζm(s) = L(s, χ). χ Replace L(s, χ) using Proposition 2.6, we have

Y 1 Y 1 ζm(s) = = . Q(1 − χ(p) ) Q(1 − χ(p) ) χ∈Gˆ ps p m ps p - χ By Lemma 2.10, we get Y χ(p)  1 g(p) (1 − ) = 1 − . ps pf(p)s χ Thus the proposition follows.  Proposition 2.11. L(1, χ) 6= 0 if χ 6= 1. 8 HYUNG KYU JUN

Proof. We will prove this result by contradiction. We know that L(s, χ 6= 1) is holomorphic in a neighborhood of s = 1(Proposition 2.6), and L(s, 1) extends to a meromorphic function for Re(s) > 0 with a unique simple pole at s = 1 (Corollary 2.3). Now, suppose that the proposition is not true. There exists χ 6= 1 such that Q L(1, χ) = 0, and we conclude that ζm(s) = L(s, χ) is holomorphic at s = 1. χ As ζm is an ordinary Dirichlet series with positive coefficients, Landau’s theorem (2.4) shows that the abscissa of convergence σ ≤ 0. We will show that this is impossible. th The p factor of ζm is 1 = (1 + p−f(p)s + p−2f(p)s + ...)g(p) (1 − pf(p)s)g(p) and it dominates the series

1 + p−φ(m)s + p−2φ(m)s + ...

Hence, all the coefficients of ζm are greater than those of the series X F (s) = n−φ(m)s (n,m)=1 1 A problem occurs because the series F diverges at s = φ(m) . We see that 1 ζm(s) ≥ F (s) for all s ≥ σ. Hence, ζm diverges at s = φ(m) . We have shown that ζm cannot be holomorphic for the entire half plane Re(s) > 0. Therefore L(1, χ) 6= 0 if χ 6= 1.  Now we are ready to prove the theorem of arithmetic progressions.

3. The Proof of the Dirichlet’s theorem on Arithmetic Progressions Recall that a, m are natural numbers with m ≥ 2 and gcd(a, m) = 1. The aim of this section is to prove the following theorem. Theorem 3.1. There exist infinitely many prime numbers p such that p ≡ a (mod log x p). Moreover πa(x) ∼ φ(m)x as x → ∞.

Showing an asymptotic behavior of πa is quite strenuous, so we instead try to observe the behavior of ψa when x → ∞. Lemma 3.2. When x → ∞, the following are equivalent: log x • πa(x) ∼ φ(m)x x • ψa(x) ∼ φ(m) x • θa(x) ∼ φ(m) Proof. By Abel’s summation formula (Corollary 1.8), we have

Z x X 1 θa(x) θa(t) πa(x) = log p = + 2 dt log p log x 2 t log t and THE DENSITY OF PRIMES OF THE FORM a + km 9

Z x θa(t) x 2 dt = O( 2 ). 2 t log t log x Also, we see that

1/2 1/3 ψa(x) = θa(x) + θa(x ) + θa(x ) + ... log x x x Hence πa(x) ∼ φ(m)x ⇔ ψa(x) ∼ φ(m) ⇔ θa(x) ∼ φ(m) when x → ∞.  Now we are reduced to showing that x (3.3) ψ (x) ∼ . a φ(m) Let

∞ X Λa(n) (3.4) F (s) = a ns n=1 . For Re(s) > 1 we define log L(s, χ) as X 1 X χ(p)n log L(s, χ) = log = . 1 − χ(p)p−s npns p n,p P χ(p)n The series n,p npns is obviously convergent. Then we can set ∞ L0(s, χ) d   X χ(n)Λ(n) = log L(s, χ) = − . L(s, χ) ds ns n=1 Lemma 3.5. For s ∈ C and Re(s) > 1, 1 X L0(s, χ) (3.6) F (s) = − χ(a) . a φ(m) L(s, χ) χ

Proof. In essence, this is Fourier analysis on the finite abelian group G = (Z/mZ)×. We see that

∞ ∞ X L0(s, χ) X  X χ(n)Λ(n) X  X Λ(n) χ(a) = χ(a) − = − χ(na−1) L(s, χ) ns ns χ χ n=1 n=1 χ Using Corollary 1.8, we see that the above equation equals to

0 ∞ X L (s, χ) X Λa(n) χ(a) = −φ(m) . L(s, χ) ns χ n=1 

We will relate Fa and ψa by a specific formula, and prove (3.3) from this formula using the Wiener-Ikehara theorem (Theorem 3.13). Let us first recall a simple lemma from complex analysis:

Lemma 3.7. Let f be a meromorphic function. If f has at most a pole at z0, then 0 res(f /f, z0) = ord(f, z0). 10 HYUNG KYU JUN

Proof. Translate if necessary, we may take z0 = 0. Assume that it has at most a pole at 0. Then f has only a finite number of negative terms. Hence, let us write m f(z) = amz + (higher terms) am 6= 0, m ∈ Z. Then,

m (3.8) f(z) = amz (1 + h(z)) where h(z) is a power series with no constant term. Differentiating both sides, we get

0 m−1 m 0 (3.9) f (z) = mamz + amz h (z) Divide (3.9) by (3.8), we see that

f 0 m h0(z) = + . f z 1 + h(z) h0(z) As h(z) has no constant term, 1+h(z) is holomorphic at 0. Hence, res(f 0/f, 0) = ord(f, 0). 

Lemma 3.10. The function Fa(s) can be extended to a meromorphic function on an open set O containing {s ∈ C|Re(s) ≥ 1, s 6= 1}. Moreover, Fa has a simple 1 pole at s = 1 with residue φ(m) . Proof. From Proposition 2.11, if χ 6= 1, we see that L(s, χ) is holomorphic and is nonzero on an open set O containing {s ∈ C|Re(s) ≥ 1, s 6= 1}. Hence L0(s, χ)/L(s, χ) is holomorphic. On the other hand, L(s, 1) has a unique simple pole at s = 1. From Lemma 3.7, we see that L0(s, 1)/L(s, 1) has a simple pole at s = 1 with residue 1. Hence, using the relation (3.6) from Lemma 3.5, we see that Fa has a simple pole with 1 res(F , 1) = a φ(m)  Using Corollary 1.12 (Abel’s summation formula), we see that

∞ Z ∞ X Λa(n) ψa(t) F (s) = = s dt. a ns ts+1 n=1 1 If we put t = ex, we get

Z ∞ Fa(s) −xs (3.11) = ψa(x)e dx. s 0 Lemma 3.10 tells that F (s)  1 (3.12) res a , 1 = . s φ(m) THE DENSITY OF PRIMES OF THE FORM a + km 11

Theorem 3.13. (Wiener-Ikehara) Let A(x) be a non-negative, non-decreasing function in an interval [0, ∞). Assume that for σ > 1, the integral Z ∞ A(x)e−xsdx, s = σ + it 0 converges to the function F(s), where F is holomorphic for σ ≥ 1 except for a simple pole at s = 1 with residue γ. Then,

(3.14) lim e−xA(x) = γ x→∞ The proof of the theorem is long and requires techniques from functional analysis, so we will present it later in Section 5. x Proof. (of Theorem 3.1) We will show that ψa(x) ∼ φ(m) . x Set A(x) = ψa(e ). We know that ψa is non-decreasing and non-negative. From (3.11), we see that

F (s) Z ∞ F (s) = a = A(x)e−xsdx s 0 1 and (3.12) tells us that the residue of F at s = 1 is φ(m) . Hence, by Theorem 3.13, we conclude that 1 e−xψ (ex) ∼ as x → ∞. a φ(m) x In other words, we have ψa(x) ∼ φ(m) as x → ∞. log x From Lemma 3.2, we conclude that πa(x) ∼ φ(m)x as x → ∞. This completes the proof of the Dirichlet’s theorem on Arithmetic Progressions.  Corollary 3.15. (Dirichlet) There are infinitey many primes of the form a + km where gcd(a, m) = 1. log x Proof. The number of the primes of the form a + km is given as πa(x) ∼ φ(m)x , and it is not bounded above.  Corollary 3.16. Primes are evenly distributed among the congruence classes mod- ulo m. log x log x Proof. πa(x) ∼ φ(m)x , and φ(m)x does not depend on a.  x We will finish this section by presenting another proof showing ψa(x) ∼ φ(m) by contour integral instead of Theorem 3.1. x Claim: ψ (x) ∼ . a φ(m) Proof. Fix x ∈ R and define xs+1 g(s) = F (s) . a s(s + 1) From Lemma 3.10, we see that g(s) is meromorphic on an open set O containing {s ∈ C|Re(s) ≥ 1, s 6= 1} with a simple pole at s = 1 and 12 HYUNG KYU JUN

x2 x2 res(g, 1) = · res(F , 1) = . 1 · 2 a 2φ(m) Then, consider

1 Z c+∞i (3.17) g(s)ds. 2πi c−∞i We want to express (3.17) in two different ways. P s First, let us use the fact that Fa(s) = Λa(n)/n . Hence, (3.17) becomes

∞ X 1 Z c+∞i xs+1ds (3.18) Λ (n) . a 2πi nss(s + 1) 0 c−∞i Note that we need to show the termwise integration is valid so that (3.17) is equivalent to (3.18). We can rewrite g(s) as

 ∞   ∞  X x s 1 X x s+1 n g(s) = x Λ (n)  − x Λ (n)  . a n s a n s + 1 1 1 Von Mangoldt’s method from [3] shows that each of the two terms can be inte- grated termwise. Therefore, the termwise integration is valid. Now, using the fact that

s+1 x x x s n x s+1 =  −  , nss(s + 1) s n s + 1 n we have

Z c+∞i s+1 Z c+∞i Z c+1+∞i 1 x ds x x s ds n x v dv s = − . 2πi c−∞i n s(s + 1) 2πi c−∞i n s 2πi c+1−∞i n v ( 1 Z c+∞i xs+1ds x − n if n ≤ x (3.19) ⇔ s = 2πi c−∞i n s(s + 1) 0, if n ≥ x Thus (3.18) becomes

X Z x (3.20) (3.18) = Λa(n)(x − n) = ψa(t)dt n≤x 0 The second way of expressing (3.17) is to do contour integral of a rectangle defined by Re(s) = c and Re(s) = 1 with a small protuberance near s = 1, and two edges in the infinity. We know that g(s) is meromorphic on an open set O with a unique simple pole at s = 1. Hence, by the residue theorem,

Z x2 g(s)ds = res(g, 1) = . γ 2φ(m) Hence, THE DENSITY OF PRIMES OF THE FORM a + km 13

1 Z c+∞i Z x2 (3.21) g(s)ds ∼ g(s)ds = 2πi c−∞i γ 2φ(m) as we see that integral over other edges of the protuberated rectangle is o(x2). Hence, putting (3.21) and (3.18) together, we get

Z x x2 (3.22) ψa(t)dt ∼ 0 2φ(m) . We are reduced to showing that (3.22) implies x ψ (x) ∼ . a φ(m) The reader is encouraged to look at [3] for a rigorous proof. Although in [3] the R x x2 author shows that 0 ψ(t)dt ∼ 2 implies ψ(x) ∼ x, we can almost exactly follow the argument to prove our result. Here, we will provide a simpler argument that x (3.22) ⇒ ψ (x) ∼ a φ(m) from the fundamental theorem of calculus:

Z x x2 ψa(t)dt ∼ 0 2φ(m) Z x 2 x 2 ⇔ ψa(t)dt = + o(x ). 0 2φ(m) Hence, from the fundamental theorem of calculus we get x ψ (x) = + o(x) a φ(m) by differentiating both sides. The above equation is equivalent to x ψ (x) ∼ . a φ(m) 

4. Natural Density and Analytic Density In this section, we will discuss two different notions of density. We will present another proof of Dirichlet’s theorem on arithmetic progressions (i.e. Corollary 3.15) using analytic density. Let P be the set of all prime numbers. Let A be any of P . Denote An = {a ∈ A|a ≤ n} and Pn = {p ∈ P |p ≤ n}. Definition 4.1. The natural density N(A) of a subset A ⊂ P is defined to be |A | N(A) = lim n n→∞ |Pn| if the limit exists. 14 HYUNG KYU JUN

Definition 4.2. The analytic density, or Dirichlet density of A ⊂ P is defined to be P a−s D(A) = lim a∈A s→1+ P p−s p∈P if the limit exists.

We can extend the definitions of two kinds of density for two sets A ⊂ B ⊂ N. Theorem 4.3. Let A be a subset of B ⊂ N. Assume that ∞ X χB(m) → ∞ when s → 1. ms m=1 If N(A) (with respect to B) exists and is equal to k ∈ R, then D(A) also exists and equals k.

Proof. Let χA and χB be characteristic functions of the sets A and B. Set s ∈ C with Re(s) ≥ 1. Then we have that

n P χA(m) m=1 k = lim n . n→∞ P χB(m) m=1 By Corollary 1.13, we know

n n−1 X χA(m) X 1 1 An = ( − )A + , ms ms (m + 1)s m ns m=1 m=1 where m X Am = χA(i) < m. i=1 Hence, when n → ∞, we have

∞ ∞ X χA(m) X  1 1  = − A , ms ms (m + 1)s m m=1 m=1

An n s−1 as 0 ≤ ns ≤ ns = n → 0 when n → ∞. By assumption, for any  > 0, there is an N ∈ N such that if n ≥ N,

n P χA(m) m=1 k −  < n < k +  P χB(m) m=1 A ⇔ k −  < n < k +  Bn where Bn is defined similar to An. Hence,

(4.4) (k − )Bn < An < (k + )Bn for all n ≥ N. THE DENSITY OF PRIMES OF THE FORM a + km 15

Choose suitably large l ∈ N such that

(4.5) (k − )Bn − l < An < (k + )Bn + l for all n ∈ N. This is possible because there are at most finitely many terms that do not satisfy the inequality (4.4). We see that

∞ ∞ X χA(m) X  1 1  = − A . ms ms (m + 1)s m m=1 m=1 Using the former inequality (4.5), we get ∞ ∞ ∞ X χA(m) X  1 1  X  1 1  < (k + ) − B + l − . ms ms (m + 1)s m ms (m + 1)s m=1 m=1 m=1 We see that ∞ ∞ X  1 1  X χB(m) (k + ) − B = (k + ) ms (m + 1)s m ms m=1 m=1 . Moreover, ∞ X  1 1  l − = l ms (m + 1)s m=1 . We get

∞ ∞ ∞ X χB(m) X χA(m) X χB(m) (k − ) − l < < (k + ) + l ms ms ms m=1 m=1 m=1

P χA(m) l s l (4.6) k −  − < m < k +  + P χB (m) P χB (m) P χB (m) ms ms ms From the assumption we have ∞ X χB(m) → ∞ when s → 1, ms m=1 so l ∞ → 0 whens → 1. P χB (m) ms m=1 Since  > 0 is arbitrary, we can send  → 0 in (4.6), and send s → 1. Conse- quently, we get the desired result. Therefore, (Analytic Density) = (Natural Density) = k.  Remark 4.7. Note that the converse is not always true.

Example 4.8. Let A ⊂ N be the set of natural numbers which have first digit 1. 16 HYUNG KYU JUN

Proof. For simplicity denote

|An| N(n) = , where Nn = {k ∈ N|k ≤ n}. |Nn| We see that A has an analytic density, but it does not have a natural density, as

lim sup N(n) 6= lim inf N(n). n→∞ n→∞ For simplicity denote N(m) = |An| . |Nn| A simple counting argument shows that 10k − 1 |A | = if n = 10k − 1. n 9 Hence, we see that 1 lim inf N(n) ≤ (in fact equality holds here). n→∞ 9 If n = 2 · 10k − 1, we see that

10k − 1 10k+1 − 1 |A | = + 10k = , which implies n 9 9 5 lim sup N(n) ≥ n→∞ 9 Therefore, natural density does not exist.

Now, let us show that the analytic density exists nevertheless. I claim that P a−s a∈A → log 2 when s → 1. P n−s 10 n∈N P −s 1 From facts 1.2, we know that ζ(s) = n ∼ s−1 when s → 1. Hence, the n∈N claim is equivalent to

P a−s a∈A X 1 lim = lim(s − 1) = log10 2. s→1 1 s→1 as s−1 a∈A For s > 1, we see from the figure below that

∞ k ∞ k X  Z 2·10 1  X 1 X  Z 2·10 1  s dx ≤ s ≤ s dx + 1 k x a k x k=0 10 a∈A k=0 10 since (Blue areas) ≤ 1: shift all the blue regions above [10k, 2 · 10k] to the rectangle above [1, 2]. Obviously the sum of all blue areas above [10k, 2 · 10k] is less than that of the rectangle above [1, 2], which has area 1. We can calculate ∞ k X  Z 2·10 1  s dx k x k=0 10 using basic integration and facts about geometric progression. THE DENSITY OF PRIMES OF THE FORM a + km 17

Figure 1. y = 1/xs and P a−s a∈A

∞ k ∞ X  Z 2·10 1  X 1  1 1  s dx = k s−1 − k s−1 k x 1 − s (2 · 10 ) (10 ) k=0 10 k=0 ∞ 1 X 2 − 2s 1 1 2 − 2s 10s−1 = = 1 − s 2s (10k)s−1 1 − s 2s 10s−1 − 1 k=0 Hence, we have

1 2 − 2s 10s−1 X 1 1 2 − 2s 10s−1 ≤ ≤ + 1 1 − s 2s 10s−1 − 1 as 1 − s 2s 10s−1 − 1 a∈A multiplying by s − 1 > 0 and sending s → 1+ gives

log 2 log 2 ≤ D(A) ≤ , log 10 log 10 which shows that

D(A) = log10 2. Similarly, if we define Ak = {n ∈ N | n has first digit k}, we can show 1  D(Ak) = log10 1 + k . Note that

9 9 X 1 Y 1 log 1 +  = log 1 +  = log 10 = 1. 10 k 10 k 10 k=1 k=1  18 HYUNG KYU JUN

Surprisingly, the same holds for the set of prime numbers which have first digit 1: it also has analytic density log10 2 but it does not have natural density. For more information, see [1] page 76, [5], and [6]. We also note that the conclusion aligns with Benford’s Law, or the first-digit law in statistics which claims that numbers with the leading digit k ∈ {1, ··· , 9} occur 1  with probability log10 1 + k . We should note that the probability of finding the 1  numbers with first digit k is not log10 1 + k (As we just noted in the example, natural density of Ak does not exist). Nonetheless, the analytic density of each Ak 1  is log10 1 + k .

1 We will show that D(Pa) = φ(m) following [1], which shows that the number of primes congruent to a modulo m is infinite. Of course, we can use theorem 1 4.3 and the fact that N(Pa) = φ(m) (one could use the theorem log x π(x) = x together with theorem 3.1). However, there is a direct way to see that 1 1 D(Pa) = φ(m) . The proof is mainly based on the facts that L(s, χ) 6= 0 when χ 6= (proposition 2.11) and L(1, s) has a simple pole at s = 1(corollary 2.3). Lemma 4.9. X 1 p−s ∼ log when s → 1. s − 1 p∈P Proof. From the facts 1.2, we can express ζ as Y 1 1 ζ(s) = = + φ(s). 1 − 1 s − 1 p ps Hence, if we take the logarithm, we get

X 1 X 1 log ζ(s) = = + µ(s), kpks ps p∈P p∈P k≥1 P 1 where µ(s) = p∈P ks is bounded. As ζ has a simple pole in s = 1, the lemma k≥2 kp follows.  Proposition 4.10. If D(A) exists, then P a−s a∈A D(A) = lim 1 s→1+ log s−1 Proof. Lemma 4.9 indicates that X 1 p−s ∼ log when s → 1. s − 1 p∈P 

Let Pa = {p ∈ P | p ≡ a (mod m)}. 1 The goal now is to show that Pa has analytic density φ(m) . In order to prove this, we will first establish three lemmas. THE DENSITY OF PRIMES OF THE FORM a + km 19

Let us define X χ(p) f (s) = . χ ps p-m

Note that fχ obviously converges for Re(s) > 1. 1 1 Lemma 4.11. If χ = , then fχ ∼ log s−1 when s → 1. P 1 Proof. Observe that fχ differs from the series ps at finite number of terms (i.e. prime numbers p such that p|m. The result immediately follows from Lemma 4.9. 

Lemma 4.12. If χ 6= 1, then fχ remains bounded when s → 1. Proof. Recall that we defined log L(s, χ) in the proof of lemma 3.2 as follow:

X 1 X χ(p)n log L(s, χ) = log = . 1 − χ(p)p−s npns p n,p Now, we can rewrite the above equation as

X χ(p)n X χ(p) X χ(p)n log L(s, χ) = = + . npns ps npns n,p p n,p≥2 We see that X χ(p) = f . ps χ p Proposition 2.11 shows that log L(s, χ) remains bounded when s → 1. X χ(p)n npns n,p≥2 also remains bounded when s → 1. Therefore, fχ remains bounded when s → 1.  Define X 1 g (s) = . a ps p∈Pa

We see that the analytic density of Pa is

ga(s) (4.13) D(Pa) = lim . s→1 1 log s−1

Let us examine the behavior of ga when s → 1. Lemma 4.14. We have 1 X g (s) = χ(a)f (s). a φ(m) χ χ 20 HYUNG KYU JUN

Proof. The proof is similar to that of Lemma 3.5. If we substitute fχ in the given formula, we get

X X  X −1  s χ(a)fχ(s) = χ(pa ) /p . χ p-m χ From Corollary 1.8, we see that

( X φ(m), if pa−1 ≡ 1 (mod m) χ(pa−1) = χ 0, if not

pa−1 ≡ 1 (mod m) ⇔ p ≡ a (mod m). Therefore,

X χ(a)fχ(s) = φ(m)ga(s). χ 

Now we are ready to prove that the analytic density of Pa = {p ∈ P | p ≡ 1 a (mod m)} is φ(m) . Theorem 4.15. 1 D(P ) = a φ(m) Proof. From lemma 4.11, 1 f1 ∼ log when s → 1 s − 1

Lemma 4.12 tells that all other fχ6=1 are bounded. Hence, we conclude that

1 1 g (s) ∼ log a φ(m) s − 1 from lemma 4.14. From the equation (4.13), we see that

1 D(P ) = . a φ(m) 

1 Note that we cannot directly tell that the natural density of Pa is φ(m) from this 1 proof. The proof only tells that D(Pa) = φ(m) > 0.

5. The Proof of the Wiener-Ikehara Theorem This section is entirely devoted to prove the Wiener-Ikehara theorem (theorem 3.13) we used in section 3. We will follow [4] with some additional explanation and clarification if applicable. Let us first recall the Wiener-Ikehara Theorem. THE DENSITY OF PRIMES OF THE FORM a + km 21

Theorem 5.1. (Wiener-Ikehara) Let A(x) be a non-negative, non-decreasing func- tion in an interval [0, ∞). Assume that for σ > 1, the integral

Z ∞ A(x)e−xsdx, s = σ + it 0 converges to the function F(s), where F is holomorphic for σ ≥ 1 except for a simple pole at s = 1 with residue γ. Then,

(5.2) lim e−xA(x) = γ x→∞ Example 5.3. An obvious (but uninteresting) example would be A(x) = ex. It is non-negative, non-decreasing function of x ∈ [0, ∞). Also, we see that

Z ∞ 1 A(x)e−xsdx = . 0 s − 1 1 and s−1 is holomorphic for σ ≥ 1 except for s = 1 where it has a simple pole with a residue 1. Evidently,

1 lim e−xex = 1 = res( , 1). x→∞ s − 1 A(x) Let us normalize A(x) to make γ = 1. (Replace A(x) by γ if necessary). Set B(x) = e−xA(x). We will first show that for all λ > 0,

Z λy v sin2 v lim B(y − ) 2 dv = π, y→∞ −∞ λ v and then deduce lim B(x) = 1 by showing that x→∞ lim sup B(x) ≤ 1 ≤ lim inf B(x). x→∞ x→∞ Lemma 5.4. For all λ > 0, Z λy v sin2 v lim B(y − ) 2 dv = π. y→∞ −∞ λ v Proof. For σ > 1, we have Z ∞ 1 Z ∞ f(s) = A(x)e−xsdx, and = e−(s−1)sdx 0 s − 1 0 Hence,

1 Z ∞ f(s) − = (B(x) − 1)e−(s−1)xdx, σ > 1. s − 1 0 Set 1 g(s) = f(s) − , and g (t) = g(1 +  + it) for  > 0. s − 1  Then g(s) is analytic for Re(s) = σ ≥ 1 as f is a meromorphic function with a unique simple pole at s = 1 with residue 1. For λ > 0, we have 22 HYUNG KYU JUN

Z 2λ 1  |t|  iyt g(t) 1 − e dt 2 −2λ 2λ

1 Z 2λ  |t|   Z ∞  (5.5) = 1 − eiyt (B(x) − 1)e−(+it)xdx dt. 2 −2λ 2λ 0 The order of integration in the above equation can be interchanged by Fubini’s theorem. Since A(x) is nonnegative and nondecreasing, if s ∈ R and x > 0,

Z ∞ Z ∞ A(x)e−xs f(s) = A(x)e−xsdx ≥ A(x) e−usdu = . 0 x s Hence A(x) ≤ sf(s)exs. As f(s) is holomorphic for σ > 1, we see that sf(s) is a constant number for σ > 1. Consequently A(x) = O(exs) for any s > 1, and A(x) xs exs → 0 as x → ∞, or equivalently A(x) = o(e ) (if not, we will have that R ∞ −xs f(s) = 0 A(x)e dx diverges). Therefore, for any δ > 0, we have B(x)e−δx = A(x)e−(1+δ)x = o(1). As a result, the integral Z ∞ (B(x) − 1)e−(+it)xdx 0 converges uniformly in t ∈ [−2λ, 2λ]. Fubini’s theorem tells that the order of integration in (5.5) is interchangeable. We now have

(5.6) Z 2λ Z ∞  Z 2λ  1  |t|  iyt −x 1 |t|  i(y−x)t g(t) 1 − e dt = (B(x) − 1)e 1 − e dt dx 2 −2λ 2λ 0 −2λ 2 2λ Z ∞ 2 −x sin λ(y − x) = (B(x) − 1)e 2 dx. 0 λ(y − x)

Because g is analytic if σ ≥ 1, and g(t) → g(1 + it) uniformly in an interval t ∈ [−2λ, 2λ] when  → 0. Hence,

Z ∞ 2 Z ∞ 2 −x sin λ(y − x) sin λ(y − x) lim e 2 dx = 2 dx. →0 0 λ(y − x) 0 λ(y − x) Therefore, the limit

Z ∞ 2 −x sin λ(y − x) lim B(x)e 2 dx →0 0 λ(y − x) exists. As the integrand is nonnegative and monotonically increasing as  → 0, we can apply the monotone convergence theorem and get

Z ∞ 2 Z ∞ 2 −x sin λ(y − x) sin λ(y − x) lim B(x)e 2 dx = B(x) 2 dx. →0 0 λ(y − x) 0 λ(y − x) This implies that THE DENSITY OF PRIMES OF THE FORM a + km 23

Z 2λ Z ∞ 2 Z ∞ 2  |t|  iyt sin λ(y − x) sin λ(y − x) g(t) 1 − e dt = B(x) 2 dx − 2 dx −2λ 2λ 0 λ(y − x) 0 λ(y − x) by (5.6). If we let y → ∞, then (LHS) → 0 due to the Riemann-Lesbegue lemma. On (RHS), second term gives Z ∞ sin2 λ(y − x) Z λy sin2 v lim 2 dx = lim 2 dv = π. y→∞ 0 λ(y − x) y→∞ −∞ v Hence,

Z λy v sin2 v (5.7) lim B(y − ) 2 dv = π y→∞ −∞ λ v and we finish the proof of the lemma.  Now, let us show that lim B(x) = 1 using Lemma 5.4. x→∞ Lemma 5.8. lim B(x) = 1 x→∞ Note that this is the Wiener-Ikehara theorem. Proof. We will first show that (5.9) lim sup B(x) ≤ 1 x→∞ and then show (5.10) 1 ≤ lim inf B(x). x→∞ + a For (5.9), choose a and λ ∈ R . Let y > λ . Then, from (5.7), we have Z a v sin2 v lim sup B(y − ) 2 dv ≤ π y→∞ −a λ v since the intergrand is nonnegative. Because A(u) = B(u)eu is nondecreasing, we have  a   v  ey−a/λB y − ≤ ey−v/λB y − for v ∈ [−a, a]. λ λ Then,  v   a   a  B y − ≥ B y − e(v−a)/λ ≥ B y − e−2a/λ. λ λ λ Hence,

Z a 2 a −2a/λ sin v lim sup B(y − )e 2 dv ≤ π y→∞ −a λ v i.e., Z a 2 a −2a/λ sin v lim sup B(y − )e 2 dv ≤ π. y→∞ λ −a v 24 HYUNG KYU JUN

As we fixed a and λ, we have lim sup B(y − a/λ) = lim sup B(y). We then y→∞ y→∞ conclude

Z a 2 −2a/λ sin v e lim sup B(y) 2 dv ≤ π y→∞ −a v for all a > 0 and λ > 0. Let a → ∞ and λ → ∞ while a/λ → 0. Then, as the above inequality holds for all a, λ > 0

Z ∞ sin2 v lim sup B(y) 2 dv ≤ π y→∞ −∞ v That is,

π lim sup B(y) ≤ π ⇔ lim sup B(y) ≤ 1, y→∞ y→∞ so the inequality (5.9) holds.

We will now show that (5.10) also holds, which completes the proof. Inequality (5.9) implies that |B(s)| ≤ c, for suitably large c. Let’s fix a, λ > 0 as before. If y is large enough, we have

Z λy v sin2 v  Z −a sin2 v Z ∞ sin2 v  B(y − ) dv ≤c dv + dv λ v2 v2 v2 (5.11) −∞ −∞ a Z a 2  v sin v + B y − 2 dv. −a λ v As before, if v ∈ [−a, a] we have v a By −  ≤ By + e2a/λ, λ λ which implies that

Z a 2 Z a 2 v sin v a  2a/λ sin v (5.12) B(y − ) 2 dv ≤ B y + e 2 dv. −a λ v λ −a v From (5.7), (5.11), and (5.12) we conclude

 Z −a 2 Z ∞ 2  Z a 2 sin v sin v a  2a/λ sin v π ≤ c 2 dv + 2 dv + lim inf B y + e 2 dv. −∞ v a v y→∞ λ −a v i.e,

 Z −a 2 Z ∞ 2  Z a 2 sin v sin v 2a/λ sin v π ≤ c 2 dv + 2 dv + lim inf B(y)e 2 dv. −∞ v a v y→∞ −a v a Again, send a, λ → ∞ while λ → 0. Then,

π ≤ π lim inf B(y). ⇔ 1 ≤ lim inf B(y). y→∞ y→∞ THE DENSITY OF PRIMES OF THE FORM a + km 25

Hence, (5.10) is verified. We have proved lim B(y) = 1, which is the Wiener- y→∞ Ikehara theorem.  Acknowledgments. It is my pleasure to thank my mentor, Tianqi Fan for her help and helpful advice throughout this project. I also thank for Professor Emerton and Professor Narasimhan for their helpful comments for the project. Without their help, the project must have gone astray. I also thank Professor May for organizing REU this year.

References [1] J. P. Serre. A course in Arithmetic 5th. NY: Springer, 1996. [2] S. Lang. Complex Analysis 4th. NY: Springer, 1999. [3] H. M. Edwards. Riemann’s Zeta Function NY: Dover Publications, Inc, 2001. [4] K. Chandrasekharan Introduction to Analytic NY: Springer, 1968. [5] D. I. A. Cohen, T. M. Katz Prime Numbers and the First Digit Phenomenon J. Number Theory 18(1984), 261-268 [6] D. I. A. Cohen, An explanation of the first digit phenomenon, J. Combin. Theory. Ser. A 20. (1976), 367-370. [7] M. Ram Murty Problems in Analytic Number Theory NY: Springer, 2000.