SIEVE METHODS LECTURE NOTES, SPRING 2020

KEVIN FORD

1. BASICSIEVEMETHODSANDAPPLICATIONS A sieve is a technique for bounding the size of a set after the elements with “undesirable properties” (usually of a number theoretic nature) have been removed. The undesirable properties could be divisibility by a prime from a given set, other multiplicative constraints (divisibility by a perfect square for example) or inclusion in a set of residue classes. Inclusion-exclusion yields an exact formula, however for k properties this produces 2k summands which is usually too much to effectively deal with. A sieve is a procedure to estimate the number of “desirable” elements of the set using kOp1q summands. While inexact, oftentimes the sieve is capable of estimating the size very accurately. The original sieve is, of course, the , the familiar process of creating a table of prime numbers by systematically removing those integers divisible by small primes (but keeping the primes them- selves). The modern sieve was created by in the period 1915-1922 as a way of attacking famous unsolved problems such as Golbach’s Conjecture and the problem (both, so far, unsuccessfully). Sieve methods have since found enormous application in , often used as tools in many other types of problems, e.g. in studying Diophantine equations.

1.1. Notational conventions. τpnq is the number of positive divisors of n ωpnq is the number of distinct prime factors of n Ωpnq is the number of prime factors of n counted with multiplicity µpnq is the Mobius’s¨ function; µpnq “ p´1qωpnq if n is squarefree and µpnq “ 0 otherwise. P `pnq is the largest prime factor of n; P `p1q “ 0 by convention P ´pnq is the smallest prime factor of n; P ´p1q “ 8 by convention Ppzq is the set of positive squarefree integers composed only of primes ď z Λpnq denotes the von Mangoldt function 1X is the indicator function of the statement X or of the set X the symbol p, with or without subscripts, always denotes a prime πpx; q, aq is the number of primes p ď x in the progression a mod q. P denotes probability and E expectation logk x is the k-th iterate of the logarithm of x

1.2. General sieve setup. A sieve problem A is a probability space pΩ, F, Pq, together with a “total mass” quantity M and events Ap, one for each prime p. The “sifting function” is

SpA, zq “ M ¨ Ppnot Ap, @p ď zq. Oftentimes Ω will be a finite set of integers, with Ppn P Ωq “ 1{|Ω| for each n P Ω (the uniform probability measure), M “ |Ω| and Ap is the event that p|n, that is, Ap “ tn P Ω: p|nu. This is the standard “small 1 2 KEVIN FORD sieve” problem, where SpA, zq is the number of n P Ω with p - n for all p ď z; these are called the “unsifted numbers”. In the above definitions, M can be anything, but in practice it has some arithmetical meaning. Some specific examples: ‚ Eratosthenes sieve for primes. Ω “ r1, xs X , uniform probabilities on Ω, M “ |Ω| “ txu, and ? N ? A “ tn P Ω: p|nu. Then SpA, xq “ πpxq ´ πp xq ` 1, as the unsifted elements are the primes p ? in p x, xs together with the number 1. Twin primes. Ω 1, x , A n Ω: p n n 2 . The unsifted numbers are numbers n ‚ “ r s X N p “ t P | p ` qu ? ? such that npn ` 2q has no prime factor ď z. In particular, SpA, x ` 2q counts k P p x ` 2, xs for which both k and k ` 2 are prime. Equivalently, Ap is the set of n that avoid the residue classes 0 mod p and ´2 mod p. ‚ Twin primes, weighted version. Ω “ r2, xs X N, and Λpn ` 2q pn P Ωq “ ,M “ Λpn ` 2q, P M 2ďnďx ÿ Ap “ tn P Ω: p|nu. Here M “ 2ďnďx Λpn ` 2q „ x by the Theorem, and ? SpA, xq “ ř Λpn ` 2q “ Λpp ` 2q ? 2ďnďx? xăpďx P ´pÿnqą x ÿ “ logpp ` 2q ` Opx1{2q, ? xăpďx p`2ÿprime

the error term coming from terms p ` 2 “ qb where q is prime and b ě 2. 1 ‚ Prime tuples. Let a1, ¨ ¨ ¨ , ak P N and b1, . . . , bk P Z. Put Ω “ r1, xs X N, and

Ap “ tn P Ω: p|pa1n ` b1q ¨ ¨ ¨ pakn ` bkqu. ? For an appropriate c ą 0, which depends on a1, a2, . . . , ak, bk, SpA, c xq counts those n ď x for which a1n ` b1, . . . , akn ` bk are simultaneously prime. ‚ Prime values of a polynomial. Let f : Z Ñ Z be an irreducible polynomial of degree h ě 1, put h Ω “ r1, xs X Z, Ap “? tn P Ω: p|fpnqu. Let C be large enough so that |hpnq| ď Cn for all n ě 1. Then, as before, SpA, Cxhq captures values of n for which fpnq is prime. ‚ Goldbach’s problem. Let N be an even, positive integer,? put Ω “ t1, 2,...,N?´ 1u, M “ |Ω| “ N ´ 1, and Ap “ tk P Ω: p|kpN ´ kqu. Then S?pA, Nq counts numbers k P p N,Ns for which both k and N ´ k are prime. In particular, SpA, Nq ą 0 implies that N is the sum of two primes. If one shows this for all N ě 4, one deduces Goldbach’s Conjecture. ‚ Primes in an arithmetic progression. Fix coprime positive integers a and q, let

Ω “ t1 ď n ď x : n ” a pmod qqu, ? ? Ap “ tn P Ω: p|nu. Then SpA, xq captures primes in p x, xs that are in the arithmetic progres- sion a mod q.

1Unless otherwise specified, from now on whenever Ω is a finite set, the probability measure on Ω will be the uniform measure, and M will be the number of elements of Ω. SIEVE METHODS LECTURE NOTES, SPRING 2020 3

‚ Sums of two squares. Ω “ r1, xs X Z, tn P Ω: pe}n for some odd eu p ” 3 pmod 4q Ap “ #H otherwise. Then SpA, xq counts integers n ď x, for which we don’t have pe}n for any prime p ” 3 pmod 4q and odd exponent e. That is, SpA, xq is the number of integers n ď x which are the sum of two squares. ‚ Sieve by multiple residue classes. Let M,N be two integers, Ω “ tN ` 1,M ` 2,...,N ` Mu and for each prime p let Ip be some subset (possibly empty) of the residue classes modulo p. Put

Ap “ tn P Ω: n mod p R Ipu.

Here SpA, zq counts the integers in pN,M ` Ns avoiding all the residue classes Ip for primes p ď z. If |Ip| is bounded or bounded on average, then this is a very general sieving problem of “small sieve” type, whereas if |Ip| is unbounded on average, the problem falls under the umbrella of the “large sieve”. The case of prime values of a polynomial, see above, is a special case with

Ip “ tn P Z{pZ : fpnq ” 0 pmod pqu. k k ‚ Multivariate polynomial sieve. Let F pxq : Z Ñ Z be a multivariate polynomial of x “ k px1, . . . , xkq, take any finite Ω P Z , and Ap “ tx P Ω: p|F pxqu. Then SpA, zq counts x P Ω for which F pxq has no prime factor p ď z. ‚ The square-free sieve. Let Ω be a finite set of integers and for each prime p let Ap “ tn P Ω: p2|nu. Then SpA, zq, with an appropriately large z, will count the elements of Ω which are squarefree. A famous application is for squarefree values of a polynomial, e.g. Ω “ tfpnq : 1 ď n ď xu, where f is an irreducible polynomial. One can similarly set up a k-free sieve problem. ‚ Elliptic curve sieve. Fix and elliptic curve E over Q Let Ω be the set of primes q ď x. Let A “ tq P Ω: p|#E{ u, where E{ is the reduction of E modulo q. It is known that #E{ ď p ? Fq ? Fq Fq q ` 1 ` 2 q, and thus SpA, 2 xq counts those q for which #E{Fq is prime. If d is a square-free integer composed only of primes in P, define

(1.1) Ad “ Ap,Ad “ M ¨ PpAdq. p d č| In particular, A1 “ M. In the case where Ω is a finite set of integers with uniform measure, M “ |Ω|, and Ap “ tn P Ω: p|nu, Ad counts the number of n P Ω divisible by d. In this notation, inclusion-exclusion gives

(1.2) SpA, zq “ µpdqAd. P ` d z ÿp qď

1.3. Legendre’s sieve for primes (Legendre, 1808). Let Ω “ r1, xs X Z, Ap “ tn P Ω: p|nu. Then SpA, zq counts the positive integers n ď x with no prime factor ď z; in particular, this includes all of the primes between z and x. Also, for each aquarefree d, Ad “ tn P Ω: d|nu and thus

Ad “ |Ad| “ tx{du “ x{d ` Op1q. 4 KEVIN FORD

By (1.2), x πpxq ´ πpzq ď SpA, zq “ µpdq ` Op1q d P ` d z ÿp qď ´ ¯ µpdq “ x ` OpτpP qq d P ` d z ÿp qď 1 “ x 1 ´ ` O 2πpzq . p pďz ź ˆ ˙ ´ ¯ Taking z “ log x, and using the crude bound πpzq ď z together with Mertens’ bound, we conclude that x x πpxq ď z ` e´γ ` op1q ` Op2log xq “ O . log z log x ˆ 2 ˙ ` ˘ Remark: We can do better by observing that in fact Ad “ 0 for d ą x (cf. Hooley [86]), and thus restricting the sums to such d.

1.4. The role of independence. If the events Ap are independent, then the sieving problem is trivial, for then

(1.3) SpA, zq “ M p1 ´ PApq. pďz ź In practice, the events are not independent, but are close to being so, especially for small primes. For exam- ple, in Legendre’s sieve for primes, Ad “ tx{du is very close to x{d. Even with this strong approximation, however, the accumulation of error terms (coming from k-correlations) becomes unwieldy when z is much larger than log x.

1.5. Main goals. We will see that the right side of (1.3) is a good approximation to SpA, zq under very general conditions. We will accomplish this by a judicious pruning of the summands in (1.2). To set things up, we adopt some additional notation. Take X to be an approximation of M (this can be anything, but in practice it is very close to M). We assume that there is a function g satisfying

(g) 0 ď gppq ă 1 pall primes pq, which, when extended to a multiplicative function by gpdq “ p|d gppq, gives Ad « Xgpdq for squarefree d; that is, we require that the “remainders” ś (r) rd :“ Ad ´ Xgpdq to be “small on average”. In the case where the events Ap are independent, taking gppq “ PAp yields rd “ 0 for all d and we recover (1.3). In practice, however, we will not take gppq “ PAp but something very close which is convenient for calculations. We also adopt the short-hand

(V ) V pzq “ p1 ´ gppqq. pďz ź In this notation, the right side of (1.3) is about XV pzq. SIEVE METHODS LECTURE NOTES, SPRING 2020 5

Broadly speaking, if rd is not more than 1{X on average over “small” d, we will be able to prove the following:

(asymptotic) SpA, zq „ XV pzq pz “ Xop1qq; (1.4) (upper bound) SpA, zq ! XV pzq pz ď Xq; (lower bound) SpA, zq " XV pzq pz ď Xcq, where the constant c depends on the nature of the sieve problem A. In plain language, we can prove the expected asymptotic formula for small z, an upper bound of the expected order for all z, and a lower bound of the expected order if z is at most a small power of X. The upper bound in (1.4) is amazing in its generality, and it has enormous utility as an auxilliary counting device in many problems.

1.6. Sifting density / dimension, and level of distribution. For most sieving problems, we have gppq « κ{p on average over p (we’ll make this precise below). In this case κ is referred to as the sifting density or sifting dimension. In the literature, the linear sieve refers to dimension 1. Various sieving procedures have been optimized for sieves of a particular density, e.g. the Rosser-Iwaniec theory of the linear sieve, and Iwaniec’s theory of the half-dimensional sieve. Roughly speaking, the level of distribution of a sieve problem A is the largest D for which

2 µ pdq|rd| ď εXV pzq, d D,P ` d z ď ÿp qď where ε ą 0, X and z are given, and ε is small. The larger the level of distribution, the better quality of the bounds we can prove in (1.4).

1.7. More examples. There are limitations of the sieve, which are illustrated by the following examples.

1.7.1. Eratosthenes sieve. . The asymptotic in (1.4) cannot be expected to hold for z being a fixed power of X. Take Ω “ r1, xs X Z, X “ x, and set Ap “ tn P Ω: p|nu. As before,

Ad “ #tn ď x : d|nu “ tx{du “ x{d ` Op1q

Thus, taking gpdq “ 1{d, we see that the error terms rd “ Op1q. Also, ? ? x SpA, xq “ πpxq ´ πp xq ` 1 „ log x by the Prime Number Theorem. However, Mertens’ theorem gives 1 2e´γx XV pzq “ x 1 ´ „ , ? p log x pďźx ˆ ˙ ? with 2e´γ “ 1.122 .... The discrepancy between SpA, xq and XV pzq comes from the large amount of 1 2 1{3 dependence among the events Ap for large primes p; e.g. Ap X Ap1 X Ap2 “H if p ą p ą p ą x . In fact, for fixed c ą 0, one has SpA, xcq „ wpcqXV pzq, where wpcq ‰ 1 for almost all c P p0, 1s. Thus, in general the condition z “ Xop1q is necessary in order to conclude the asymptotic in(1.4). 6 KEVIN FORD ? 1.7.2. Twin primes. . Take Ω 1, x , X x, A n Ω: p n n 2 . Here S A, x 2 “ r s X Z ?“ p “ t P | p ` qu p ` q counts the number of twin prime pairs between x ` 2 and x. Hardy and Littlewood [72, Conjecture B] conjectured that the count of such pairs is „ Cx{ log2 x where 1 C “ 2 1 ´ « 1.32. pp ´ 1q2 pą2 ź ˆ ˙ For a heuristic explanation of this formula, see Section 1.10 below. By breaking up r1, xs into subintervals of length d, we easily derive ρpdq A “ #tn ď x : d|npn ` 2qu “ x ` Opρpdqq, d d where ρpdq “ #t0 ď k ď d ´ 1 : kpk ` 2q ” 0 pmod dqu. By the Chinese remainder theorem, ρ is multiplicative, ρp2q “ 1 and ρppq “ 2 for p ą 2. Thus, this is a sieve problem of dimension 2 (or sifting density 2). Putting gpdq “ ρpdq{d and applying Mertens, we get that x 2 p4e´2γqCx (1.5) XV pzq “ 1 ´ „ . 2 p 2 3ďpďz log x ź ˆ ˙ As in Example (a) above, XV pzq differs by a constant multiplicative factor from what is expected to be true. ? Sieve methods deliver an upper bound of the expected order (take z “ x) x #tn ď x : n and n ` 2 are both primeu ! xV pzq — . log2 x Sieve methods only, however, deliver a lower bound for somewhat smaller z. For example, it is known that x SpA, x1{5q " XV pzq — . log2 x From the last estimate, we conclude that there are " x{ log2 x values of k ď x for which each of k and k `2 has at most 4 prime factors. We will prove a somewhat weaker version of this below (with 4 replaced by 10). This is a typical conclusion from a lower bound sieve. This is proved using the “linear variant” of the twin prime sieving problem. Here take Ω “ tp ` 2 : p ď xu a set of shifted primes, Ap “ tn P Ω: p|nu. In this set-up, lipxq Ad “ πpx; d, ´2q „ p2 - dq φpdq by the prime number theorem in arithmetic progressions. For the application to the sieve, we need a uniform 1 estimate on πpx; d, ´2q, at least on average over d. Here we take X “ lipxq, ad gppq “ p´1 for odd p. Since gppq « 1{p, this is a sieve problem of dimension 1. Oftentimes, this process of “dimension lowering” yields stronger results, as the sieve procedures for smaller dimension are at present stronger.

1.7.3. Prime k-tuples. . Let a1, ¨ ¨ ¨ , ak P N and b1, . . . , bk P Z. Put Ω “ r1, xs X N, and

Ap “ tn P Ω: p|pa1n ` b1q ¨ ¨ ¨ pakn ` bkqu. An easy counting yields ρpdq A “ x ` Opρpdqq, d d SIEVE METHODS LECTURE NOTES, SPRING 2020 7

Admissible Non-admissible pn, n ` 2kq; k P N pn, n ` 1q pn, 2n ` 1q pn, 3n ` 1q pn, n ` 2, n ` 6q pn, n ` 2, n ` 4q where

ρpdq “ #t0 ď n ă d : pa1n ` b1q ¨ ¨ ¨ pakn ` bkq ” 0 pmod dqu. By the Chinese Remainder Theorem, ρpdq is multiplicative. We say that the collection of linear forms a1n ` b1, . . . , akn ` bk is admissible if ρppq ă p for all primes p. In the contrary case, for all n, one of the forms ajn ` bj is divisible by p and hence there are only finitely many n making all of the ajn ` bj simultaneously prime. Some examples: We set gppq “ ρppq{p. Note that if k p - ai paibj ´ ajbiq, i“1 1ďiăjďk ź ź then ρppq “ k (see Theorem 2.5 below). In particular, ρppq “ k for all sufficiently large p, and hence this is a sieve problem of density k (or dimension k). At present, sieve methods can deliver bounds of the form x #tn ď x : ajn ` bj are prime for all ju ď C , plog xqk where C is an explicit function of a1, b1, . . . , ak, bk. If k ě 2 we still do not know how to show that the left side goes to 8 as x Ñ 8.

1.7.4. Selberg’s examples. [123]. The values of c for which sieve method deliver lower bounds (1.4) are invariable smaller than we would like. There is a fundamental barrier at work which explains this, known as the “parity barrier”. Roughly speaking, the small sieve works with inputs X, the function g and esti- 1´op1q mates for the remainders rd. However, even if the level of distribution is very large, say x , the sieve fundamentally cannot distinguish between numbers with an odd number of prime factors from those with an even number of prime factors. Consider two defined as follows. Recall the Liouville func- tion λpnq “ p´1qΩpnq (the completely multiplicative function which is -1 at all primes). Let A`, A´ be probability spaces on the sets Ω` “ t1 ď n ď x : λpnq “ 1u, Ω´ “ t1 ď n ď x : λpnq “ ´1u, respectively, and Ap “ tn P Ω: p|nu for each p. The prime number theorem (with classical error term) implies 1? λpnq “ Opxe´c log xq, some c1 ą 0. nďx ÿ Therefore, 1 ˘ λpdmq 1 x λpdq #tn P Ω˘ : d|nu “ “ ˘ λpmq 2 2 d 2 m x d m x d ÿď { Y ] ÿď { x x ? “ ` O e´c logpx{dq . 2d d ´ ¯ 8 KEVIN FORD

˘ x x 1 In particular, taking d “ 1, we wee that |Ω | „ 2 . Take X “ 2 and gpdq “ d for all d. For both sequences, the level of distribution is x1´op1q (pretty much the best range that one can hope for), and for both sieve problems we have 2e´γ V pzq „ . log x ? However, numbers n ď x that have no prime factor ď x are prime or 1, thus ? ? x 2X SpA`, xq “ 1, while SpA´, xq „ “ . log x log x

Thus, although the sieve inputs (quantity X and bounds on Ad) are identical in both problems, the truth is very different. In order to distinguish primes from integers with 2 prime factors, say, further inputs into the sieve are required. Sieve procedures which include as hypotheses bilinear sum bounds for Ω have proven to be very successful in detecting primes, e.g. Friedlander-Iwaniec [56] and Harman [76].

1.8. The small sieve. Viggo Brun’s fundamental idea was to replace the huge sum on the right side of (1.2) with a sum over a much smaller range of d, at the expense of replacing the equality in (1.2) with an inequality. In general, a sieve (or small sieve) is a sequence λ “ pλdq supported on squarefree integers d ` ` which replaces µpdq in (1.2). We will suppose that either λ “ λ “ pλd q satisfies ` ` ` (λ ) λ1 “ 1, λd ě 0 pm ą 1q d m ÿ| ´ ´ or that λ “ λ “ pλd q satisfies ´ ´ ´ (λ ) λ1 “ 1, λd ď 0 pm ą 1q. d m ÿ| We call λ` an upper bound sieve and λ´ a lower bound sieve, which comes from the following easy result:

Lemma 1.1. For z ě 2 let Ppzq denote the set of squarefree positive integers, divisible only by primes p ď z. Assume (λ`) and (λ´). Then, for any sieve problem and and z ě 2, ´ ` (1.6) λd Ad ď SpA, zq ď λd Ad. d z d z PÿPp q PÿPp q Further, for any multiplicative function g such that 0 ď gppq ă 1 for each p ď z, we have ´ ` (1.7) λd gpdq ď p1 ´ gppqq ď λd gpdq. d z pďz d z PÿPp q ź PÿPp q Proof. For any ω P Ω, let

mω “ p. pďz ωźPAp Then, by (λ`), 1 SpA, zq “ MPpmω “ 1q “ M ¨ E mω“1 ` ` ď M ¨ E λd “ λd Ad, d m d z ÿ| ω PÿPp q SIEVE METHODS LECTURE NOTES, SPRING 2020 9 and similarly by (λ´), ´ ´ SpA, zq ě M ¨ E λd “ λd Ad. d m d z ÿ| ω PÿPp q The claim (1.7) is a special case, where our probability space has independent events Ap such that PAp “ gppq, so that SpA, zq “ M pďzp1 ´ gppqq and Ad “ Mgpdq.  The major goal of sieve methodsś is to construct good sieve parameters λ˘, with small support and with the sums in (1.6) mimicking SpA, zq as closely as possible. With this notation and (r), we have

(1.8) λdAd “ X gpdqλd ` λdrd. d z d z d z PÿPp q PÿPp q PÿPp q As λd is a replacement for µpdq, it is reasonable to suppose (if we have constructed our sieve well) that

gpdqλd « gpdqµpdq “ p1 ´ gppqq “ V pzq. d z d z pďz PÿPp q PÿPp q ź 1.9. Legendre’s sieve, general version. Theorem 1.2. Let A be a sieve problem, assume (g), (r) and adopt notation (V ). Then2

(1.9) SpA, zq “ XV pzq ` O |rd| . d z ˆ PÿPp q ˙ ˘ ` ´ Proof. Trivially, the weights λd “ µpdq satisfy (λ ) and (λ ) with equality. By (1.6),

SpA, zq “ X µpdqgpdq ` µpdqrd “ XV pzq ` O |rd| .  d z d z d z PÿPp q PÿPp q ˆ PÿPp q ˙ Although this sieve suffers from the large number, 2πpzq, of remainder summands, it is useful in situations where the “densities” gppq are rather small on average, and so the product on the right hand side of (1.9) captures the true behavior of set of interest for relatively small z. A prominent example of the use of Legendre’s sieve was given by C. Hooley [82], who deduced Artin’s primitive root conjecture from the Generalized Riemann Hypothesis for Dedekind zeta functions of certain number fields. Details will be given later in Section 2.2.6. 1.10. The prime k-tuples conjecture. Much of sieve theory has been driven by attempts to prove special cases of the general Prime k-tuples Conjecture. The setup is a finite collection f1, . . . , fk of nonconstant irreducible (over Q) polynomials in m variables, with integer coefficients. For each prime p, let

ρppq “ #tx “ px1, . . . , xmq mod p : f1pxq ¨ ¨ ¨ fkpxq ” 0 pmod pqu. m Definition 1. The set pf1, . . . , fkq is admissible if the fi are distinct and ρppq ă p for all p.

Conjecture 1.3 (General Prime k-tuples Conjecture). Let f1, . . . , fk be an admissible collection of polyno- m mials from Z to Z. Then S xm (1.10) #t0 ď xi ă x p1 ď i ď mq : f1pxq, . . . , f pxq are all prime u „ , k k plog xqk i“1 degpfiq 2 Recall that rd is supported on squarefree integers d. Thus, for any sum involving rd, theś sums is restricted to squarefree integers. 10 KEVIN FORD where degpfiq is the total degree of fi, and ρppq 1 ´k S “ Spf1, . . . , fkq “ 1 ´ m 1 ´ p p p ź ˆ ˙ ˆ ˙ is the so-called singular series associated with f1, . . . , fk. One can show that ρppq{pm´1 is k on average and this implies that the infinite product converges (details below in the case of univariate polynomials). This conjecture subsumes a large number of conjectures that have been made over time, in various degrees of generality. We mention here the conjectures of Bunyakowsky [15], Dickson [27], Hardy-Littlewood [72], Schinzel [119], and Bateman-Horn [10]. Some special cases.

‚ Primes in an arithmetic progression. m “ 1, k “ 1, f1pnq “ qn ` a, where pa, qq “ 1. Dirichlet proved [28] in 1837 that there are infinitely many n with f1pnq prime; the Prime Number Theorem for arithmetic progressions (de la Valee´ Poissin, 1896) gives the full asymptotic (1.10). S 1 ‚ Twin primes. m “ 1, k “ 2, f1pnq “ n, f2pnq “ n ` 2. Here “ C :“ 2 pą2p1 ´ pp´1q2 q “ 1.32 ... is the “twin prime constant”. ś ‚ “Sexy” primes. m “ 1, k “ 2, f1pnq “ n, f2pnq “ n ` 6. Here S “ 2C since ρp2q “ ρp3q “ 1 and ρppq “ 2 for p ą 3. That is, there are twice as many “sexy primes” as twin primes. ‚ Sophie Germain primes. m “ 1, k “ 2, f1pnq “ n, f2pnq “ 2n ` 1. 2 2 ‚ Primes of form n ` 1. m “ 1, k “ 1, f1pnq “ n ` 1. ‚ k-term arithmetic progressions of primes. m “ 2, forms n1, n1`n2, n1`2n2, . . . , n1`pk´1qn2. When k “ 3, the asymptotic in Conjecture 1.3 was essentially proved by Vinogradov in 1937. Balog [5] extended this to include many other collections of forms with m ě 2. Green and Tao [65] showed that there are infinitely many k-term arithmetic progressions of primes for any k ě 4, and this was extended by Green and Tao and by Green, Tao and Ziegler [66, 67, 68, 69] in 2010–12 to prove the full asymptotic in (1.10). Their theory extends to many other collections of linear forms when m ě 2. 2 2 2 2 ‚ Primes of the form x ` y . m “ 2, k “ 1, f1px, yq “ x ` y . Fermat showed that every prime p ” 1 pmod 4q is the sum of two squares. 2 4 2 4 ‚ Primes of the form x ` y . m “ 2, k “ 1, f1px, yq “ x ` y . The infinitude of such primes, and in fact the full asymptotic (1.10), is a celebrated theorem of Friedlander and Iwaniec [55] in 1998.

The only case of (1.10) which is known when m “ 1 is the single linear f1 case. In fact, other than the case k “ 1 and f1 linear, it is not known a single specific example of a set of forms for which there are infinitely many n P Z making all of fipnq simultaneously prime. There is a relatively easy heuristic for (1.10). According to the Prime Number Theorem, a randomly 1 chosen integer near x has a likelihood of about log x of being prime. Assuming that the fipxq behave 1 1 randomly, the likelihood of fipxq being prime should be about „ if each xi P r1, xs. log fipxq degpfiq log x This leads to the prediction that 1 xm #t0 ď xi ă x p1 ď i ď mq : f1pxq, . . . , f pxq are all prime u „ . k k plog xqk i“1 degpfiq This matches (1.10) except for the singular series factor. Implicit in theś “randomness” hypothesis is the k assumption that for any prime p, the likelihood that each of fipxq is coprime to p is about p1 ´ 1{pq . This SIEVE METHODS LECTURE NOTES, SPRING 2020 11 is not correct, however, and if x is chosen randomly modulo p, then the likelihood that each of the fipxq is coprime to p is exactly 1 ´ ρppq{pm. Thus, in our heuristic we should insert a correction factor ρppq 1 ´k 1 ´ 1 ´ . pm p ˆ ˙ ˆ ˙ Doing this for all p produces a correction factor equal to Spf1, . . . , fkq, and leads to the more precise prediction (1.10).

1.11. Brun’s pure sieve. Brun’s sieve is based on a simple truncated version of inclusion-exclusion, due to Brun (1915).

Lemma 1.4 (Inclusion-exclusion). Let u be a non-negative integer. Then, for any k P N, 8 u k u u ´ 1 1 “ p´1qr “ p´1qr ` p´1qk`1 , u“0 r r k r“0 r“0 ÿ ˆ ˙ ÿ ˆ ˙ ˆ ˙ ´1 where we set j “ 0 for all j. Proof. We may` assume˘ that u ě 1, as the statement is trivial when u “ 0. The first equality is trivial from the binomial theorem. For the second, when u ě 1 we have 8 u 8 u ´ 1 u ´ 1 u ´ 1 p´1qr “ p´1qr ` “ p´1qk`1 . r r ´ 1 r k  r“k`1 r“k`1 ÿ ˆ ˙ ÿ „ˆ ˙ ˆ ˙ ˆ ˙ Theorem 1.5 (Brun’s pure sieve). Let k be a nonnegative integer and define µpdq if ωpdq ď k λd “ . #0 otherwise; ` ´ Then λ satisfies (λ ) if k is even and (λ ) if k is odd. Thus, if ke is even and ko is odd, then for any sieve problem A and any z ě 2 we have

(1.11) µpdqAd ď SpA, zq ď µpdqAd. dPPpzq dPPpzq ωpdÿqďko ωpdÿqďke Proof. Let k ě 0. Then, by Lemma 1.4, k ωpmq ωpmq ´ 1 1 “ 1 “ p´1qr ` p´1qk`1W, W “ ě 0, m“1 ωpmq“0 r k r“0 ˆ ˙ ˆ ˙ ÿk “ p´1qr 1 ` p´1qk`1W r“0 d|m ÿ ωpÿdq“r “ µpdq ` p´1qk`1W ω d k pÿqď k`1 “ λd ` p´1q W, d ÿ ` ´ from which follows (λ ) if k is even and (λ ) if k is odd. The final claim (1.11) follows from (1.6).  12 KEVIN FORD

In probability theory, the inequalities in Theorem 1.5 were later rediscovered by Bonferroni, and are often referred to as the “Bonferroni inequalities”.

Lemma 1.6. Let z ě 2 and 0 ď fppq ď 1 for each prime p ď z. Let k be a non-negative integer. Extend f multiplicatively by defining fpdq “ p|d fppq for any squarefree d with d P Ppzq. Then ś µpdqfpdq “ p1 ´ fppqq ` p´1qkW, dPPpzq pďz ωpÿdqďk ź where 1 k`1 0 ď W ď fpdq ď fppq . pk ` 1q! dPPpzq ˆ pďz ˙ ωpdÿq“k`1 ÿ

Proof. By Theorem 1.5 and (1.7),

p1 ´ fppqq “ µpdqfpdq ` p´1qk`1W, 0 ď W ď fpdq. pďz ω d k ω d k 1 ź pÿqď p ÿq“ ` The final inequality for W comes from expanding the pk ` 1q-fold sum (this is an old Erdos˝ trick). 

Theorem 1.7. Let A be a sieve problem, assume (g) and (r). Then

3{2 SpA, zq “ XV pzq ` OpXV pzq q ` O |rd| . 4 logp1{V pzqq`1 ˆ dďz ÿ ˙ where V pzq is given by (V ).

1 Proof. Assume V pzq ą 0 otherwise there is nothing to prove. Now apply Theorem 1.5 with k “ 4 log V pzq , followed by an application of Lemma 1.6. This gives Y ]

SpA, zq “ µpdqAd ` O Ad dPPpzq ˆ dPPpzq ˙ ωpÿdqďk ωpdÿq“k`1

“ X µpdqgpdq ` O X gpdq ` R dPPpzq ˆ dPPpzq ˙ ωpÿdqďk ωpdÿq“k`1 1 k`1 “ XV pzq ` O X gppq ` R, k 1 ! p ` q pďz ˆ ˆ ÿ ˙ ˙ where

|R| ď |rd|. dPPpzq ωpdÿqďk`1 SIEVE METHODS LECTURE NOTES, SPRING 2020 13

Lastly, by our definition of k, 1 k`1 1 k`1 gppq ď ´ logp1 ´ gppqq k 1 ! k 1 ! p ` q pďz p ` q pďz ˆ ÿ ˙ ˆ ÿ ˙ 1 1 k`1 “ log pk ` 1q! V pzq (1.12) ˆ ˙ 1 k`1 e log V pzq ď ˜ k ` 1 ¸ ď pe{4qk`1 ! V pzq4 log 4´4 ď V pzq3{2. This completes the proof.  Remarks. We have imposed virtually no hypotheses on the sieve problem A in this theorem. In ap- plications, one has typically V pzq — plog Xq´κ for some fixed κ, and thus we have applied (1.11) with k « 4κ log2 X. Typically in the sum in identity (1.2) and the sums in Brun’s inequalities (1.11), the sum- mands corresponding to d ą X are negligible (or identically zero). Hardy and Ramanujan [74] in 1917 showed that most integers d ď X have about log2 X prime factors, and thus it is natural to choose k somewhat larger than log2 X in order to capture the bulk of the sum.

1.11.1. Example: twin primes. As before, let Ω “ r1, xs X Z, Ap “ tk P Ω: p|kpk ` 2qu. Take ρppq gppq “ , ρp2q “ 1, ρppq “ 2 pp ą 2q p and then, for squarefree d we have

|rd| ď ρpdq ď τpdq. By Mertens’ estimate (cf., (1.5)), V pzq „ cplog zq´2 for some constant c. Take 1 z “ x 16 log2 x , so that in the summation of the error terms rd we have z4 logp1{V pzqq`1 “ z8 log2 z`Op1q ! x1{2`op1q. Thus, 1{2`op1q |rd| ď τpdq ! x . dPPpzq dďz4 logp1{V pzqq`1 ωpdqď4 logÿp1{V pzqq`1 ÿ By Theorem 1.5, cx log x 2 SpA, zq „ XV pzq „ „ 256cx 2 . log2 z log x ˆ ˙ As SpA, zq ě #tz ă k ď x : k, k ` 2 both primeu, we see that log x 2 #tk ď x : k, k ` 2 both primeu ! x 2 , log x ˆ ˙ 2 which misses the conjectured order by a factor plog2 xq . Applying partial summation gives an immediate corollary. 14 KEVIN FORD

Corollary 1.8 (Brun [18], 1919). We have 1 ă 8. p p:p,p`2 prime ÿ log2 x Remarks. Applying Theorem 1.5 to the sieve of Eratosthenes yields πpxq ! x log x , missing the true order of πpxq by a factor log2 x. Brun later [19] gave a much more complicated version of his sieve, where the simple truncation (1.11) is replaced by sieves where one considers the summation over integers d with restricted prime factors of various sizes. A greatly simplified version of this idea was found by Hooley, and which will be the subject of the following section. SIEVE METHODS LECTURE NOTES, SPRING 2020 15

2. THE BRUN-HOOLEYSIEVE In this section and the next, we present a variation of Brun’s pure sieve due to C. Hooley [87], which is very simple, from a combinatorial viewpoint, and yet powerful enough to deliver quickly each of the desired sieve bounds in (1.4). Some general estimates using this method were given by Ford and Halberstam [51].

2.1. Upper bounds. The fundamental idea of the upper bound sieve is to partition the primes into sets P1,..., Pt and apply the Brun sieve bounds on each set Pi separately. The partition may be finite or infinite, that is, we allow t “ 8.

piq piq Lemma 2.1. Partition the primes as P1 Y ¨ ¨ ¨ Y Pt. For each i, let λ “ pλd qd be an upper bound sieve. For any squarefree d, let t i λ` “ λp q, d di i“1 ź where d1, . . . , dt are defined uniquely by

(2.1) d “ d1 ¨ ¨ ¨ dt, p@i, p|di ñ p P Piq. Then λ` is an upper bound sieve, i.e., satisfies (λ`).

` Proof. Clearly λ “ 1. Also, for any m ą 1, m has a unique decomposition as m “ m1 ¨ ¨ ¨ mt, where for ` each i, all of the prime factors of mi are in Pi. Then, by (λ ), t i λ` “ λp q ě 0, di d m i“1 d m ÿ| ź ˆ ÿi| i ˙ as required. 

piq Taking each λd to be an upper bound Brun sieve (from Theorem 1.5) with k “ ki even, we arrive at

Lemma 2.2 (The Brun-Hooley upper bound sieve). Let P1 Y ¨ Y Pt be any partition of the primes, and let k1, . . . , kt be arbitrary non-negative even integers. Then the sequence λ given by

` µpdq if ωpdjq ď kj p1 ď j ď tq (2.2) λd “ #0 otherwise is an upper bound sieve satisfying (λ`). Here d uniquel decomposes as in (2.1).

The number theoretic motivation for this comes from looking at the statistical distribution of prime factors of integers ď X. Not only does a typical integer have about log2 X prime factors, but the prime factors themselves are typically uniformly distributed on a log2-scale; that is, there are about log2 t prime factors ď t, uniformly for t ď X. With Lemma 2.2, we can restrict the number of large prime factors of the summands d while still retaining almost all significant summands. Suppose that we have a sieve problem A, z ě 2 and assume (g) and (r). Define

Pi “ p p1 ď i ď tq pPPi pźďz 16 KEVIN FORD

From Lemma 2.2 and (1.6) we immediately get

SpA, zq ď ¨ ¨ ¨ µpd1q ¨ ¨ ¨ µpdtqAd1¨¨¨dt d1|P1 dt|Pt ωpdÿ1qďk1 ωpdÿtqďkt “ XU1 ¨ ¨ ¨ Ut ` R, where

(2.3) Uj “ µpdjqgpdjq,R “ ¨ ¨ ¨ µpd1 ¨ ¨ ¨ dtqrd1¨¨¨dt . d P d P d P ÿj | j ÿ1| 1 ÿt| t ωpdj qďkj ωpd1qďk1 ωpdtqďkt Define 1 (2.4) Vj “ p1 ´ gppqq,Lj “ log . Vj pPPj pźďz

Notice that V1 ¨ ¨ ¨ Vt “ V pzq. Lemma 1.6 plus gppq ď ´ logp1 ´ gppqq implies Lkj `1 Lkj `1 Lkj `1 j Lj j Lj j Vj ď Uj ď Vj ` “ Vj 1 ` e ď Vj exp e . pkj ` 1q! ˜ pkj ` 1q!¸ # pkj ` 1q!+

The last inequality appears wasteful, but in practice the quantity in the exponential is small. When kj “ 0 we can omit the factor eLj since ´1 Lj Uj “ 1 “ VjVj “ Vje . This leads to small improvements in numerical constants. Multiplying these inequalities together for all j, we have E (2.5) V pzq ď U1 ¨ ¨ ¨ Ut ď e V pzq, where t kj `1 L 1 Lj (2.6) E :“ e j kj ą0 ,. pk ` 1q! j“1 j ÿ We conclude from (1.6) and (1.8) the following.

Theorem 2.3. Let A be a sieve problem and assume (g), (r) and (V ). Partition the set of primes in r1, zs into P P , let P p and let k , . . . , k be non-negative even integers. Then 1 Y ¨ ¨ ¨ Y t i “ pPPi 1 t ś SpA, zq ď XV pzqeE ` R1, where E is given by (2.6) and 1 (2.7) R :“ |rd|.

ωppd,Pj qqďkj p1ďjďtq P `ÿpdqďz ` In particular, defining λd as in Lemma 2.2, we have ` E (2.8) λd gpdq ď e V pzq. d ÿ SIEVE METHODS LECTURE NOTES, SPRING 2020 17

To make further progress and produce an upper bound of general utility, we make a very mild assumption on the function g, which is satisfied in a large number of cases. It is sometimes called the Iwaniec condition. We assume that for some κ ě 0 and B ą 0 that log w κ B (Ω) p1 ´ gppqq´1 ď exp p2 ď y ď w ď zq log y log y yďpďw ź ˆ ˙ ˆ ˙ Roughly speaking, this states that gppq À κ{p on average over p. Although B, κ are not uniquely defined by (Ω), the smallest admissible value of κ (with B remaining bounded) is sometimes referred to as the “dimension” or “sifting density”. It is easy to show (cf., Exercise 2.1 below), that condition (Ω) is implied by the condition

(Ω0) gppq ď min pκ{p, 1 ´ δq , with the same value of κ and δ ą 0 depending on κ and B. Although (Ω0) is easy to verify, for many problems we have (Ω) holding with a smaller value of κ than the global bound (Ω0), and this produces quantitatively better sieve bounds. We can now obtain a general purpose upper bound of type in (1.4). In sums of remainders rd we recall that rd is supported only on squarefree d.

Theorem 2.4. Let A be a sieve problem, let z ě 2 and assume (g), (r) and (V ). Let κ0 ą 0 and B0 ě 0. Assume (Ω) with 0 ď κ ď κ0 and 0 ď B ď B0. Then for any z ě 2 we have

SpA, zq ď Oκ0,B0 pXV pzqq ` |rd|, dďz ÿ the implied constant depending only on κ0,B0. Proof. Before invoking (Ω), we will work out a general procedure for producing upper bounds from Theo- rem 2.3. We suppose that

zt`1 “ 2 ă zt ă zt´1 ă ¨ ¨ ¨ ă z1 “ z

(2.9) Pj “ tp prime : zj`1 ă p ď zju p1 ď j ď t ´ 1q,

Pt “ tp prime : zt`1 ď p ď ztu.

This way, P1,..., Pt partition the primes in r2, zs. The primes ą z play no role in SpA, zq and may be 1 ignored (or assigned arbitrarily to P1, for example). In the sum (2.7) defining R , we have

k1 kt d1 ¨ ¨ ¨ dt ď z1 ¨ ¨ ¨ zt . A convenient choice is 1{4j´1 zj “ z p1 ď j ď tq, where t is chosen maximally so that (2.9) holds. We also take j´1 k1 “ 0, kj “ 2 pj ě 2q. In (2.7), we have

k1 kt (2.10) d ď z1 ¨ ¨ ¨ zt ď z Invoking (Ω) and taking logarithms, we have

B B0 L “ ´ logp1 ´ gppqq ď κ log 4 ` ď κ log 4 ` “: L. j log z 0 log 2 z ăpďz j`1 j`1ÿ j 18 KEVIN FORD

Therefore, in the notation of Theorem 2.3, k t j 8 2j `1 Lj L (2.11) E ď eLj ď eL ! 1. k ! 2j´1! κ0,B0 j“1 j j“1 ÿ ÿ The theorem now follows from Theorem 2.3. 

2.2. Applications of the upper bound sieve. Theorem (2.4) is very easy to apply in practice. It suffices to verify that the sifting function gppq has regular behavior ((Ω) or (Ω0)) and that the remainders rd are small on average in some reasonable range.

2.2.1. Primes. Take the Eratosthenes sieve Ω “ r1, xs X N, Ap “ tn P Ω: p|nu, X “ x, gppq “ 1{p, z “ X1{2. Then, by Theorem 2.4, x πpxq ď SpA, zq ` z ! XV pzq ` Opzq ! , log x matching Chebyshev’s bound. 2.2.2. Prime k-tuples.

Theorem 2.5. Let a1, . . . , ak be non-zero integers and b1, . . . , bk integers. Let ρpdq be the number of solutions modulo d of pa1n ` b1q ¨ ¨ ¨ pakn ` bkq ” 0 pmod dq, and assume that ρppq ă p for all primes p (that is, the linear forms ain ` bi, 1 ď i ď k, are admissible). Also assume that E ‰ 0, where k E “ ai paibj ´ ajbiq . ˇ i“1 iăj ˇ ˇ ź ź ˇ Then ρppq ‰ k if and only if p|E, and furthermore,ˇ ˇ ˇ ˇ Sx #tn ď x : ain ` bi prime , 1 ď i ď ku !k logk x x 1 ρppq´k ! 1 ´ k k p log x p E ź| ˆ ˙ x E k !k , logk x φpEq ˆ ˙ where ρppq 1 ´k S “ 1 ´ 1 ´ p p p ź ˆ ˙ ˆ ˙ and the implied constants may depend on k alone.

Proof. Define our sieve problem as follows. Let Ω “ r1, xs X Z and

Ap “ tn P Ω: p|pa1n ` b1q ¨ ¨ ¨ pakn ` bkqu for each prime p. Let X “ x and put z “ X1{2. For squarefree d, let ρpdq be the number of solutions n mod d of the congruence pa1n ` b1q ¨ ¨ ¨ pakn ` bkq ” 0 pmod dq. SIEVE METHODS LECTURE NOTES, SPRING 2020 19

By the Chinese remainder theorem, ρ is multiplicative. Now let p be prime and consider ρppq. Since ρppq ă p, it follows that pai, biq “ 1 for all i. Then the congruence ain ` bi ” 0 pmod pq has a solution if and only if p - ai. Hence, if p|ai for some i, then ρppq ă k. Now suppose that p - a1 ¨ ¨ ¨ ak, and for each i let ri be the unique residue class modulo p with airi ` bi ” 0 pmod pq. It is clear that ri “ rj if and only if p|paibj ´ ajbiq. Thus, if p|E then ρppq ă k, and if p - E then r1, . . . , rk all exist and are distinct, so ρppq “ k. This proves the first claim. Setting gppq “ ρppq{p, we see that (Ω0) holds with δ “ 1{pk ` 1q and κ “ k. Then (Ω) holds with κ “ k and some B depending only on k. Moreover, ρpdq A “ x ` r , |r | ď ρpdq, d d d d and thus ρpdq k |r | ď ρpdq ď x1{2 ď x1{2 1 ` ! x1{2plog xqk d d p k dďz 1{2 1{2 pďz ÿ dďÿx dďÿx ź ˆ ˙ by Mertens’ theorem. By Theorem 2.4 plus the easy bound 1 1 V pzq "k p1 ´ k{pq "k k "k k , 2kăpďz log z log x ź we have 1{2 k SpA, zq !k xV pzq ` x plog xq ! xV pzq.

There are at most z values of n ď x such that ain ` bi are all prime and ď z. Thus, 1{2 #tn ď x : ain ` bi prime , 1 ď i ď ku ď z ` SpA, zq ! x ` xV pzq ! xV pzq. Next, ρppq V pzq “ 1 ´ p pďz ź ˆ ˙ 1 ρppq 1 ´k ! 1 ´ 1 ´ k log z k p p p q pďz ź ˆ ˙ ˆ ˙ S ρppq ´1 1 k “ 1 ´ 1 ´ log z k p p p q pąz ź ˆ ˙ ˆ ˙ S k ´1 1 k ! 1 ´ 1 ´ k plog xqk p p pą2k ź ˆ ˙ ˆ ˙ S ! . k plog xqk ´k 2 ρ Finally, since ρppq “ k if and only if p - E, p1´k{pqp1´1{pq “ 1`Okp1{p q and 1´ρ{p ď p1´1{pq , we have ρppq 1 ´k 1 ρppq´k E k S ! 1 ´ 1 ´ ď 1 ´ ď . k p p p φpEq  p E p E ź| ˆ ˙ ˆ ˙ ź| ˆ ˙ ˆ ˙ Remarks. Examining the proof, we see that S "k 1, that is , S is bounded away from zero. On the other hand, S is not bounded above as one of the following examples shows. 20 KEVIN FORD

Corollary 2.6. We have, for positive m, 2m x #tp ď x : p, p ` 2m both primeu ! , φp2mq log2 x x #tp ď x : p, 2p ` 1 both primeu ! , log2 x σpmq m #tp, q prime : p ` q “ 2mu ! . m log2 m Proof. The count of generalized twin primes is the special case k “ 2 with the forms n, n ` 2m. Here ρppq “ 1 for p|2m and ρppq “ 2 otherwise, and we have 1 ´1 2m S — 1 ´ “ . p φp2mq p 2m ź| ˆ ˙ Also, E “ 2m. The count of Sophie Germain is easier: here we use the forms n, 2n ` 1 and E “ 2. For the application to Goldbach’s Conjecture, take the forms n, 2m ´ n, which gives E “ 2m. The final estimate m σpmq comes from the elementary bound φpmq ! m . 

2.2.3. The Brun-Titchmarsh inequality. Denote by πpx; q, aq the number of primes p ď x satisfying p ” a pmod qq.

Theorem 2.7 (Brun-Titchmarsh inequality). There is a constant C so that uniformly for 1 ď a ď q ă y ď x and pa, qq “ 1, y πpx; q, aq ´ πpx ´ y; q, aq ď C . φpqq logpy{qq Remarks. The case a “ q “ 1, that is, showing that πpxq ´ πpx ´ yq ! y{ log y, was asserted by Hardy and Littlewood [72, p. 69] without proof, the authors claiming that it followed from the method of Brun [19]. Using the Eratosthenes sieve, Hardy and Littlewood [72, Theorem G] showed the weaker bound πpxq ´ πpx ´ yq ! y . The case x “ 0 with an arbitrary a, q was shown by Titchmarsh [129]. The log2 y constant C “ 2 is admissible by work of Montgomery and Vaughan [100]. The utility of this bound is its uniformity in x, y, a, q. If πpx; q, aq :“ #tp ď x : p ” a pmod qqu, the prime number theorem for arithmetic progressions implies that x πpx; q, aq „ φpqq log x for every individual q, a. Issues of uniformity are crucially important, and are intimately connected to questions of the existence of zeros of L-functions lying off the critical line (especially so-called Siegel zeros, real zeros lying very close to 1). If one assumes the Generalized Riemann Hypothesis, then the above ? asymptotic holds uniformly for q ď x or so, and in a smaller range if one considers primes in “short” intervals px ´ y, xs. On the other hand, the Brun-Titchmarsh inequality gives an upper bound of the correct order even for very large moduli q “ x1´ε and for very short intervals y{q “ xε (ε ą 0 fixed).

Proof. WLOG assume that y ą 2q, for otherwise trivially the left side is ď 2 while the right side is ě C{ logpy{qq ě C{ log 2. Write tx ´ y ă n ď x : n ” a pmod qqu “ tqph ` 1q ` a, . . . , qph ` mq ` au. SIEVE METHODS LECTURE NOTES, SPRING 2020 21

Apply Theorem 2.5 with k “ 1 and the single form qn ` pqh ` aq, where 1 ď n ď m. Here E “ q and thus q m πpx; q, aq ´ πpx ´ y; q, aq ! . φpqq log m Since m — y{q, the theorem follows.  2.2.4. Romanoff’s Theorem.

Theorem 2.8 (Romanoff [115], 1934). A positive proportion3 of positive integers can be expressed as p`2k where p is prime and k is a non-negative integer.

Proof. We start with a common device for lower-bounding the size of a set defined by solutions of some equation. Let rpnq “ #tpp, kq : k ě 1, n “ p ` 2ku and Bpxq “ #tn ď x : rpnq ą 0u. We need to show that Bpxq " x for large x. Assume that x ě 100. By Cauchy-Schwarz, 2 2 1 rpnq “ rpnq rpnqą0 nďx nďx ˆ ÿ ˙ ˆ ÿ ˙ ď 1 rpnq2 nďx nďx rpÿnqą0 ÿ “ Bpxq rpnq2. nďx ÿ On the other hand, rpnq ě #tpp, kq : p ď x{2, 2k ď x{2u " πpx{2q log x " x nďx ÿ and, since n ď x implies that p ď x and 2k ď x,

2 k1 k2 rpnq “ #tpp1, p2, k1, k2q : p1 ` 2 “ p2 ` 2 “ nu nďx nďx ÿ ÿ kj k1 k2 ď D :“ #tpp1, p2, k1, k2q : pj ď x, 2 ď x for j “ 1, 2; p1 ` 2 “ p2 ` 2 u. It follows that x2 (2.12) Bpxq " . D

There are Opxq quadruples pp1, p2, k1, k2q with p1 “ p2 and k1 “ k2. Thus,

kj k1 k2 D ! x ` #tpp1, p2, k1, k2q : p1 ă p2 ă x, 2 ď x for j “ 1, 2; p2 “ p1 ` 2 ´ 2 u. k k Now fix k1 ą k2 ě 1. Now apply Corollary 2.6 with 2m “ 2 1 ´ 2 2 . With k1 and k2 fixed, the number of possible pairs p1, p2 with p1 ď x is 2k1 ´ 2k2 x ! φp2k1 ´ 2k2 q log2 x

3 If A is a set of natural numbers with counting function Apxq “ #ta ď x : a P Au satisfying lim infxÑ8 Apxq{x ą 0, we say that A contains a positive proportion of all positive integers. 22 KEVIN FORD and hence x 2k1 ´ 2k2 D ! x ` . log2 x φp2k1 ´ 2k2 q 0ăk ăk ď log x 2 ÿ1 log 2 Factoring out 2k2 we see that 2k1 ´ 2k2 2l ´ 1 ! , l “ k1 ´ k2. φp2k1 ´ 2k2 q φp2l ´ 1q Also, 2l ´ 1 σp2l ´ 1q 1 l ! l “ . φp2 ´ 1q 2 ´ 1 l d d|ÿ2 ´1 For each l there are Oplog xq pairs pk1, k2q with k1 ´ k2 “ l and thus x 1 D ! x ` log x d 1ďlď log x d|2l´1 ÿlog 2 ÿ x 1 ! x ` 1. log x d dďx 1ďlď log x dÿodd ÿlog 2 d|2l´1 log x If spdq denotes the order of 2 modulo d, then the inner sum counts l ď log 2 which are divisible by spdq and log x is therefore Op spdq q. We arrive at 1 (2.13) D ! x ` x . dspdq dďx dÿodd Following Erdos,˝ we show that the sum on d converges, when extended to a sum over all odd positive integers. To this end, define 1 t “ , k d d odd spÿdqďk which is finite since spdq " log d. Partial summation gives 1 t (2.14) “ k . dspdq kpk ` 1q d k ÿ ÿ Letting i Nk “ p2 ´ 1q, iďk ź 1`2`¨¨¨`k k2 we see that spdq ď k implies that d|Nk. Also Nk ď 2 ă 2 , and so

1 σpNkq tk ď “ ! log2 Nk ! log k. d Nk d N ÿ| k Thus, the sum on the right side of (2.14) converges, as desired. Consequently, by (2.13), D ! x. Recalling (2.12), the proof is complete.  SIEVE METHODS LECTURE NOTES, SPRING 2020 23

Remark 1. Evidently, almost all even integers are not of the form p ` 2k. Erdos˝ [35] showed that a positive proportion of odd numbers are not of the form p ` 2k. This paper introduced the notion of covering systems of congruences. 2.2.5. Sums of primes: Schnirelmann’s theorem. In the 1933, Schnirelmann [121] showed that there is a constant k so that every positive integer ě 2 is the sum of at most k primes. This was a huge step in the direction of Goldbach’s Conjecture. His proof combined the sieve upper bound with a very elementary argument. Given a set A Ă N Y t0u, let ApNq be the counting function of A (excluding zero), that is, ApNq “ #tn P A : 1 ď n ď Nu. The Schnirelmann density σpA q of A is defined as ApNq σpA q “ inf . Ně1 N Examples: ‚ σpA q “ 1 if and only if A Ą N ‚ if 1 R A then σpA q “ 0. ‚ σpt1, 3, 5, 7, 9, 11,...uq “ 1{2. ‚ σpt1, 4, 9, 16, 25,...uq “ 0. Given any two sets A , B of integers, define the sumset A ` B by A ` B “ ta ` b : a P A , b P Bu. We denote the k-fold subset kA inductively as kA “ pk ´ 1qA ` A , so that kA is the set of integers that can be written as the sum of k (not necessarily distinct) elements of A . Theorem 2.9 (Shnirelmann [121], 1933). (a) Suppose that 0 P B and 1 P A . Then σpA ` Bq ě σpA q ` σpBq ´ σpA qσpBq. (b) If 0 P A , 0 P B and σpA q ` σpBq ě 1 then A ` B “ N Y t0u. The conclusion of part (a) is conveniently written as 1 ´ σpA ` Bq ď p1 ´ σpA qqp1 ´ σpBqq. In general, the conclusion is best possible, for example if A “ t1, 5, 6, 7, 8, 9,...u, B “ t0, 1, 4, 5, 6, 7, 8,...u 1 1 1 then A ` B “ t1, 2, 5, 6, 7, 8, 9,...u, σpA q “ 4 , σpBq “ 3 and σpA ` Bq “ 2 . Corollary 2.10 (Schnirelmann [121]). Suppose that 0 P A and σpkA q ą 0 for some k P N. Then for some h P N, hA “ N Y t0u. Proof that Theorem 2.9 implies Corollary 2.10. Let B “ kA . Obviously 0 P B. Since σpBq ą 0, we have 1 P B. Hence, t0, 1u Ă rB for all r P N. By Theorem 2.9 (a), for any r P N we have 1 ´ σppr ` 1qBq ď p1 ´ σpBqqp1 ´ σprBqq. By induction, 1 ´ σprBq ď p1 ´ σpBqqr Hence, for some r, σprBq ě 1{2. Then, by Theorem 2.9 (b), we conclude that σp2rBq “ 1, that is, 2rkA “ 2rB “ N Y t0u, 24 KEVIN FORD as required.  Proof of Theorem 2.9. We begin with (a). Let N P N and enumerate the elements of A X r1,Ns as 1 “ a1 ă a2 ă ... ă ar ď N. These integers are separated by gaps of gi “ ai`1 ´ ai ´ 1 numbers not in A , plus a final gap of gr “ N ´ ar integers from ar ` 1 to N. Let C “ A ` B. Then C X r1,Ns contains A X r1,Ns, plus additional numbers ai ` b, where b P B, 1 ď b ď gi. The number of such elements b is ě giσpBq. It follows that r CpNq ě ApNq ` σpBqgi i“1 ÿ “ ApNq ` σpBqpN ´ ApNqq “ ApNqp1 ´ σpBqq ` NσpBq ě N σpA qp1 ´ σpBqq ` σpBq . ´ ¯ As this is true for every N, σpC q ě σpA q ` σpBq ´ σpA qσpBq. To prove (b), first observe that 1 P A Y B, so that 1 P A ` B. Suppose that A ` B ‰ N Y t0u and that n R A ` B. Then n ě 2, n R A and n R B. Thus, Apn ´ 1q ` Bpn ´ 1q “ Apnq ` Bpnq ě npσpA q ` σpBqq ě n. Now let C “ ta P A : 1 ď a ď n ´ 1u, D “ tn ´ b : 1 ď b ď n ´ 1, b P Bu. Then |C | ` |D| ě n. But C , D Ă r1, n ´ 1s, hence by the pigeonhole principle, C and D must have a common element, thus n P A ` B, a contradiction. Therefore, A ` B “ N Y t0u. 

We now apply these results to primes. Let P denote the set of primes and set P0 “ P Y t0, 1u. Now σpP0q “ 0 by the prime number theorem. However, by Exercise 2.5 below, we have σp2P0q ą 0. Hence, by Corollary 2.10, there is an h so that hP0 “ N Y t0u. We also have h ě 3, since 27 R 2P0. Thus, for any positive integer n ě 4, we have

n ´ 2 “ p1 ` ¨ ¨ ¨ ` pr ` s ¨ 1 where p1, . . . , pr are primes, r ě 0, s ě 0 and r ` s ď h. Now 2 ` s “ 2k ` 3l where k ě 0, l ě 0 and k ` l ď s ` 1. Thus, n is the sum of at most r ` s ` 1 “ h ` 1 primes. We conclude that

Theorem 2.11 (Schnirelmann [121], 1933). For some h P N, every positive integer ě 2 is the sum of at most h primes.

2.2.6. Primitive roots of primes. Are there infinitely many primes p for which the fraction 1{p has period p ´ 1 in base 10? Equivalently, is 10 a primitive root of p for infinitely many primes p? This question was addressed by Gauss in his Disquisitiones Arithmeticae (1801). In 1927, E. Artin conjectured an asymptotic formula for the number of primes p ď x for which a given squarefree integer a is a primitive root; his formula was later discovered not to hold up against numerical data by D. H. Lehmer, and a revised conjecture was later proposed by H. Heilbronn and others. In 1967, C. Hooley deduced the revised conjecture from the Generalized Riemann Hypothesis for certain Dedekind zeta functions ζK psq [82]; see also [86, Ch. 3]. The theorem makes use of sieve methods. Here we will specialize to the case a “ 2. For background on Dedekind zeta functions, see [89, Sec. 5.10]. SIEVE METHODS LECTURE NOTES, SPRING 2020 25

Assume the Generalized Riemann Hypothesis for ζ s for the number fields Theorem? 2.12 (Hooley [82]). K p q k 2πi k K “ Qp 2, e { q, k running over all squarefree integers. Then 1 #tp ď x : 2 is a primitive root of pu „ Cπpxq,C “ 1 ´ . q q 1 q prime p ´ q ź ˆ ˙ Proof. We set this up as a general sieve problem as follows. Let Ω be the set of primes p ď x, and for any prime q, let pp´1q{q Aq “ p P Ω: q|p ´ 1 and 2 ” 1 pmod pq . ! ) Clearly, 2 is a primitive root of p (order p ´ 1) if and only if p R Aq for all primes q (and it suffices to check for primes q ď p). We need good, uniform bounds for Ad. Bounds for individual d, but with poor uniformity, are available unconditionally by the analog of the prime number theorem for the number fields ? K (the prime ideal theorem of Landau), but the uniformity is very poor, especially for xop1q ă d ď x, and not good enough for our application.

Assume the Generalized Riemann Hypothesis for the Dedekind zeta functions Lemma 2.13 (Hooley [82]). ? k 2πi{k ζK psq for all of the number fields K “ Qp 2, e q, k running over all squarefree integers. Then, uniformly for squarefree d ď x, lipxq ? A “ ` Op x log xq. d dφpdq Define the cutoffs 1 ? ? z “ log x, z “ xplog xq´2, z “ x log x. 1 6 2 3 Evidently,

(2.15) SpA, z1q ě #tp ď x : 2 is a primitive root of pu ě SpA, z1q ´ S1 ´ S2 ´ T, where

S1 “ Aq,S2 “ Aq,T “ #tp ď x : p P Aq for some q ą z3u. z ăqďz z ăqďz 1 ÿ 2 2 ÿ 3 1 Using the Legendre sieve (Theorem 1.2) with X “ lipxq and with gpdq “ dφpdq , Lemma 2.13 gives 1 ? SpA, z q “ lipxq 1 ´ ` Op xplog xq2πpz1qq 1 q q 1 qďz p ´ q ź1 ˆ ˙ 1 1 “ C ` O lipxq “ C ` O πpxq. log x log x ˆ ˆ ˙˙ ˆ ˆ ˙˙ For S1, we again use Lemma 2.13 and obtain lipxq ? S “ ` Op x log xq 1 q q 1 z ăqďz p ´ q 1 ÿ 2 ˆ ˙ lipxq ? πpxq ! ` xplog xqπpz q ! . log x 2 log x 26 KEVIN FORD

For S2, the bounds from Lemma 2.13 are too poor, but we do better by observing that Aq ď πpx; q, 1q and using Theorem 2.7 (the Brun-Titchmarsh inequality): x x log q S ď πpx; q, 1q ! ! 2 q log x 2 q z ăqďz z ăqďz log x z ăqďz 2 ÿ 3 2 ÿ 3 2 ÿ 3 x z3 x log2 x log2 x ! 2 log ! 2 ! πpxq . log x z2 log x log x m ? Finally, if p P Aq for some q ą z3, then p|p2 ´ 1q for some positive integer m ď x{ log x. Thus, p|M, where M “ p2m ´ 1q. ? mď źx{ log x Thus, ? log M x 2 x πpxq T ď #tp|M : p primeu ď ! “ ! . log 2 log x log2 x log x ˆ ˙ Combining the estimates for SpA, z1q, S1, S2 and T with (2.15) proves the theorem.  In 1986, Heath-Brown [80] showed that for all but at most two primes r, tp : r is a primitive root of pu is infinite. We cannot say which two prime might be exceptional, or even give a bound on the exceptional primes. We will revisit this type of result later. 2.3. Exercises.

Exercise 2.1. Assume condition (Ω0). Show that (Ω) holds with the same value of κ and with B depending only on δ, κ.

Exercise 2.2. For each prime, let Ip denote a set of residue classes modulo p. suppose that |Ip| ď κ for all p. Show that |Ip| #tx ă n ď x ` y : @p ď z, n mod p R I u ! y 1 ´ , p κ p pďz ź ˆ ˙ uniformly for 2 ď z ď y and all x. Exercise 2.3. Let k be a positive, even integer. Assuming Conjecture 1.10 for the pair of linear forms pn, n ` kq, prove that apkqx #tn ď x : n and n ` k are consecutive primesu „ px Ñ 8q, log2 x where p ´ 1 1 apkq “ C ,C “ 2 1 ´ , p ´ 2 pp ´ 1q2 p k,p 2 pě3 |źą ź ˆ ˙ C being the “twin prime constant”. Exercise 2.4. Show that for any odd N, N 2 #tpp1, p2, p3q : N “ p1 ` p2 ` p3u ! , log3 N the constant being absolute. SIEVE METHODS LECTURE NOTES, SPRING 2020 27

Exercise 2.5. We say that an even number k is a Goldbach number if there exists primes p1, p2 such that k “ p1 ` p2. Show that a positive proportion of all positive integers are Goldbach numbers.

Exercise 2.6. Let Ξpx, y, zq denote the number of integers n ď x which have no prime factor in py, zs. Prove that uniformly in 1.5 ď y ď z ď x, we have x log y Ξpx, y, zq ! . log z Exercise 2.7. Prove that x log x Ωpp ´ 1q ! 2 , log x pďx ÿ where Ωpnq is the number of prime power divisors of n.

Exercise 2.8. Let S denote the set of integers that are the sum of two squares. (a) Show that S has counting function Opxplog xq´1{2q. (b) Let h P N. Show that, uniformly in h, 1 x #tn ď x : n P S, n ` h P Su ! 1 ` . p log x p|h ˆ ˙ p”3 źpmod 4q

Exercise 2.9. (Landau-Lehmer problem). Let q P N, q ě 2, and let R be a collection of reduced residue classes modulo q. Prove that the number of integers n ď x lacking any prime factor that lies in one of the congruence classes of R is bounded above by x !q . plog xq|R|{φpqq Exercise 2.10. Let A denote the set of positive, squarefree integers. (a) Show that the Schnirelmann density σpA q ą 1{2. (b) Show that every integer n ě 2 is the sum of exactly two squarefree integers.(This does not follow immediately from Theorem 2.9 (b)).

Exercise 2.11. Let B be the set of primes that are of the form a2 ` b4 for some integers a, b. Prove that x3{4 #tp ď x : p P Bu ! . log x Exercise 2.12. Let 1 ď a ď q, pa, qq “ 1. Prove that uniformly in a, q and x ě 10 we have 1 log x ! 2 . p φ q qďpďx p q p”a ÿpmod qq Note that the condition p ě q is necessary, as the least prime that is ” a pmod qq might be a, which could be very small. 28 KEVIN FORD

2.4. The Brun-Hooley sieve: lower bounds. Our lower bound for SpA, zq is derived from the upper bound in Lemma 2.2 by subtracting off appropriate quantities. We use the following simple inequality:

Lemma 2.14. Suppose that 0 ď xj ď yj for 1 ď j ď t. Then t t x1 ¨ ¨ ¨ xt ě y1 ¨ ¨ ¨ yt ´ py` ´ x`q yj. `“1 j“1 ÿ źj‰` Proof. The inequality is an equality when t “ 1, and follows by induction on t using

y1 ¨ ¨ ¨ yt ´ x1 ¨ ¨ ¨ xt “ py1 ¨ ¨ ¨ yt´1 ´ x1 ¨ ¨ ¨ xt´1qyt ` x1 ¨ ¨ ¨ xt´1pyt ´ xtq ď py1 ¨ ¨ ¨ yt´1 ´ x1 ¨ ¨ ¨ xt´1qyt ` y1 ¨ ¨ ¨ yt´1pyt ´ xtq. 

As before, partition the primes in r2, zs into sets P1,..., Pt and let k1, . . . , kt be nonnegative even inte- gers. We apply Lemma 2.14 with

xj “ µpdq, yj “ µpdq p1 ď j ď tq, d n,P d n,P |pÿ j q |pÿ j q ωpdqďkj where k1, . . . , kt are even, nonnegative integers. From Lemma 1.6 (with fppq “ 1 for each p) we have that

0 ď y` ´ x` ď 1.

d|pn,P`q ωpdq“ÿk``1 Hence by Lemma 2.2 and Lemma 2.14, for any n with P `pnq ď z we obtain t t t (2.16) 1n“1 “ µpdq ě µpdjq ´ 1 µpdjq. d n j“1 d n,P `“1 d n,P j“1 d n,P ÿ| ź j |pÿ j q ÿ ˆ `|pÿ `q ˙ ź j |pÿ j q ωpdj qďkj ωpd`q“k``1 j‰` ωpdj qďkj

Thus, we have a lower bound sieve with coefficients (here d “ d1 ¨ ¨ ¨ dt with di “ pd, Piq for each i)

µpdq if dj|Pj, ωpdjq ď kj p1 ď j ď tq ´ (2.17) λd “ $µpdq if dj|Pj p1 ď j ď tq, D` : ωpdjq ď kj pj ‰ `q, ωpd`q “ k` ` 1 &’0 otherwise.

From (1.6), %’ t d1 ¨ ¨ ¨ dt SpA, zq ě µpd1q ¨ ¨ ¨ µpdjqAd1¨¨¨dt ´ µ Ad1¨¨¨dt . d` d1,...,dt `“1 d1,...,dt ˆ ˙ @j:dj |Pjÿ,ωpdj qďkj ÿ dj |Pj ,ωpdÿj qďkj pj‰`q d`|P`,ωpd`q“k``1 As before, introduce the conditions (g) and (r), and the shorthand notation (V ). Adopting our previous notation (2.3) for quantities Uj, we can rewrite this as t 1 SpA, zq ě XU1 ¨ ¨ ¨ Ut 1 ´ gpd`q ´ R, U` ˜ `“1 d P ¸ ÿ ÿ`| ` ωpd`q“k``1 r SIEVE METHODS LECTURE NOTES, SPRING 2020 29 where

R “ |rd|, dPD ÿ ` and D is the set of squarefree numbers d thatr satsify P pdq ď z, ωppd, Pjqq ď kj ` 1 for all j and ωppd, Pjqq “ kj ` 1 for at most one j. Define Vj and Lj by (2.4). By Lemma 1.6, Ui ě Vi for every i, thus in particular L`1k ą0 U1 ¨ ¨ ¨ Ut ě V pzq, 1{U` ď e ` . Another invocation of the Erdos˝ trick (cf., the proof of Lemma 1.6) gives

k``1 k``1 1 L` gpd`q ď gppq ď . pk` ` 1q! pk` ` 1q! d`|P` ˆ pPP` ˙ ωpd`ÿq“k``1 ÿ We partition the primes in r2, zs as in (2.9). Then

2 k1`1 k2 kt R ď µ pdq|rd|,D “ z1 z2 ¨ ¨ ¨ zt . ` P ÿpdqďz r dďD We arrive at a first general lower bound sieve.

Theorem 2.15. Let A be a sieve problem and assume (g), (r) and (V ). Partition the set of primes in r2, zs as in (2.9) and let k1, . . . , kt be nonnegative even integers. Then SpA, zq ě XV pzqp1 ´ Eq ´ R2, where E is given by (2.6) and 2 2 (2.18) R “ µ pdq|rd|, P `pdqďz k1`ÿ1 k2 kt dďz1 z2 ¨¨¨zt In terms of the lower bound sieve coefficients (2.17), we have shown that ´ (2.19) p1 ´ EqV pzq ď λd gpdq ď V pzq, d ÿ where E is given by (2.6) and the upper bound comes from (1.7). Incorporating (Ω), we can derive a lower bound of general utility.

Theorem 2.16. Let A be a sieve problem and assume (g), (r) and (V ). Assume also (Ω) with κ ą 0. Then, if z is large enough as a function of κ, B, we have 2 SpA, zq ě 0.0001XV pzq ´ µ pdq|rd|, ` P ÿpdqďz dďzfpκq where 8 2m fpκq “ 1 ` . expt0.26249m2{κu m“1 ÿ 5 Moreover, we have fpκq ď 1 ` 3.81κ for all κ ą 0, fpκq ď 6 ` 3.81κ for κ ě 0.05 and fpκq Ñ 1 as κ Ñ 0`. 30 KEVIN FORD

2 Proof. Let ξ “ 0.26249 and define αj “ exptξpj ´ 1q {κu and

1{αj zj “ z p1 ď j ď tq in (2.9), where t is maximally chosen satisfying the first line of (2.9). Also take kj “ 2j ´ 2 for all j. By (2.4) and (Ω),

B αj`1B (2.20) Lj ď κ log αj`1 ´ κ log αj ` “ ξp2j ´ 1q ` . log zj`1 log z ? We bound E by separating the sum appearing in (2.6) into those summands with α ď log z and those ? j`1 with αj`1 ą log z. The former summands contribute ? 2j 1 ? 8 ´ 1 ξp2j ´ 1q ` B{ log z ď eB{ log z eξp2j´1q ją1 p2j ´ 1q! j“1 ` ˘ ÿ 8 ξ 2j 1 2j´1 1 ξp2j´1q1ją1 p p ´ qq “ e ` OB,κ ? p2j ´ 1q! log z j“1 ÿ ˆ ˙ 1 ă 0.99967 ` `O ? . B,κ log z ˆ ˙ ? ξ ? Since αj`1 ą log z implies that j " log2 z, and e pξeq ď 0.95, the terms with αj`1 ą log z contribute a 2j´1 B{ log 2 ξp2j´1q pξp2j ´ 1q ` B{ log 2q ď e e “ oκ,Bp1q pz Ñ 8q. ? p2j ´ 1q! αj`1ÿą log z Therefore, for large enough z, E ď 0.9999. Finally, for R2 we have

k1`1 k2 k3 1`2{α2`4{α3`6{α4`¨¨¨ fpκq z1 z2 z3 ¨ ¨ ¨ ď z “ z . Invoking Theorem 2.15, the proof is complete. The bounds on fpκq are straightforward, and given as Exercise 2.15 (a). 

2.4.1. Application: twin primes. We take Ω “ r1, xs X Z, Ap “ tn P Ω: p|npn ` 2qu, X “ x. As we saw previously, gppq “ ρppq{p with ρp2q “ 1, ρppq “ 2 for p ą 2, so (Ω0) holds with κ “ 2, as does Ω. Here, fp2q ď 8.46. Taking z “ x1{8.5 we have 2 fp2q 0.996 µ pdq|rd| ď τpdq ! z log z ! x , fp2q fp2q dďÿz dďÿz which is negligible. Since V pzq " 1{ log2 z " 1{ log2 x we conclude from Theorem 2.16 that x SpA, zq " . log2 x We conclude that there are " x{ log2 x integers n ď x, such that each of n and n ` 2 have at most 8 prime factors, as these factors are ą z. Now we approach the problem as in Example (c) (this is A. Renyi’s` approach), taking Ω “ tp ` 2 : p prime ď xu,X “ lipxq, SIEVE METHODS LECTURE NOTES, SPRING 2020 31 and Ap “ tn P Ω: p|nu. Here lipxq A “ πpx; d, ´2q “ ` r , d φpdq d where rd is expected to be small by the prime number theorem for arithmetic progressions. Taking gpdq “ 1{φpdq, we easily verify the (Ω) holds with κ “ 1. Indeed, for y ě 3, Mertens’ bounds give 1 ´1 1 ´1 1 ´1 p1 ´ gppqq´1 “ 1 ´ “ 1 ´ 1 ´ p 1 p p 1 2 yďpďw yďpďw ´ yďpďw p ´ q ź ź ˆ ˙ ź ˆ ˙ ˆ ˙ log w 1 ď 1 ` O . log y log y ˆ ˆ ˙˙ For the error terms rd, we use the famous theorem of Bombieri and Vinogradov: Theorem 2.17 (Bombieri-A.I.Vinogradov, 1965). For every A ą 0 there is a B ą 0 so that lipyq x max max πpy; q, aq ´ ! . yďx pa,qq“1 φpqq plog xqA qďx1{2plog xq´B ˇ ˇ ÿ ˇ ˇ ˇ ˇ 1 f 1 0.499 In Theorem 2.16, we have fp1q ď 4.65. Take ˇz “ x 9.4 so that zˇ p q ď x . Hence, Theorem BV implies lipxq x |r | “ πpx; d, ´2q ´ ! . d φpdq plog xq10 dďzfp1q dďzfp1q ˇ ˇ ÿ ÿ ˇ ˇ We conclude that for large x, ˇ ˇ ˇ x ˇ SpA, zq " XV pzq " . log2 x Finally, we observe that SpA, zq counts primes p such that p`2 has no prime factor ď z; in particular, p`2 has at most 9 prime factors.

2.4.2. Prime values of polynomials. Generalizing greatly the study of twin primes, we can use the sieve to study prime values of arbitrary polynomials.

Theorem 2.18. Let F1,...,Fk be distinct, irreducible polynomials in Zrxs, each with positive leading coefficient. Put F “ F1 ¨ ¨ ¨ Fk, ` “ degpF q. Suppose pF1,...,Fkq is admissible. Then x (2.21) #tn ď x : Fipnq prime for every iu !F . logk x Further, there is an integer m “ Opk`q such that for large x, x (2.22) #tn ď x :ΩpFipnqq ď m p1 ď i ď kqu "F . logk x Proof. We will show the upper bound (2.21), leaving (2.22) as an exercise (cf., Exercise 2.13 below). Let x 1{2 be large, Ω “ r1, xs X N, Ap “ tn P Ω: p|F pnqu for primes p, X “ x, z “ x . Generically write

ρGpdq “ #t0 ď n ă d : Gpnq ” 0 pmod dqu, where G is any polynomial. As with twin primes, we have ρ pdq A “ F X ` r , |r | ď ρ pdq, d d d d F 32 KEVIN FORD and so we set gpdq “ ρF pdq{d. Now ρF is multiplicative by the Chinese remainder theorem. Also,

ρF ppq ă p by hypothesis,

ρF ppq ď ` by Lagrange’s theorem.

In particular, (Ω0) holds with κ “ ` and δ “ 1{`. Thus, 1{2 1{2 |rd| ď dgpdq ď x gpdq “ x p1 ` gppqq dďz 1{2 d z pďz ÿ dďÿx PÿPp q ź ` ď x1{2 1 ` ! x1{2plog xq` ! x2{3. p ` ` pďz ź ˆ ˙ ´` By Theorem 2.4 and the trivial lower bound V pzq "F plog xq , we have SpA, zq ! XV pzq.

As before, the left side is at least as large as the count of k ď x such that each Fipkq is prime and ą z (and there are OF pzq values of k with each of Fipkq prime, and one of them is ď z). It remains to bound V pzq from above. To do this, we need the following two facts: ρ p ρ p ρ p p, (2.23) F p q “ F1 p q ` ¨ ¨ ¨ ` Fk p q for all but finitely many ρ ppq 1 (2.24) Fi “ log y ` CpF q ` O p1 ď i ď kq p 2 i Fi log y pďy ÿ ˆ ˙ where CpFiq is a constant depending on Fi. From (2.23) and (2.24) we deduce that ρ ppq ρ ppq log V pzq “ log 1 ´ F “ O p1q ´ F p F p pďz pďz ÿ ˆ ˙ ÿ k ρF ppq “ O p1q ´ j “ ´k log z ` O p1q, F p 2 F pďz j“1 ÿ ÿ ´k and thus V pzq —F plog zq . In fact, (2.23) and (2.24) imply that (Ω) holds with κ “ k (this will be needed in the lower bound argument). In conclusion, x #tk ď x : Fipkq prime for every iu ď OF pzq ` SpA, zq !F . plog xqk Proof of (2.23): Suppose the equation in (2.23) does not hold. Then there are i ‰ j and some n with p|Fipnq and p|Fjpnq, i.e., p|pFipnq,Fjpnqq. As Fi and Fj are distinct, irreducible and have no fixed prime factor (in particular, neither is a multiple of the other), pFi,Fjq “ 1 over Qrxs. Hence, there are G, H P Qrxs such that FiG ` FjH “ 1. Clearing denominators gives G, H P Zrxs with FiG ` FjH “ Cij, where Cij P Z. It follows that p|Cij. As there are only finitely many pairs i, j, there are finitely many possible p. Comments on (2.24): this is a consequence of the Prime Idealr Theoremr of Landaur [93];r see also [22, p. 33–38]. In some special cases, it follows from Mertens theorem for primes in arithmetic progressions, e.g. if F pxq “ x2 ` 1, then ρ ppq 1 F “ 1 ` 2 “ log x ` Op1q. p p 2 pďx pďx ÿ p”1 ÿpmod 4q  SIEVE METHODS LECTURE NOTES, SPRING 2020 33

2.5. Sieving limits. One sees from Theorem 2.16 the effect of the dimension κ on the quality of the esti- fpκq mates. In order to ensure the remainder terms |rd| are small, one needs z to be smaller than the sieving limit for the sieve problem A (this is generally less than x), hence the range of permissible z is limited by ř the value of fpκq. Definition 2. In the literature, the sieve limit ( or sifting limit) βpκq, for a given κ, is the infimum of exponents u so that for any sieve problem A satisfying (g), (r), and (Ω), we have for some positive c the bound SpA, zq ě cXV pzq ´ |rd|. dďzu ÿ Some authors, e.g. Selberg, refer to 1{βpκq as the sieve limit. Theorem (2.16) implies that βpκq ď fpκq ď 1 ` 3.841κ for all κ and that βpκq ď 1 ` op1q as κ Ñ 0`. Choosing the parameters αj in a more optimal manner leads to better bounds for large κ, namely βpκq ď pc ` op1qqκ where c “ 3.59112 ... is the solution of e1`1{c “ c. See Exercise 2.15 below. This matches the asymptotic upper bound for βpκq achievable from the very complicated “β-sieve”; see [57, Ch. 11]. The exact value of βpκq is known only for κ P r0, 1{2s Y t1u, in these cases βpκq “ 1 for κ ď 1{2 and βp1q “ 2. See [57, Ch. 11] for details. The lower bound βp1q ě 2 is clear from Selberg’s examples in Section 1.7.4. The very complicated combinatorial sieves given in [26] give the best known upper bounds on βpκq for small κ (less than 10, say), see Table 1. Selberg [124, eq. (14.40)] showed that βpκq ď 2κ`0.4454 for sufficiently large κ. The exact value of βpκq is unknown in all cases κ ą 1{2 except for κ “ 1.

κ βpκq ď 0.5 1.0 1.0 2.0 2.0 4.2665 3.0 6.6409 TABLE 1. Known upper bounds on the sieving limit βpκq

2.6. The small z case. Asymptotic formula for the sifting function (Fundamental Lemma). We com- bine the upper and lower bound sieve theorems to achieve an asymptotic formula for the sifting function when z is small compared with x. The bounds below are of the same strength, as s becomes large, as [70, Theorem 2.5], which is derived from a later, complicated sieve developed by Brun. In particular, this gives op1q the promised asymptotic formula in (1.4) as long as κ is fixed, z “ x and the remainders |rd| are small enough on average. Theorem 2.19 (Fundamental Lemma). (a) For any pair pz, Dq of positive integers with 2 ď z ď D, there ` ´ ` ´ ˘ are sieves λ and λ satisfying (λ ) and (λ ), respectively, satisfying |λd | ď 1 for all d, with support 2 in Dpz, Dq :“ td P N : µ pdq “ 1,P `pdq ď z, d ď Du, and such that for any multiplicative function g satisfying (Ω), we have

λ˘pdqgpdq “ 1 ` O e´s log s`s log3 s`Oκ,B psq p1 ´ gppqq, d pďz ÿ ´ ´ ¯¯ ź log D where s “ log z . 34 KEVIN FORD

(b) Let κ0 ą 0 and B0 ą 0. Assume A is a sieve problem, such that (g), (r) and that (Ω) holds for some constants 0 ď κ ď κ0 and 0 ď B ď B0. For any 2 ď z ď D, we have

´s log s`s log s`Oκ ,B psq SpA, zq “ XV pzq 1 ` O e 3 0 0 ` ∆ |rd|, dďD ´ ´ ¯¯ P `ÿpdqďz

log D where s “ log z and |∆| ď 1.

˘ Proof. Firstly, we observe that part (b) is immediate from part (a), the bound |λd | ď 1 and (1.8). To prove (a), we take Brun-Hooley sieves, that is, sieves given in Lemma (2.2) (upper bound sieve) and (2.17) (lower bound sieve) and additionally supported on Dpz, Dq. In light of (2.8), (2.11) and (2.19), it suffices to prove that there is a choice of parameters zj and kj such that

´s log s`s log s`O psq (2.25) E ! e 3 κ0,B0 .

As before, we will partition the primes in r2, zs as in (2.9) and let k1, . . . , kt be nonnegative even integers. Let s0pκ0,B0q ě 100 be sufficiently large. When s ď s0pκ0,B0q, the trivial lower bound SpA, zq ě 0 is good enough, and thus we need only establish E ! 1 in the upper bound sieve. We’ll take, similar to the j´1 1{4j´1 proof of Theorem 2.4, the parameters k1 “ 0, kj “ 2 (j ě 2), and zj “ z for each j ě 1. Then k1 k2 and d ď z1 z2 ¨ ¨ ¨ ď z ď D. As before, Lj ď L for all j, where L is a constant that depends only on

κ0,B0. It then follows from (2.6) that E !κ0,B0 1, and this implies (2.25) in this case. When s ą s0pκ0,B0q we take the parameters

1{θj´1 θ “ log s, zj “ z , p1 ď j ď tq, where t is maximally chosen to satisfy (2.9), and

s 1 k “ 2 1 ´ ´ 6 ` 2j p1 ď j ď tq. j 2 θ Z ˆ ˙^

Note that θ ě log 100 ą 4 and kj ď sp1 ´ 1{θq ´ 6 ` 2j for all j. These sieves are supported on integers d satisfying

2 k1`1 k2 kt 1`psp1´1{θq´6q{p1´1{θq`2{p1´1{θq s d ď z1 z2 ¨ ¨ ¨ zt ď z ď z “ D.

In the notation (2.4), we have by (Ω) the bound

B Lj ď κ log θ ` ď κ0 log θ ` 2B0 “: L. log zj`1

For large enough s0pκ0,B0q, if s ą s0pκ0,B0q then

k1 ě sp1 ´ 1{θq ´ 6 ě 3s{4 ´ 6 ě 2L. SIEVE METHODS LECTURE NOTES, SPRING 2020 35

Thus, using Stirling’s formula, we find that t Lkj `1 E ď eL pk ` 1q! j“1 j ÿ k 1 Lk1`1 eL 1` ! eL ď eL pk ` 1q! k ` 1 1 ˆ 1 ˙ OpB0q κ0 ! e plog sq exp ´ k1 log k1 ` Opk1q ` k1 logpκ0 log θ ` 2B0q " * ´s log s`s log s`O psq ! e 3 κ0,B0 . This gives (2.25) and completes the proof.  2.6.1. Application: Buchstab’s function. Buchstab’s function Φpx, zq “ #tn ď x : P ´pnq ą zu is perhaps the most basic sieve function. Here we take gppq “ 1{p for all p so that (Ω) holds with κ “ 1. Theorem 2.20 (No small prime factors). (i) Uniformly for x ě 0 and 2 ď z ď y, we have y Φpx ` y, zq ´ Φpx, zq ! ; log z (ii) Uniformly for x ě 2z ě 4 we have x Φpx, zq " . log z 2 (iii) Uniformly for exptplog2 xq u ď z ď x, we have Φpx, zq “ 1 ` Ope´u log u`Opu log3 uqq x p1 ´ 1{pq, pďz ź log x ` ˘ where u “ log z . ? ? ? Proof. For (i), we may suppose that z ď y, for the estimate with z ą y follows from that for z “ y. We let Ω “ px, x`ysXN, X “ y, Ap “ tn P Ω: p|nu, gpdq “ 1{d and then (Ω) holds with κ “ 1. Part (i) is then immediate from Theorem 2.4. For parts (ii) and (iii), let Ω “ r1, xsXN, X “ x, Ap “ tn P Ω: p|nu, gpdq “ 1{d and again (Ω) holds with κ “ 1. Part (ii) follows from (2.16) when z ď x1{5 and x is large, fp1q{5 1{5 since fp1q ă 5 and thus dďzfp1q |rd| ! x . When x ă z ď x{2 and x is large, the Prime number theorem implies ř x x Φpx, zq ě πpxq ´ πpzq " " . log x log z Finally, when x is small, we have Φpx, zq ě 1 " x{ log z. This proves (ii). x ´u log u s For part (iii), take D “ log x e in Theorem 2.19, and define s by D “ z . Then the error terms satisfy ´u log u |rd| ď D ! e XV pzq dďD ÿ log x log x since V pzq — 1{ log z. By hypothesis, u ď 2 ď and hence plog2 xq log u u 1 s “ plog x ´ log x ´ u log uq “ u 1 ´ O . log x 2 log u ˆ ˆ ˙˙ Inserting this into the conclusion of Theorem 2.19 completes the proof of (iii).  36 KEVIN FORD

2.7. Small κ The petite sieve. In the previous sections, we showed an asymptotic formula for SpA, zq log D whenever κ, B are bounded and log z Ñ 8. In this section, we show an asymptotic formula for SpA, zq when D “ zOp1q and κ Ñ 0. First, we mention a very general principle. Definition 3. Let A be a sieve problem, and let p be a prime and p ą w ě 2. Then

SpAp, wq :“ MP Apz Aq . qďw ´ ď ¯ This corresponds to SpA, wq, where A is the sieve problem with space pΩ, F, Pq inherited from A, that is, Ω “ Ap, Ad “ Ap X Ad, X “ gppqX, g˜pdq “ gpdq and r˜d “ rpd. r r r In the case where Ω is a finite set, SpAp, wq counts those elements of Ω which have property Ap but not r r r any of the properties Aq for q ď w. Lemma 2.21 (Buchstab’s identity). Let A be a sieve problem, and z ą w ě 2. Then

(2.26) SpA, zq “ SpA, wq ´ SpAp, p ´ 1q. wăpďz ÿ Proof. Suppose that Aq does not occur for all primes q ď w, but Ap does holds for some p P pw, zs. Letting p be the largest such prime and summing over p yields the lemma.  Theorem 2.22 (The petite sieve). Let A be a sieve problem and assume (g), (r) and define V pzq by (V ). Assume g satisfies (Ω) for some κ P p0, 1s and B ą 0. Then, uniformly for 2 ď s ď log z with κ log s ď 1 we have

s ´ 1 s log s SpA, zq “ 1 ` O κ log s ` ` e 2 XV pzq ` O |r | . B log z d 1`1{s ˆ ˆ ˙˙ ˆ dďzÿ ˙ Proof. Let w “ z1{s so that w ě e ą 2. By Buchstab’s identity (2.26) and the fact that SpAp, zq is decreasing in z, we have

SpA, wq ě SpA, zq ě SpA, wq ´ SpAp, wq. wăpďz ÿ By Theorem 2.19, with κ0 “ 1 and B0 “ B, we have ´ 1 s log s SpA, wq “ p1 ` OBpe 2 qqXV pwq ` ∆ |rd| dďz ÿ where |∆| ď 1. By Theorem 2.4, again with κ0 “ 1 and B0 “ B we have

SpAp, wq ď OBpXgppqV pwqq ` |rpd|. dďw ÿ Summing over all p P pw, zs we use that gppq ď ´ logp1 ´ gppqq wăpďz wăpďz ÿ ÿ log z B ď κ log ` log w log w ˆ ˙ Bs “ κ log s ` . log z SIEVE METHODS LECTURE NOTES, SPRING 2020 37

We conclude that

´ 1 s log s s (2.27) SpA, zq “ 1 ` O e 2 ` κ log s ` XV pwq ` O |r | . B log z d dďzw ˆ ˆ ˙˙ ˆ ÿ ˙ Finally, V pwq log z κ V pzq ď V pwq “ V pzq ď V pzq p1 ` OBp1{ log wqq V pzq log w κ ˆ ˙ “ V pzqs p1 ` OBp1{ log wqq

“ V pzqp1 ` OBpκ log s ` s{ log zqq.

Inserting this into (2.27) completes the proof.  Corollary 2.23. Assume that z Ñ 8, κ Ñ 0, and that the remainders satisfy

|rd| “ opXV pzqq 1`δ dďÿz for some fixed δ ą 0. Then SpA, zq „ XV pzq

Proof. Take s “ 2 ` minplogp1{κq, log2 zq in Theorem 2.22. For large z, s ě 1{δ. By hypothesis, s Ñ 8 s and log z Ñ 0, and κ log s Ñ 0.  2.8. Exercises.

Exercise 2.13. Prove the lower bound (2.22) in Theorem 2.18.

Exercise 2.14. Prove the bounds claimed for fpκq in Theorem 2.16.

Exercise 2.15. (a) Let γpκq be the infimum of

k1 ` 1 ` α2k2 ` α3k3 ` ¨ ¨ ¨ over all choices of non-negative, even integers ki and real numbers 1 “ α1 ą α2 ą ¨ ¨ ¨ satisfying

kj `1 8 κ κ logpα {α q αj j j`1 ă 1. α ´ pk ` 1q! ¯ j“1 j`1 j ÿ ˆ ˙ Show that βpκq ď γpκq. (b) Let κ “ 1. Find more efficient choice of k1,... and α1,... which shows that βp1q ă 4.5. You may use a computer search. Use this to show that there are infinitely many primes p such that Ωpp ` 2q ď 8. (c) Prove the asymptotic upper bound βpκq ď pc ` op1qqκ, where c “ 3.59112 ... is the solution of e1`c “ c.

Exercise 2.16. Show that for all sufficiently large even N, there is a prime p and a number q with Ωpqq ď 9 such that N “ p ` q.

Exercise 2.17. Almost primes in short intervals. Prove that for every δ ą 0, there is a k δ so that whenever x ě x0pδq, then the interval px, x ` x s contains an integer q with Ωpqq ď k. 38 KEVIN FORD

Exercise 2.18. Show the equivalence of the following two forms of the Bombieri-Vinogradov Theorem: lipyq x @A ą 0 DB : max max πpy; q, aq ´ !A , pa,qq“1 2ďyďx φpqq plog xqA qďx1{2{ logB x ˇ ˇ ÿ ˇ ˇ ˇ ˇ and ˇ ˇ y x @A ą 0 DB : max max ψpy; q, aq ´ !A . pa,qq“1 2ďyďx φpqq plog xqA qďx1{2{ logB x ˇ ˇ ÿ ˇ ˇ Here ˇ ˇ ˇ ˇ ψpx; q, aq “ Λpnq. nďx n”a ÿpmod qq Exercise 2.19 (˚). Let S denote the set of integers which are the sum of two squares 2 (a) Show that a positive proportion of integers have the form a2 ` b2 ` 2c for non-negative integers ? a, b, c. You may use as a fact that the counting function of S is " x{ log x. 2 (a) Show that a positive proportion of integers do not have the form a2 ` b2 ` 2c for non-negative integers a, b, c. SIEVE METHODS LECTURE NOTES, SPRING 2020 39

3. SELBERG’SSIEVE For any real numbers λpdq satisfying λp1q “ 1, and for any natural number m, we have 2 1m“1 “ µpdq ď λpdq . d m d m ÿ| ˆ ÿ| ˙ Thus, any choice of λpdq produces a valid upper bound sieve λ` with

` λe “ λpd1qλpd2q. d ,d e r 1 ÿ2s“ Selberg calls this the Λ2-sieve, terminology used also by Friedlander and Iwaniec [57]. Our goal is to optimize the choice of pλpdqqdě1. Let A be a sieve problem, and assume (g) and (r). Then

SpA, zq ď λpd1qλpd2qArd1,d2s d1,d2 ` P pdÿ1d2qďz

ď X λpd1qλpd2qgprd1, d2sq ` |λpd1qλpd2qrrd1,d2s| d1,d2 d1,d2 ` ` P pdÿ1d2qďz P pdÿ1d2qďz “: XG ` R, ? say. Minimizing XG ` R is quite difficult. However, if we restrict the support of λpdq to d ď D, it is relatively easy to minimize G. Since primes with gppq “ 0 do not contribute anything to G, we let P “ p pďz gpźpqą0 and restrict the support of λpdq to d|P . Define gppq (3.1) hpdq “ for d|P. 1 ´ gppq p d ź| d1d2 Since rd1, d2s “ is squarefree, we have pd1,d2q

gpd1qgpd2q gprd1, d2sq “ . gppd1, d2qq Inverting (3.1) gives 1 1 1 “ 1 ` “ pm|P q, gpmq hppq hpdq p m d m ź| ˆ ˙ ÿ| so that 1 G “ λpd1qλpd2qgpd1qgpd2q hpdq d P,d P d d ,d 1| ÿ2| |pÿ1 2q 1 1 2 “ λpd1qλpd2qgpd1qgpd2q “ λpmqgpmq . hpdq hpdq d|P d1|P,d2|P d|P ˆ d|m ˙ ÿ d|dÿ1,d|d2 ÿ ÿ 40 KEVIN FORD

If we define µpdq ? (3.2) ξpdq “ λpdqgpmq pd|P pzq, d ď Dq, hpdq d m ÿ| then we have G “ hpdqξpdq2. d ÿ This quadratic form in the λpdq is minimized using Cauchy’s inequality. First, we invert (3.2). Since hpklqξpklq “ µplq µpkq λpmqgpmq k k kl m ÿ ÿ ÿ| “ µplq λpmqgpmq µpkq “ µplqλplqgplq, l m k m l ÿ| ÿ| { and thus µplq (3.3) λplq “ hpdqξpdq pl|P q. gplq l d ÿ| In particular, by Cauchy’s inequality, 2 1 “ λp1q2 “ hpdq1{2ξpdqhpdq1{2 ď hpdqξpdq2 J “ GJ, J “ hpdq, ? ? ? ˜ dď D ¸ ˜ dď D ¸ dď D ÿ ÿ ? ÿ with equality if and only if ξpdq is constant; i.e., ξpdq “ 1{J for every d ď D, d|P . By (3.3), this is attained by taking µplq µplqhplq (3.4) λplq “ hpdq “ hpmq. Jgplq Jgplq ? l d |? mď D{l dďÿD pm,lÿq“1 We conclude that X SpA, zq ď ` R. J To handle R, we need an upper bound on λplq. Observe that for any l ě 1, J “ hpdq “ hpkq hpmq ? ? k|l dď D k|l mď D{k ÿ pd,lÿq“k ÿ pm,lÿ{kq“1 hplq ě hpkq hpmq “ hpmq. ? gplq ? k|l mď D{l mď D{l ÿ pm,lÿq“1 pm,lÿq“1 Comparing with (3.4), we see that |λplq| ď 1 for all l, and therefore that ωpdq (3.5) R ď |rrd1,d2s| ď 3 |rd|. ? d1,d2ď D dďD ` ÿ P `ÿd z P pd1d2qďz p qď Since hpdq “ 0 for d - P , we arrive at the following general theorem. SIEVE METHODS LECTURE NOTES, SPRING 2020 41

Theorem 3.1 (Selberg’s sieve). Let A be a sieve problem, and assume (g), (r). Let z ě 2 and D ě 1. Then

X X ωpdq SpA, zq ď ` |rrd1,d2s| ď ` 3 |rd|, J ? J d1,d2ď D dďD ` ÿ P `ÿd z P pd1d2qďz p qď ? 2 where J “ nď D µ pnqhpnq, and h is the multiplicative function defined on primes p ď z by hppq “ gppq . 1´gppq ř

3.1. Application. The Brun-Titchmarch inequality revisited. Theorem 3.2 (Brun-Titichmarch inequality, v.2). For x ě y ě q ě 1 and pa, qq “ 1, we have 2y log p5y{qq πpx; q, aq ´ πpx ´ y; q, aq ď 1 ` O 2 . φpqq logp5y{qq logp5y{qq ˆ ˆ ˙˙ We need the following auxilliary lemma. Lemma 3.3. For k P N and x ě 1, define µ2pdq H pxq :“ . k φpdq dďx pd,kÿq“1 Then φpkq (i) Hkpxq ě k H1pxq for all k, x; (ii) H1pxq ě log x for x ě 1. Proof. We first write µ2pdq H1pxq “ . φpdq `|k dďx ÿ pd,kÿq“` Write d “ `h and observe that any nonzero summand corresponds to squarefree d, so ph, `q “ 1 and ph, k{`q “ 1. Thus, ph, kq “ 1 and we have µ2p`q µ2phq µ2p`q µ2p`q H1pxq “ “ H px{`q ď H pxq . φp`q φphq φp`q k k φp`q `|k hďx{` `|k `|k ÿ ph,kÿq“1 ÿ ÿ Inequality (i) follows from the identity µ2p`q 1 k “ 1 ` “ . φp`q p ´ 1 φpkq ` k p k ÿ| ź| ˆ ˙ Next, define spdq “ p|d p to be the squarefree kernel of d. Then ś 1 1 1 µ2pmq “ ` ` ¨ ¨ ¨ “ . d p p2 φpmq s d m p m p ÿq“ ź| ˆ ˙ Hence, for x ě 2 we have 1 1 1 tx`1u dt H pxq “ “ ě ě “ log tx ` 1u ě log x. 1 h h h t  mďx s h m s h x hďx 1 ÿ p ÿq“ pÿqď ÿ ż 42 KEVIN FORD

Proof of Theorem 3.2. As with the proof of Theorem 2.7, let Ω “ tx ´ y ă n ď x : n ” a pmod qqu,X “ y{q, and let gppq “ 1{p for p - q and gppq “ 0 for p|q. Then

Ad “ gpdqX ` rd, |rd| ď 1 Also SpA, zq ě πpx; q, aq ´ πpx ´ y; q, aq ´ z. In the notation of Theorem 3.1, we have µ2pdq hpdq “ for pd, qq “ 1. φpdq ? Let z “ D. By Lemma 3.3, ? φpqq J “ H p Dq ě log D. q 2q By Theorem 3.1, X X 2y SpA, zq ď ` 1 ď ` D ď ` D, J ? J φpqq log D d1,dÿ2ď D hence 2y ? πpx; q, aq ´ πpx ´ y; q, aq ď ` D ` D. φpqq log D A near-optimal choice for D is 5y{q D “ max 2, , log2p5y{qq ˆ ˙ and this gives the theorem upon using that 1 1 log p5y{qq “ 1 ` O 2 . log D logp5y{qq logp5y{qq ˆ ˆ ˙˙  3.2. Asymptotic formulas. It is possible, under two-sided bounds on gppq, to obtain an asymptotic formula for J. The theorem below illustrates some useful techniques for analyzing sums of multiplicative functions.

Theorem 3.4. Let A1,A2, L, κ ą 0, and let g be a multiplicative function supported on squarefree integers satisfying

(3.6) 0 ď gppq ď 1 ´ A1 pp primeq and y (3.7) ´ L ď gppq log p ´ κ log ď A p2 ď w ď yq. w 2 wďpďy ÿ Let h be the multiplicative function supported on squarefree integers and defined by gppq hppq “ pp primeq. 1 ´ gppq Then, uniformly for x ě 2, plog xqκ µ2pnqhpnq “ Spgq ` O Spgq pL ` 1qplog xqκ´1 ` pL ` 1qκ , Γ κ 1 κ,A1,A2 nďx p ` q ÿ ` “ ‰˘ SIEVE METHODS LECTURE NOTES, SPRING 2020 43 where

Spgq “ p1 ´ gppqq´1p1 ´ 1{pqκ. p ź Remarks. It is important that the dependence on L be made explicit in the error term, as in many applications L is not uniformly bounded, whereas κ, A1,A2 are usually uniformly bounded. That is, we may wish to apply the result with a sequence of functions g1, g2,..., and typically the same κ, A1,A2 will work for every gi but the corresponding numbers L (call them Li, say) may not be bounded; see Theorem TP2 below for an example. The sum on the left side depends only on gppq for primes p ď x, whereas the singular series is defined in terms of gppq for all primes p. It might seem more natural to replace the infinite product defining Spgq with a finite product over primes p ď x, but the given form of the theorem is easier to apply in practice. The inclusion of “extraneous factors” in Spgq does force us to include the additional error term SpgqpL ` 1qκ, which is in fact best possible as the following example shows: fix κ ą 0, consider a large L (say going to 8 as x Ñ 8), gppq “ 0 for p ă eL{2κ and gppq “ κ{p for p ě eL{2κ. One easily verifies (3.6) and (3.7), and computes that Spgq ! L´κ. If 1 ă x ă eopLq, then the sum in the lemma is just hp1q “ 1, while the “main term” and first error term on the right side are both op1q. The second error term SpgqpL ` 1qκ is frequently missing in versions of Theorem gh appearing in the literature, e.g. some of the recent work on prime gaps [61, Lemma 4], [97, Lemma 6.1]. These two works ultimately depend on [70, Lemma 5.3 (2.5)], which claims, in our notation, that

e´γκ L ` 1 p1 ´ gppqq “ Spgq´1 1 ` O log z κ log z pďz p q ź ˆ ˆ ˙˙ for all z ě 2. The above example clearly shows this claim to be false in some cases when 2 ď z ă eopLq. The error in the proof can be traced to [70, p. 146], two lines after (2.7), where it is written that p1 ` OpL{ log zqq´1 “ p1 ` OpL{ log zqq, a relation which is only true when z ą eCL for some positive constant C.

Proof. We will use a technique due to E. Wirsing. Assume throughout that g and h are supported on squarefree integers, so that all sums are over squarefree integers, and let

Hpxq “ hpnq. nďx ÿ By partial summation,

x x Hpuq Hpxq log x “ hpnq log n ` log “ hpnq log n ` du. n u nďx nďx 1 ÿ ´ ¯ ÿ ż We rewrite the right hand sum as

hpnq log n “ hpnq log p “ log p hppqhpmq. nďx nďx pďx pďx mďx{p ÿ ÿ ÿ ÿ pÿ-m 44 KEVIN FORD

Using the relation hppq “ gppq ` gppqhppq, the right side transforms into

“ gppq log p hpmq ´ hpmq ` hppq hpmq pďx " mďx{p mďx{p mďx{p * ÿ ÿ pÿ|m pÿ-m

“ gppq log p hpmq ´ hppq hplq ` hppq hpmq pďx m x p 2 m x p ÿ " ÿď { lďÿx{p ÿď { * p-l p-m

“ gppq log p hpmq ` hppq hpmq . pďx m x p 2 ÿ " ÿď { x{p ăÿmďx{p * p-m Interchanging the order of summation yields

(3.8) hpnq log n “ hpmq gppq log p ` gppqhppq log p . ? nďx mďx p x m ÿ ÿ " ďÿ{ x{mÿăpďx{m * p-m Applying (3.7) (with y “ w “ p) followed by (3.6), we see that for every p,

A2 A2{ log p gppq ď and hppq ď . log p A1 Hence, by another application of (3.7), we obtain

A2{A1 gppqhppq log p ď gppq log p ! 1 pm ď x{4q, ? log x{m ? x{mÿďpďx{m x{mÿďpďx{m the sum being trivially Op1q when m ą x{4 (herea and throughout he proof, constants implied by O-symbols may depend on κ, A1,A2 but not on any other parameter). By (3.7), x gppq log p “ κ log ` OpL ` 1q, m p x m ďÿ{ and thus relation (3.8) becomes x x Hpuq hpnq log n “ hpmq κ log ` OpL ` 1q “ κ du ` OppL ` 1qHpxqq. m u nďx mďx 1 ÿ ÿ " * ż Hence x Hpuq Hpxq log x “ pκ ` 1q du ` ∆˚pxq, ∆˚pxq ! pL ` 1qHpxq. u ż1 It is convenient to slightly alter this relation, using the fact that Hpuq “ 1 for 1 ď u ă 2. Thus x Hpuq (3.9) Hpxq log x “ pκ ` 1q du ` ∆pxq px ě 2q, ∆pxq ! pL ` 1qHpxq. u ż2 We treat ∆pxq like an error term, and consider the integral equation for H given by (3.9). The “unperturbed” x κ equation fpxq log x “ pκ ` 1q 2 fpuq{u du has general solution fptq “ Cplog tq for some constant C, and our aim is to prove an asymptotic of this shape for Hpxq. First, we bound ∆pxq using the crude estimate ş 1 ´κ (3.10) Hpxq ď p1 ` hppqq “ Spxq 1 ´ ! plog xqκSpxq, p pďx pďx ź ź ˆ ˙ SIEVE METHODS LECTURE NOTES, SPRING 2020 45 where Spxq “ p1 ´ gppqq´1p1 ´ 1{pqκ. pďx ź We must relate Spxq to Spgq by estimating the contribution of the large primes p ą x to Spgq; that is, the

“extraneous” primes that are not involved in the sum nďx hpnq (cf. the Remarks). Let x ě 2. Now ř κ κ logpSpxq{Spgqq “ log p1 ´ gppqqp1 ´ 1{pq´κ ď ´ gppq ` . p p2 pąx pąx ź ÿ ˆ ˙ By (3.7) and partial summation, when x ě eL`1 we get

κ log p 8 κ p ´ gppq log p κ log p dt L ` 1 ´ gppq “ “ ´ gppq log p ! ! 1. p log p p 2 log x pąx pąx x xăpďt t log t ÿ ÿ ż ÿ ˆ ˙ When x ă eL`1, however, we do better using the trivial observation gppq ě 0: κ κ κ L ` 1 ´ gppq ď ` ´ gppq “ κ log ` Op1q. p p p log x pąx L`1 L`1 ÿ xăpÿďe pąÿe ˆ ˙ Therefore we have Spxq L ` 1 κ (3.11) Spxq “ Spgq ! 1 ` Spgq. Spgq log x ˆ ˆ ˙ ˙ The example described in the Remarks shows that (3.11) is in fact best possible. Combining (3.11) with (3.10) yields the estimates (3.12) Hpxq ! pplog xqκ ` pL ` 1qκq Spgq px ě 2q, (3.13) ∆pxq ! pL ` 1qplog xqκ ` pL ` 1qκ`1 Spgq px ě 2q. Returning to (3.9), we replace` x with t, divide through by t˘plog tqκ`2 and integrate from 2 to x. This gives x Hptq x κ ` 1 t Hpuq x ∆ptq dt ´ du “ dt. tplog tqκ`1 tplog tqκ`2 u tplog tqκ`2 ż2 ż2 ż2 ż2 After interchanging the order of integration, we see that the double integral equals x Hpuq 1 1 ´ du, u plog uqκ`1 plog xqκ`1 ż2 ˆ ˙ which implies that x Hpuq x ∆ptq du “ plog xqκ`1 dt. u tplog tqκ`2 ż2 ż2 Comparing this with (3.9) yields x ∆ptq ∆pxq (3.14) Hpxq “ pκ ` 1qplog xqκ dt ` px ě 2q. tplog tqκ`2 log x ż2 By (3.13), the integral above converges as x Ñ 8 (the tail being ! pL ` 1qSpgq{ log x for x ą eL`1), thus 8 ∆ptq dt “ C tplog tqκ`2 ż2 46 KEVIN FORD for some constant C. Therefore, combining (3.14) and (3.13) (when x ě eL`1) and (3.12) (when x ă eL`1), we conclude that

(3.15) Hpxq “ Cpκ ` 1qplog xqκ ` O Spgq pL ` 1qplog xqκ´1 ` pL ` 1qκ px ě 2q.

It remains to determine C. For real s ą 0 let` “ ‰˘

8 8 8 ´s ´s´1 t ´st ζhpsq :“ hpmqm “ s Hpxqx dx “ s Hpe qe dt. m“1 1 0 ÿ ż ż By (3.15), as s Ñ 0` we have

8 8 κ ´st ´κ κ ´u ´κ ζhpsq „ sCpκ ` 1q t e dt “ s Cpκ ` 1q u e du “ s Cpκ ` 1qΓpκ ` 1q. ż0 ż0 1 ` Since ζps ` 1q „ s as s Ñ 0 , we obtain

´κ lim ζps ` 1q ζhpsq “ Cpκ ` 1qΓpκ ` 1q. sÑ0` On the other hand, 1 κ hppq ζ s 1 ´κζ s 1 1 . p ` q hp q “ ´ s`1 ` s p p p ź ˆ ˙ ˆ ˙ Using (3.7), we see that the Euler product is uniformly convergent for s ě 0 (Exercise). Therefore,

1 κ hppq 1 κ Cpκ ` 1qΓpκ ` 1q “ lim 1 ´ 1 ` “ 1 ´ p1 ` hppqq “ Spgq. . s 0` s`1 s Ñ p p p p p ź ˆ ˙ ˆ ˙ ź ˆ ˙

3.3. Application: twin primes.

Theorem 3.5. Let k be an even, positive integer. Then, uniformly in k ď x,

p ´ 1 x log x #tp ď x : p ` k primeu ď C 4 ` O 2 , p ´ 2 log2 x log x p|k ˆ ˙ ˆ ˆ ˙˙ pźą2 where 1 C “ 2 1 ´ 2 p pp ´ 1q ź ˆ ˙ is the “twin prime constant”.

Proof. Let Ω “ tp ` k : p ď xu. Then

1{φpdq if pd, kq “ 1 Ad “ Xgpdq ` rd,X “ lipxq, gpdq “ #0 if pd, kq ą 1. SIEVE METHODS LECTURE NOTES, SPRING 2020 47

1{2 ´B Let D “ z “ x plog xq , where B is sufficiently large. We have |rd| ! x{d trivially, and therefore by the Bombieri-Vinogradov theorem and Cauchy’s inequality,

x 1{2 3ωpdqµ2pdq|r | ! µ2pdq3ωpdq |r |1{2 d d d dďD dďD ÿ ÿ ´ ¯ 1{2 1{2 µ2pdq9ωpdq ď x1{2 |r | d d ˜ dďD ¸ ˜ dďD ¸ ÿ ÿ 1{2 9 x 1{2 x ! x1{2 1 ` ! . p plog xq20 plog xq5 ˜ pďD ¸ ź ˆ ˙ ˆ ˙ 1 Since gppq “ p´1 for primes p - k, the hypotheses of Theorem 3.4 hold with κ “ 1, A1 and A2 absolute constants, and with log p log p L “ Op1q ` ! ! log k. p ´ 1 p ´ 1 2 p k p O log k ÿ| “ ÿp q 1 We also have hppq “ p´2 for p - k. Theorem 3.4 implies that ? 1 J “ Spgq log D ` Oplog2 kq “ Spgq 4 log x ` Oplog2 xq , ´ ¯ where ` ˘ 1 p ´ 2 Spgq “ . 2C p ´ 1 p|k pźą2 Finally, Theorem 3.1 gives X #tp ď x : p ` k primeu ď D ` SpA,Dq ď D ` ` µ2pdq3ωpdq|r | J d dďD ÿ p ´ 1 x log x ď C 4 ` O 2 . p ´ 2 log2 x log x  p|k ˆ ˙ ˆ ˆ ˙˙ pźą2

Remarks. Assuming the Elliott-Halberstam conjecture, we may take D “ x1´ε for any positive ε in the above argument, and replace the 4 with 2 ` op1q in the conclusion. This is only a factor two worse than the Hardy-Littlewood conjectured asymptotic formula for the left hand side. For fixed k, Bombieri, Friedlander and Iwaniec showed that one may replace 4 with 3.5 (the error term is not uniform in k). Using the very same analysis, one can also prove, for even N ě 4,

p ´ 1 N log2 N #tp1, p2 : N “ p1 ` p2u ď C 4 ` O . p ´ 2 log2 N log N p|N ˆ ˆ ˙˙ pźą2 We leave this as an exercise. 48 KEVIN FORD

3.4. Selberg’s sieve is best possible in dimension 1. Consider Selberg’s example Ω “ tn ď x : λpnq “ ´1u, where λ is Liouville’s function. As before, we saw that pRpθ, Aqq holds for all θ ă 1 and A ą 0, X “ x{2, gpdq “ 1{d and thus hppq “ 1{pp ´ 1q. Take z “ D “ x1{2´ε for small, positive ε. In Theorem 3.4, we have S “ 1, and so by Theorem 3.1, X x x x SpA, zq ď ` O “ ` O . J log5 x p1 ´ 2εq log x log2 x ? ˆ ˙ ˆ ˙ But SpA, zq “ πpxq ´ πp xq ` 1 „ x{ log x by the prime number theorem. Thus, Selberg’s upper bound sieve cannot be improved, in general, for κ “ 1. 3.5. Exercises. Exercise 3.1. As in the proof of Lemma 3.3, let µ2pnq H pxq “ . 1 φ n nďx p q ÿ Show that H1pxq “ log x ` c ` op1q, where log p c “ γ ` “ 1.332 ... p ppp ´ 1q ÿ and γ “ 0.5772 ... is Euler’s constant. Exercise 3.2. Prove that for even N ě 4,

p ´ 1 N log2 N #tp1, p2 : N “ p1 ` p2u ď C 4 ` O . p ´ 2 log2 N log N p|N ˆ ˆ ˙˙ pźą2

Exercise 3.3. (Asymptotic for J in Selberg’s sieve). Let A1,A2, L, κ ą 0, and let g be a multiplicative gppq function satisfying (3.6) and (3.7). Let h be the multiplicative function defined by hppq “ 1´gppq for prime p. (i) Prove that uniformly for 2 ď w ď y and s ě 0, 1 κ hppq L ` 1 1 ´ 1 ` “ 1 ` O . ps`1 ps log w wďpďy ź ˆ ˙ ˆ ˙ ˆ ˙ The implied constant in the O´term may depend only on A1,A2, L, κ. Hint: be careful. You may want to consider separately the cases w ă eL`1 and w ě eL`1. (ii) Use (i) to show that 1 κ hppq 1 κ lim 1 ´ 1 ` “ 1 ´ p1 ` hppqq . s 0` s`1 s Ñ p p p p p ź ˆ ˙ ˆ ˙ ź ˆ ˙ SIEVE METHODS LECTURE NOTES, SPRING 2020 49

4. SMOOTHNUMBERS In what follows we will need the Erdos˝ notation for iterates of the logarithm:

logk x “ log ¨ ¨ ¨ log x. k The basic function loooomoooon Ψpx, yq “ #tn ď x : P `pnq ď yu is widely used in number theory. In contrast with Φpx, zq, which eliminates numbers with small prime factors, Ψpx, yq eliminates numbers with large prime factors. One can use the small sieve (Theorem 2.4) to bound Ψpx, yq but we obtain only log y Ψpx, yq ! x log x with no lower bound. The truth, however, is very different, owing to the non-independence of large primes ? dividing n, e.g. the events p|n and p1|n are exclusive if p ą p1 ą x. Theorem 4.1. Uniformly for x ě 10 and log x ď y ď x we have log x Ψpx, yq “ xe´u log u`Opu log2p10uqq, u “ . log y

Remarks. There is a change of behavior around y “ log x, due to the fact that for smaller y, pďy p ă x, and this forces at least some of the exponents of prime dividing n to be large. ś We note some special cases which we will find useful for applications: plog xq log x (4.1) Ψpx, log xq “ exp O 3 “ xop1q px Ñ 8q, log x " ˆ 2 ˙ * (4.2) Ψpx, plog xqcq “ x1´1{c`op1q px Ñ 8q for any fixed c ě 1, and x (4.3) Ψpx, xcplog3 xq{ log2 xq “ px Ñ 8q. plog xqc`op1q We first need a combinatorial lemma, which is similar to devices we used to develop the Brun-Hooley sieve.

Lemma 4.2. Let I be a finite set of positive integers, and k P N. Then 1 1 1 k ´ 1 k ě ´ , n1 ¨ ¨ ¨ nk k! n min I n1,...,nkPI ˆ nPI ˙ n1ăn2ÿ㨨¨ănk ÿ provided that the expression in parentheses is ě 0. Proof. This is straightforward. We have 1 1 1 “ n1 ¨ ¨ ¨ nk k! n1 ¨ ¨ ¨ nk n1,...,nkPI n1,...,nkPI n1ăn2ÿ㨨¨ănk distinctÿ 1 1 1 1 “ ¨ ¨ ¨ . k! n1 n2 nk n1PI n2PI nkPI ÿ n2ÿ‰n1 nkRtn1ÿ,...,nk´1u 50 KEVIN FORD

Each sum over ni is at least nPI 1{n ´ pi ´ 1q{ min I, independent of the choice of n1, . . . , ni´1, and the proof is complete. ř  Proof of Theorem 4.1. We begin with the upper bound, and we will in fact prove a stronger bound (4.4) Ψpx, yq ď xe´u log u`Opuq. Define log u α “ 1 ´ . log y By our hypothesis that log x ď y ď x, log x log x (4.5) 1 ď u ď , 3 ď α ď 1. log2 x log2 x For all w ą 0, logpwαq ď wα and thus log w ď α´1wα. Hence, (4.6) plog xqΨpx, yq “ logpx{nq ` log n ď α´1xαS ` log p, nďx nďx pa|n P `ÿpnqďy P `ÿpnqďy ÿ where 1 S “ . nα P ` n y ÿp qď In the double-sum on the right side of (4.6), let n “ pam, and separate into cases depending on a “ 1 or a ą 1. The a “ 1 terms contribute x α ď log p ! minpy, x{mq ď y1´α “ uxαS. m mďx pďminpy,x{mq mďx P `pmqďy P `pÿmqďy ÿ P `pÿmqďy ÿ ´ ¯ The terms with a ą 1 contribute x α ď log p 1 ď log p “ xαST, pam pďy mďx{pa pďy P `pmqďy ˆ ˙ 2ďaÿ!log x P `pÿmqďy 2ďaÿ!log x ÿ where log p T “ . pa α pďy 2ďaÿ!log x If α ě 2{3 then clearly T ! 1. If 0 ă α ă 2{3 then y ď plog xq3 and u ě log x , thus crudely 3 log2 x T ! plog xq log p ! y log x ! plog xq4 ! u5. pďy ÿ Putting together the a “ 1 and a ą 1 terms, we conclude from (4.5) and (4.6) that (4.7) plog xqΨpx, yq ! xαSpα´1 ` u ` u5q ! u5xαS “ xu5e´u log uS. It remains to bound S. We have 1 1 1 1 S “ 1 ` ` ` ¨ ¨ ¨ “ 1 ` ď exp . pα p2α pα 1 pα 1 pďy pďy ´ pďy ´ ź ˆ ˙ ź ˆ ˙ " ÿ * SIEVE METHODS LECTURE NOTES, SPRING 2020 51

First consider the case α ě 2{3. For any 0 ď z ď 1 and c ě 0 we have 8 pczqk 8 ck ecz “ ď 1 ` z ď 1 ` ecz, k! k! k“0 k“1 ÿ ÿ hence 1 1 plog uq log p 1 log p “ e log y ď 1 ` elog u . pα p p log y ˆ ˙ Thus, by Mertens bounds, 1 log S ď Op1q ` pα pďy ÿ 1 u log p ď Op1q ` ` p log y p pďy pďy ÿ ÿ ď log2 y ` Opu ` 1q. Thus, S ! plog yqeOpuq. Combining this with (4.7), we get (4.4) in this case. Now assume 0 ă α ă 2{3. Then y ď u3 ď log3 x and u — log x . We then have, using (4.5) again, log2 x 1 y dt log S ! ` α log p tα 1{α 1 pďÿ2 ż y1´α ! α´121{α ` 1 ´ α ! plog xqop1q ` u ! u. Again, plugging this into (4.7) yields the claimed upper bound in (4.4). Now we prove the lower bound in Theorem 4.1. This breaks into two cases, 10 (i) log x ď y ď exptplog2 xq u; 10 (ii) exptplog2 xq ď y ď x.

In each case we may assume that x ě x0, a sufficiently large constant, since for x ď x0, Ψpx, yq ě 1 and the result follows. We begin with the easier case (i), following ideas from Tenenbaum [127, Ch. III.5.1]. Here log x log x (4.8) 10 ď u ď . plog2 xq log2 x

Let v “ tuu and k “ πpyq. Let p1, . . . , pk be the primes ď y. Then Ψpx, yq counts at least every number of ν1 νk the form p1 ¨ ¨ ¨ pk where ν1 ` ¨ ¨ ¨ ` νk ď v. Thus, k ` v Ψpx, yq ě . v ˆ ˙ By (4.8), u ! y{ log y — k . Thus, by Stirling’s formula and v “ u ` Op1q, we deduce log Ψpx, yq ě pk ` vq logpk ` vq ´ k log k ´ v log v ` Oplogpk ` vqq “ pk ` uq logpk ` uq ´ k log k ´ u log u ` Oplog yq “ ´u log u ` u log k ` pk ` uq logp1 ` u{kq ` Oplog yq. 52 KEVIN FORD

Again, (4.8) implies that log2 y ! log3 x ! log2 u, hence

u log k “ u log y ` Opu log2 yq “ log x ` Opu log2 uq. Also, pk ` uqu u2 pk ` uq logp1 ` u{kq ď ď u ` ! u. k k Hence,

log Ψpx, yq ě log x ´ u log u ` Opu log2 uq, as desired. In case (ii), we will first show a weaker bound (4.9) Ψpx, yq " xe´3u log u p1 ď y ď xq. 10 If y ă log x then 3u log u ą log x and (4.9) is trivial, and if log x ď y ď exptplog2 xq u then (4.9) 10 follows from the bound proved in case (i). Now suppose y ą exptplog2 xq u. Let k “ tuu ` 1 and let 1 1 I “ N X px k`1 , x k s. Then Ψpx, yq counts all numbers of the form n “ p1 ¨ ¨ ¨ pkm ď x with pi P I (these 1 numbers are distinct since m ď x k`1 ). We observe that 1 1 1 k 1 u 2 1{3 9 x ` ě x ` ě x 3u “ y ą exptplog2 xq u. By the Prime Number Theorem, we thus have for some constant c ą 0 ? 1 k ` 1 1{pk`1q k ` 1 “ log ` O e´c log x “ log ` Op1{ log10 xq. p k k pPI ÿ ˆ ˙ ´ ¯ ˆ ˙ Hence, by Lemma 4.2, x x Ψpx, yq ě ě p1 ¨ ¨ ¨ pk 2p1 ¨ ¨ ¨ pk p1,...,pkPI Z ^ p1,...,pkPI p1ăp2ÿ㨨¨ăpk p1ăp2ÿ㨨¨ăpk x{2 1 k k ě ´ k! p 1 pPI x k`1 ˆ ÿ ˙ x 1 k ě logp1 ` 1{kq ´ O k! k2 log2 x xˆ ˆ ˙ ˙ " " xe´2k log k`Opkq kk k! and (4.9) follows. 10 Now we use (4.9) as a bootstrap for a better estimate. Suppose that exptplog2 xq u ď y ď x. Assume u ě e4, since the desired lower bound in Theorem 4.1 follows from (4.9) for 1 ď u ď e4. Let k “ tuu ` 1, 1 1 1´2η 1´η let η “ log u ď 4 and I “ N X py , y s. Consider integers n “ p1 ¨ ¨ ¨ pkm, where pi P I for all i, ` 1´2η p1 ă ¨ ¨ ¨ ă pk and P pmq ď y . These integers are distinct and counted by Ψpx, yq. Then x Ψpx, yq ě Ψ , y1´2η . p1 ¨ ¨ ¨ pk p1,...,pkPI ˆ ˙ p1㨨¨ăÿ pk kp1´2ηq up1´2ηq 1´2η Now p1 ¨ ¨ ¨ pk ě y ě y “ x and thus x ď x2η “ y2ηu ď py1´2ηq4ηu, p1 ¨ ¨ ¨ pk SIEVE METHODS LECTURE NOTES, SPRING 2020 53

1 using that η ď 4 . Hence, by (4.9), 1 Ψpx, yq " x e´12ηu logp4ηuq p1 ¨ ¨ ¨ pk p1,...,pkPI p1㨨¨ăÿ pk 1 " xe´Opuq . p1 ¨ ¨ ¨ pk p1,...,pkPI p1㨨¨ăÿ pk Invoking Lemma 4.2 and using the Prime Number Theorem as in case (i), we conclude that xe´Opuq 1 1 k Ψpx, yq " ` O k! p k100 log x pPI ˆ ÿ ˆ ˙ ˙ xe´Opuq 1 k " k! 2 log u ˆ ˙ “ xe´u log u`Opu log2p10uqq. This completes the proof of the lower bound in Theorem 4.1.  Exercise 4.1. (a) Show, using elementary estimates, that Ψpx, x1{uq “ xp1 ´ log uq ` Opx{ log xq uniformly for 1 ď u ď 2. (b) Show that for y ă z ă x that Ψpx, yq “ Ψpx, zq ´ Ψpx{p, pq. yăpďz ÿ (c) Let ρpuq be the Dickman-de Bruijn function, defined recursively by u ρpv ´ 1q ρpuq “ 1 p0 ď u ď 1q, ρpuq “ 1 ´ dv pu ą 1q. v ż1 Using (b) and induction on tuu, show that for any k ą 1, uniformly for 1 ď u ď k we have x Ψpx, x1{uq “ ρpuqx ` O . k log x ˆ ˙ Exercise 4.2. Prove that uniformly for 10 ď log z ď y ď z ď x, log z Θpx, y, zq :“ # n ď x : pv ą z “ xe´u log u`Opu log2p3uqq, u “ . log y # pv}n + pźďy That is, counting numbers which have a large y-smooth part. Exercise 4.3. Let S denote the set of integers with pP `pnqq2|n. Show that ? #tn ď x : n P Su ! x exp ´ p 2 ` op1qq log x log2 x . ! a ) 54 KEVIN FORD

5. COUNTING PRIME FACTORS Let πkpxq “ #tn ď x : ωpnq “ ku.

Using the Prime Number Theorem, Landau proved an asymptotic for πkpxq for each fixed k. Theorem (Landau, 1900). For every fixed k, x plog xqk´1 π pxq „ 2 . k log x pk ´ 1q! This already suggests that ωpnq has a Poisson distribution, although Landau never wrote this explicitly. It was Hardy and Ramanujan in 1917 who analyzed the behavior of πkpxq uniformly in k, showing Theorem (Hardy-Ramanujan, 1917). Uniformly for x ě 2 and k ě 1, k´1 x plog2 x ` C2q π pxq ď C1 , k log x pk ´ 1q! where C1,C2 are certain absolute constants. Summing the upper bound for k ě p1 ` εq log2 x and k ď p1 ´ εq log2 x, with ε ą 0 fixed, and using standard bounds on the tail of the Poisson distribution (see Lemma 5.3 below), one obtains a sum of opxq. Consequently, most n ď x have close to log2 x distinct prime factors. This result is sometimes referred to as the birth of probabilistic number theory. Motivated by the fact that the Poisson distribution tends to the Gaussian as the parameter tends to infinity, Erdos˝ and Kac proved their celebrated “Central Limit Theorem” for ωpnq in 1939: Theorem (Erdos-Kac,˝ 1939 [42]). For any real z, z 1 ωpnq ´ log2 x 1 ´ 1 t2 # n ď x : ď z Ñ Φpzq :“ ? e 2 dt px Ñ 8q. x log x 2π # 2 + ż´8 Much further work was donea starting in the 1940s, examining the distribution of the entire sequence of prime factors of integers (equivalently, studying the distribution of arbitrary additive functions). Perhaps the most notable was the work of Kubilius, who developed a probabilistic model of integers which provides a kind of meta-tool for studying al kinds of statistical questions about the distribution of prime factors. A key concept in the theory is independence, the idea that if p and q are small primes, then the “events” p|n and q|n are nearly independent, from a probabilistic viewpoint; this idea also played a prominent role in the development of sieve methods. The theory leads to a “Poisson model” of prime factors; namely that a b the number of prime factors in an interval pee , ee s has roughly Poissonpb ´ aq distribution, with disjoint intervals having independent distributions. Denote by ωpn, T q the number of distinct prime factors of n that lie in T . Lemma 5.1. Let T be a finite set of primes, and m ě 0. Then 1 1 m m 1 1 1 m ´ ď ď . m! p min T n m! p ´ 1 ˆ pPT ˙ n:p|nñpPT ˆ pPT ˙ ÿ ωpn;ÿT q“m ÿ Proof. The first inequality follows from Lemma 4.2 upon considering squarefree n. By grouping products, we see that 1 1 m ` ` ¨ ¨ ¨ p p2 pPT ˆ ÿ ˙ SIEVE METHODS LECTURE NOTES, SPRING 2020 55 is at least m! times the sum on the left. This gives the second inequality. 

Theorem 5.2 (Prime factors in sets). Let T1,..., Tr be arbitrary disjoint, nonempty subsets of the primes ď x. For any k1, . . . , kr ě 0 we have

r kj r Hj kj #tn ď x : ωpn; T q “ k p1 ď j ď rqu ! x e´Hj 1 ` j j k ! H j“1 ˜ j ¸ ˜ j“1 j ¸ ź ÿ r kj ´1 kj Hj Hj ď x e´Hj ` , pk ´ 1q! k ! j“1 j j ź ˆ ˙ where, for each j, 1 Hj “ . p ´ 1 pPT ÿj kj ´1 When kj “ 0 the corresponding term Hj {pkj ´ 1q! is to be omitted. Proof. Let 1 1 L “ ,L “ . h t h hďx hďx ωph;Tj q“ÿkj p1ďjďrq ωph;Tj q“ÿkj pj‰tq ωph;Ttq“kt´1 We use the “log-trick” again (due to E. Wirsing). For any n ď x write

log x “ log n ` logpx{nq “ log pa ` logpx{nq ď log pa ` x{n. pa n pa n ÿ} ÿ} This gives

a plog xq#tn ď x : ωpn; Tjq “ kj p1 ď j ď rqu ď xL ` log p . nďx pa}n ωpn;Tj q“ÿkj p1ďjďrq ÿ

a In the double sum, let n “ p h and observe that ωph, Tjq “ kj ´ 1 if p P Tj and ωph, Tjq “ kj otherwise (note that the former case is only possible if kj ą 0). That is, h is either counted by L or h is counted by Lt for some t, 1 ď t ď r. Hence

a plog xq#tn ď x : ωpn; Tjq “ kj p1 ď j ď rqu ď 2xL ` log p . t:ktą0 hďx paďx{h ÿ ωph;Tj q“kj ´ÿ1j“t p1ďjďrq ÿ

Using Chebyshev’s Estimate for primes, the innermost sum over pa is Opx{hq and thus x #tn ď x : ωpn; T q “ k p1 ď j ď rqu ! L ` L . j j log x j 1ďjďr:k ą0 ˆ ÿ j ˙ 1 To bound the sum in L and in Lt, write the denominator h “ h1 ¨ ¨ ¨ hrh , where, for 1 ď j ď r, hj is 1 composed only of primes from Tj, ωphj; Tjq “ kj ´ 1t“j, and h is composed of primes in r2, xszpT1 Y 56 KEVIN FORD

¨ ¨ ¨ Y Trq. For brevity, write mj “ ωph; Tjq. Using Lemma 5.1 and Mertens, we obtain 1 r 1 1 1 ď 1 ` ` 2 ` ¨ ¨ ¨ h hj p p hďx j“1 ωphj ;Tj q“mj pďx ˆ ˙ ÿ ź ÿ p T ź T ωph;Tj q“mj p@jq p|hj ùñ pPTj R 1Y¨¨¨Y r r mj ´1 Hj 1 ď 1 ´ m ! p j“1 j pďx ˆ ˙ ź pRT1źY¨¨¨YTr r mj Hj 1 ! plog xq 1 ´ . mj! p j“1 pPT Y¨¨¨YT ź 1ź r ˆ ˙ We conclude that r kj r Hj kj 1 #tn ď x : ωpn; Tjq “ kj p1 ď j ď rqu ! x 1 ` 1 ´ . kj! Hj p j“1 ˜ j“1 ¸ pPT Y¨¨¨YT ź ÿ 1ź r ˆ ˙ Finally, using the elementary inequality 1 ` y ď ey, we see that 1 1 1 ´ ď exp ´ p p pPT Y¨¨¨YT pPT Y¨¨¨YT 1ź r ˆ ˙ " 1ÿ r * 1 “ exp Op1q ´ p ´ 1 pPT Y¨¨¨YT " 1ÿ r * ! e´H1´¨¨¨´Hr , and the proof is complete.  Remark. Theorem 5.2 is similar to [130, Theorem 2]. In the special case of a single set of primes, we have Hk´1 Hk 1 (5.1) #tn ď x : ωpn; T q “ ku ! xe´H ` ,H “ . pk ´ 1q! k! p ´ 1 ˜ ¸ pPT ÿ In particular, 1 #tn ď x : ωpn; T q “ 0u ! xe´H — x 1 ´ . p pPT ź ˆ ˙ This matches the sieve upper bound in Theorem 2.4 in the special case Ω “ r1, xs X N, Ap “ tn P Ω: p|nu for p P T . To use (5.1), one often sums up the bound for kj in an interval. The bound in Theorem 5.2 looks like the product of independent Poisson distributions with parameters Hj. Lemma 5.3 (Poisson tails). Let X be a Poisson random variable with parameter λ. Then ´Qpαqλ ´Qpαqλ PpX ď αλq ď e p0 ď α ď 1q, PpX ě αλq ď e pα ě 1q, where (5.2) Qpxq “ x log x ´ x ` 1. SIEVE METHODS LECTURE NOTES, SPRING 2020 57

X Proof. We use the idea behind Chernoff’s inequality, Markov’s inequality, and the easy identity Ec “ epc´1qλ for c ą 0. Let b “ log α. Then

bX peb´1qλ bX bαλ Ee e Q α λ pX ď αλq “ e ě e ď “ “ e´ p q . P P ebαλ ebαλ ´ ¯ Similarly, bX peb´1qλ bX bαλ Ee e Q α λ pX ě αλq “ e ě e ď “ “ e´ p q . P P ebαλ ebαλ  ´ ¯ We record frequently needed bounds on the function Qpxq.

Lemma 5.4 (Q bounds). We have

x 8 p´1qk (5.3) Qpxq “ log t dt pall xq “ px ´ 1qk p|x ´ 1| ă 1q, kpk ´ 1q 1 k“2 ż ÿ and x2 (5.4) ď Qp1 ` xq ď x2 p|x| ď 1q. 3 Corollary 5.5 (Prime factors in intervals). Let ωpn, tq “ #tp|n : p ď tu. (a) Uniformly for 3 ď t ď x and 0 ď λ ď 1, we have

´Qpλq #tn ď x : ωpn, tq ď λ log2 tu ! xplog tq .

Let λ0 ą 1. (b) Uniformly for 3 ď t ď x and 1 ď λ ď λ0, we have

´Qpλq #tn ď x : ωpn, tq ě λ log2 tu !λ0 xplog tq .

(c) Uniformly for 3 ď t ď x and 0 ď ψ ď log2 t, we have

a ´ 1 ψ2 #tn ď x : |ωpn, tq ´ log2 t| ą ψ log2 tu ! xe 3 . a Proof. Let T denote the set of primes in r2, ts. By Mertens, H “ log2 t ` Op1q. The given bounds now follow from Theorem 5.2 together with the tail bounds in Lemma 5.3. For (a),

x plog t ` Op1qqk #tn ď x : ωpn, tq ď λ log tu ! 2 2 log t k! kďλ log t ÿ 2 x plog tqkp1 ` Op1{ log tqqk “ 2 2 log t k! kďλ log t ÿ 2 x plog tqk ! 2 log t k! kďλ log t ÿ 2 ď xplog tq´Qpλq. 58 KEVIN FORD

For (b), there is some C such that x plog t ` Cqk #tn ď x : ωpn, tq ě λ log tu ! 2 2 log t k! kěλ log t´1 ÿ2 x plog t ` Cqk “ 2 , log t k! k λ˚ log t C ě pÿ2 ` q ˚ ˚ where λ “ λ ` Op1{ log2 tq. Since Qpλ q “ Qpλq ` Oλ0 p1{ log2 tq, applying Lemma 5.3 gives ˚ ´plog2 t`CqQpλ q ´Qpλq #tn ď x : ωpn, tq ě λ log2 tu ! xe !λ0 xplog tq . Part (c) follows from (a) and (b) plus Lemma 5.4.  5.1. Primes counted with multiplicity. The results of the previous section may be extended to the distri- bution of the function Ωpnq. There is, however, a change of behavior of #tn ď x :Ωpnq “ ku in the vicinity of k “ 2 log2 x, due to the influence of powers of 2. Lemma 5.6. Uniformly for x ě 2 and 0 ď y ă 2 we have x yΩpnq ! plog xqy´1. 2 y nďx p ´ q ÿ Proof. Again, use the log-trick. We have plog xq yΩpnq ď yΩpnq px{n ` log nq nďx nďx ÿ ÿ yΩpnq ď xS ` yΩpnq Λpqq,S “ . n nďx q n nďx ÿ ÿ| ÿ Write n “ qm and note that Ωpnq “ Ωpqq ` Ωpmq. Then yΩpnq Λpqq “ yΩpmq ΛpqqyΩpqq nďx q n mďx q x m ÿ ÿ| ÿ ďÿ{ ! yΩpmqpx{mq “ xS. mďx ÿ Therefore, x x y y2 yΩpnq ! S ď 1 ` ` ` ¨ ¨ ¨ log x log x p p2 nďx pďx ÿ ź ˆ ˙ x y x “ 1 ` ! plog xqy´1. log x p y 2 y  pďx ´ ´ ź ˆ ˙ Theorem 5.7. (a) Uniformly for 0 ď λ ď 1 we have x #tn ď x :Ωpnq ď λ log xu ! . 2 plog xqQpλq (b) Uniformly for 1 ď λ ă 2 we have x #tn ď x :Ωpnq ě λ log xu ! . 2 p2 ´ λqplog xqQpλq SIEVE METHODS LECTURE NOTES, SPRING 2020 59

(c) Uniformly for k ě 1 we have xk log x #tn ď x :Ωpnq ě ku ! . 2k

Remarks. Estimate (c) is most useful when k ě 2 log2 x. Estimates (b) and (c) smoothly interpolate, since Qp2q “ log 4 ´ 1, and thus when k “ 2 log2 x ` Op1q both bounds take the form x log x ! 2 . plog xqlog 4´1 Proof. (a) Take y “ λ in Lemma 5.6, obtaining

Ωpnq´λ log2 x ´Qpλq #tn ď x :Ωpnq ď λ log2 xu ď λ ! xplog xq . nďx ÿ (b) Similarly, apply Lemma 5.6 with y “ λ: x #tn ď x :Ωpnq ě λ log xu ď λΩpnq´λ log2 x ! . 2 Qpλq nďx p2 ´ λqplog xq ÿ (c) Take y “ 2 ´ 1{k in Lemma 5.6. Then #tn ď x :Ωpnq ě ku ď yΩpnq´k nďx ÿ x ! y´k plog xqy´1 2 ´ y xk xk log x log x 1´1{k . ď k 1 k p q ! k  2 p1 ´ 2k q 2 5.2. Application: Erdos’˝ multiplication table problem. In 1955, Erdos˝ [36] posed the following prob- lem: Estimate the number, ApNq, of distinct products of the form ab with a ď N, b ď N. Erdos˝ proved that ApNq “ opN 2q, and later in 1960 [38] refined the estimates to prove that ApNq “ N 2plog Nq´E`op1q, where 1 ` log log 2 E “ Qp1{ log 2q “ 1 ´ “ 0.08607 .... log 2

2 Theorem 5.8. We have A N N . p q ! plog NqE

2 log2pN q log2 N Proof. Let k0 “ log 2 “ log 2 ` 1. By Theorem 5.7, the number of distinct products with Ωpabq ě k0 is bounded above by 2 2 ´Qp1{ log 2q 2 ´E #tm ď N :Ωpmq ě k0u ! N plog Nq “ N plog Nq . 1 If Ωpabq ă k0, then ωpaq “ h, ωpbq “ j with h`j “ k ă k0. The number of pairs pa, bq with h ď 2 log2 N 1 or j ď 2 log2 N is 1 2 ´Qp1{2q 2 ´0.15 2 ´E ď 2N#ta ď N : ωpaq ď 2 log2 Nu ! N plog Nq ! N plog Nq ! N plog Nq . 1 If h and j are fixed, and both larger than 2 log2 N, we apply Theorem 5.2, taking T as the set of all primes ď N, so that H “ log2 N ` Op1q. The number of pairs pa, bq is thus N 2plog Nqh`j ! 2 . plog Nq2h!j! 60 KEVIN FORD

Summing first over all j, h with h ` j “ k using the binomial theorem, and then over k ă k0 using Lemma 5.3, we obtain an upper bound for the total number of pairs a, b with Ωpabq ă k0 of N 2 p2 log Nqk ! 2 ! N 2plog2 Nq´Qp1{ log 4q “ N 2plog Nq´E . log2 N k!  kăk ÿ0 The upper bound in Theorem 5.8 is close to the truth. In fact [47], N 2 ApNq — . E 3{2 plog Nq plog2 Nq 5.3. Exercises. Exercise 5.1. Let S denote the set of numbers that are the sum of two squares. Show that for any ε P p0, 1s, x #tn ď x, n P S : |ωpnq ´ 1 log x| ą ε log xu ! . 2 2 2 plog xq1{2`ε2{6 SIEVE METHODS LECTURE NOTES, SPRING 2020 61

6. STRUCTUREOFSHIFTEDPRIMES

Throughout, we will work with sets Pa “ tp ` a : p prime u, for a fixed nonzero a. The structure of these sets have numerous applications, particularly when a “ ´1 or a “ 1. These include (1) The study of Euler’s totient function φpnq; (2) The study of the sum-of-divisors function σpnq; (3) Problems about orders and primitive roots modulo primes; (4) Carmichael numbers; analyzing primality tests

6.1. The number of prime factors of shifted primes. In 1935, Erdos˝ [31] showed that for any fixed a ‰ 0, the function ωpp ` aq has normal order log2 p. To accomplish this, Erdos˝ proved an upper bound of Hardy- Ramanujan type for the number of primes p ď x with ωpp ` aq “ k. Here we prove a best-possible version of this estimate. Theorem 6.2 below improves the uniformity of Theorem 1 of Timofeev [128], who showed this bound uniformly for k ď b log2 x for any fixed b. Lemma 6.1. Fix b ě 0. Uniformly for x ě 2 and ` ě 0 we have ` 1 plog2 x ` Op1qq !b . φ r logb x r `! logb x ωprq“` p q p { q rP `ÿprqďx Proof. If ` “ 0 then r “ 1 and the result is trivial. Now suppose ` ě 1. Then 2 ď r ď x{2. We separately 1{2j consider r in log-dyadic ranges. Let Qj “ x for j ě 0 and define

` x x Tj “ 2 ď r ď x{2 : ωprq “ `, rP prq ď x, ă r ď . Q Q " j´1 j * ` For r P Tj, P prq ď x{r ď Qj´1. Also, if Tj is nonempty then Qj´1 ě 2. We have 1 1 1 ď . b b φprq rP φprq log px{rq log Qj rP ÿTj ÿTj For the sum on the right side, we’ll use a trick that was useful in the study of Ψpx, yq. Let α “ 1 . 10 log Qj ? 1 Since Qj´1 ě 2, Qj ě 2 and thus 0 ă α ď 3 . We’ll encode the condition r ě x{Qj´1 with 1 1 1 1 “ ! ! , φprq φprqαφprq1´α rα{2φprq1´α xα{2φprq1´α

α{2 α{2 α 1{10 since px{rq ď Qj´1 “ Qj “ e . Now 1 1 1 1 ` 1´α ď 1´α ` 1´α ` ¨ ¨ ¨ ` φprq `! pp ´ 1q pppp ´ 1qq P prqďQj´1 " pďQj´1 * ωpÿrq“` ÿ 1 1 ` “ Op1q ` . `! p1´α pďQ " ÿj´1 * α Since log p ď log Qj´1 “ 2 log Qj, we have p “ 1 ` Opα log pq. It follows that 1 1 α log p ď ` O ď log Q ` Op1q ď log x ` Op1q. p1´α p p 2 j´1 2 pďQ pďQ ÿj´1 ÿj´1 ˆ ˙ 62 KEVIN FORD

Putting everything together, we see that 1 1 1 ! b α{2 b 1´α φprq log px{rq x log Qj ` φprq rPTj P prqďQj´1 ÿ ωpÿrq“` 1 plog x ` Op1qq` ! 2 α{2 b x log Qj `! 2bj exp ´ 1 ¨ 2j plog x ` Op1qq` “ 20 2 . b `! log x ( Summing over j completes the proof.  Theorem 6.2. Fix a ‰ 0. Uniformly for x ě 4|a| and k P N we have k´1 x plog2 x ` Op1qq #t2 ` |a| ă p ď x : ωpp ` aq “ ku !a p2|aq log2 x pk ´ 1q! and k´1 p`a x plog2 x ` Op1qq #t2 ` |a| ă p ď x : ωp q “ ku !a p2 - aq. 2 log2 x pk ´ 1q! Proof. Let 1 2|a s “ #2 2 - a. p`a ` p`a p`a Suppose p ą 2 ` |a| ě 3 is prime and ωp s q “ k. Define q “ P p s q and write s “ qr. Either ωprq “ k ´ 1 or ωprq “ k, and r is odd if 2|a. Also, rP `prq ď rq ď px ` aq{s. Define, for ` ě 0, ` x`a R` “ tr P N : rP prq ď s , ωprq “ `; r odd if 2|au. ? We separately consider two cases. First, suppose that 1 ď k ď log2 x. Let L “ expt log xu. Using Theorem 4.1, we have x ` a x (6.1) #t2 ` |a| ă p ď x : q2| p`a u ď Ψpx ` a, Lq ` ! . s q2 a L qąL qďL ÿ We use Theorem 2.5 to bound the contribution of thoselooooomooooonp with q}pp ` aq thus: p`a 2 p`a x`a #t2 ` |a| ă p ď x : ωp s q “ k, q - s u ď #tq ď rs : q, qsr ´ a both primeu rPR ÿk´1 E“|rsa| |ars| xloooomoooon` a ! φp|ars|q rs log2 x`a rP rs ÿRk´1 1 !a x . φ r log2 x`a rP p q r ÿRk´1 Invoking Lemma 6.1, we conclude that k´1 p`a x plog2 x ` Op1qq x #t2 ` |a| ă p ď x : ωp q “ ku !a ` . s log2 x pk ´ 1q! L 2 The final term x{L is negligible since k ď log2 x implies that the first term on the right is " x{ log x. This concludes the proof when k ď log2 x. SIEVE METHODS LECTURE NOTES, SPRING 2020 63

2 p`a Now assume k ą log2 x. Here we do not separately consider the case q | s q and do not use (6.1). We must then retain both cases ωprq “ k ´ 1 and ωprq “ k. Arguing as before, we obtain from Theorem 2.5 and Lemma 6.1 the estimate p`a x #t2 ` |a| ă p ď x : ωp q “ ku !a s φ r log2 x a r rP Y p q pp ` q{ q Rkÿ´1 Rk k´1 k x plog2 x ` Op1qq plog2 x ` Op1qq !a ` log2 x pk ´ 1q! k! ˆ ˙ x plog x ` Op1qqk´1 plog x ` Op1qq “ 2 1 ` 2 log2 x pk ´ 1q! k ˆ ˙ Recalling that k ě log2 x, this concludes the proof.  6.2. Large prime factors of shifted primes. It is conjectured that P `pp ` aq has a distribution roughly the same as the distribution of P `pnq over all integers n ď x. We are far from proving this, in fact the following is not known: Conjecture 6.3. For any 0 ă u ă 1, there are infinitely many primes p with P `pp ` aq ă pu and infinitely many primes p with P `pp ` aq ą pu. The second assertion measures progress toward a special case of the Prime k´tuples conjecture 1.3. p`a Letting s “ 1 for even a and s “ 2 for odd a, it’s conjectured that infinitely often, s is prime. At present, it is know that P `pp ` aq ă p0.2961 infinitely often and P `pp ` aq ě p0.677 infinitely often. The first result in this direction is due to Erdos.˝ Theorem 6.4 (Erdos˝ [31], 1935). For some u ă 1 there are infinitely many primes p with P `pp ` aq ă pu.

Definition 4. Let µ1 denote the infimum of all real numbers µ such that for all a ‰ 0, #tp ď x : P `pp ` aq ď xµu ą x1´op1q.

Upper bounds on µ1 have been given in a series of papers, see Table 2.

Upper bound on µ1 Author year ? 2 2 ´ 2 “ 0.82842 ... Wooldridge [133] 1979 625 512e “ 0.44907 ... Pomerance [110] 1980 1 ´1{2.73 2 e “ 0.34664 ... Balog [4] 1984 1 ´1{2 2 e “ 0.30326 ... Friedlander [54] 1989 0.2961 Baker and Harman [7] 1998 TABLE 2. Progression of results on smooth shifted primes

Here, we present an argument due to Balog which gives quantitatively better constants. The main input is a hypothesis known as the Brun-Titmarsch on average hypothesis. Here N “ Npxq is some function of x. Hypothesis BTpx, N, ´a; λq. For all but opNq moduli n P pN, 2Ns (as N Ñ 8), we have x (6.2) πpx; n, ´aq ď λ . φpnq log x 64 KEVIN FORD

By Theorem 3.2, for any ε ą 0, any 1 ă N ă x with x sufficiently large (depending on ε), and any a, we log x have (6.2) with λ “ p2 ` εq logpx{Nq . The first result showing Hypothesis BTpx, N, ´a; λq with a value of λ smaller than that achievable pointwise (that is, for all n, a) is due to Hooley [83], with further improvements due to Hooley [85], Fouvry [53], Bombieri, Friedlander and Iwaniec [14] and Baker and Harman [6, 7]. Theorem 6.5 (Balog [4], 1984). Let x be large, M “ xξ ě x1{2 logA x, where A is a large enough constant. Assume that λ ě 1 and Hypothesis BTpx, N; λq holds for all M ă N ď M log x. Then for any u satisfying 1 (6.3) ξ ą u ą e´1ξλp1 ´ ξq 1`λ , 5 ` u there are "u x{ log x primes p ď x so that P `pp ` aq ă x . ˘ Take ξ ą 1{2, then BTpx, xξ; a, 4 ` εq holds, where ε Ñ 0 as ξ Ñ 1{2 and x Ñ 8. We conclude that 1 ´1{5 5 ` Corollary 6.6. For any u ą 2 e “ 0.409365 ..., there are "u x{ log x primes p ď x with P pp`aq ă xu. Bombieri, Friedlander and Iwaniec [14] showed that Hypothesis BTpx, x1{2 logA x, a; 1 ` εq holds for all 1 ´1{2 A ą 0 and all ε ą 0, if x is sufficiently large. It follows that (6.3) holds for all u ą 2 e “ 0.303 ..., giving Friedlander’s result [54]. Proof of Theorem 6.5. Let y “ xu, and for |a| ă p ď x let gppq “ #tpm, nq : p ` a “ mn, P `pmnq ď y, M ă n ď M log xu. By Cauchy-Schwarz (see §2.2.4) we have 2 p x gppq ` ď (6.4) #tp ď x : P pp ` aq ď yu ě 2 . ´řpďx gppq¯ We bound the denominator crudely as ř (6.5) gppq2 ď p#tm|p ` auq2 ď τpnq2 ! x log3 x. pďx pďx nďx`a ÿ ÿ ÿ Evidently,

gppq ě #tpm, nq : p ` a “ mn, P `pmq ď y, M ă n ď M log xu ´ #tpm, nq : p ` a “ mn, M ă n ď M log x, P `pnq ą yu, where we have ignored the condition P `pmq ď y in the subtracted term. Thus

(6.6) gppq ě S1 ´ S2, pďx ÿ x`a where, ignoring the terms with m ď M log x , which are negligible,

S1 ě πpx; m, ´aq ´ πpMm ´ a; m, ´aq P `pmqďy x`a ÿ x`a M log x ămď M and, writing n “ q` with q “ P `pnq,

S2 “ πpx; `q, ´aq. yăqďM log x M{qă`ďpM log xq{q ÿ P `ÿp`qďq SIEVE METHODS LECTURE NOTES, SPRING 2020 65

x`a 1{2 ´A Since M ! x plog xq , we use the Bombieri-Vinogradov theorem for S1, obtaining x ´ Mm x S1 ě ` O φpmq log x log x P `pmqďy ˆ ˙ x`a ÿ x`a M log x ămď M x 1 x ě ` O log x φpmq log x P `pmqďy ˆ ˙ x`a ÿ x`a M log x ămď M using the elementary bound m “ Opzq. φ m mďz p q ÿ We will also need the asymptotic 1 (6.7) “ C log z ` Op1q φ m 1 mďz p q ÿ ` 1 ` for some constant C1 ą 0. If P pmq ą y write m “ qm where q “ P pmq. Then 1 1 1 1 ě ´ . φpmq φpmq q ´ 1 φpm1q P ` m y x`a x`a x`a x`a 1 x`a p qď M log x ămď M yăqď M Mq log x ăm ď Mq x`a ÿ x`a ÿ ÿ ÿ M log x ămď M

2 plog2 xq The contribution from primes q ą x{pM log xq is ! log x by Mertens’ theorem and (6.7). For y ă q ď 1 x{pM log xq we use (6.7) again and see that the sum on m is C1 log2 x ` Op1q. Therefore, x logpx{Mq S ě pC log xq 1 ´ log ` op1q 1 log x 1 2 log y (6.8) ˆ ˙ x 1 ´ ξ “ pC log xq 1 ´ log ` op1q . log x 1 2 u ˆ ˙ Now we bound S2 from above. The terms corresponding to M ă q ď M log x contribute, by the Brun-Titchmarsh inequality, x 1 1 xplog xq2 ! ! 2 . log x q φp`q log2 x MăqďM log x M q ` M log x q ÿ { ă ďpÿ q{ x Let E denote the set of n P pM,M log xs such that πpx; n, ´aq ą λ φpnq log x . By our hypothesis (6.2) and the Brun-Titchmarsh inequality, x 1 x log x πpx; n, ´aq ! “ o 2 . log x φpnq log x nPE nPE ÿ ÿ ˆ ˙ Using (6.7) gain, the terms with q ď M and q` R E contribute λx 1 ď log x φpq`q yăqďM M{qă`ďpM log xq{q ÿ q`ÿRE x ď pλ logpξ{uq ` op1qq pC log xq . log x 1 2 66 KEVIN FORD

Therefore, x (6.9) S ď pλ logpξ{uq ` op1qq pC log xq . 2 log x 1 2 Combining (6.8) and (6.9), we conclude that x 1 ´ ξ ξ gppq ě pC log xq 1 ´ log ´ λ log ` op1q log x 1 2 u u pďx ÿ ˆ ˙ as x Ñ 8. The hypothesis (6.3) implies that 1 ´ ξ ξ 1 ´ log ´ λ log ą 0. u u

Inserting the lower bound for pďx gppq into (6.4) and recalling (6.5), the proof is complete.  ř Now we turn to the problem of showing that P `pp ` aq is often large.

Definition 5. Let µ2 denote the supremum of all real numbers µ such that for any a ‰ 0 x #tp ď x : P `pp ` aq ą xµu " µ log x

The progression of records for the lower bound on µ2 is given in Table 3.

Lower bound on µ2 Author year 1 ´1{4 1 ´ 2 e “ 0.6105 ... Goldfeld [58] 1969 1 ´1{4 1 ´ 2 e “ 0.6105 ... Motohashi [101] 1970 1 3 ´1{12 2 ` 2 p1 ´ e q “ 0.61993 ... Hooley [83] 1972 5{8 “ 0.625 Hooley [84] 1973 0.6683 Fouvry [53] 4 1985 0.676 Baker and Harman [6] 1996 0.677 Baker and Harman [7] 1998 TABLE 3. Progression of results on large prime factors of shifted primes

Here we show the theorem proved independently by Goldfeld and Motohashi. We will then indicate where in the proof the further improvements come from. 1 ´1{4 Theorem 6.7. We have µ2 ě 1 ´ 2 e . Proof. We use a device due to Chebyshev, in connection with the largest prime factor of polynomials. Let 1 ´1{4 1{2 ă θ ă 1 ´ 2 e and define M “ log pp ` aq. a p x | |ăźď Let B be the exponent in the Bombieri-Vinogradov Theorem (Theorem 2.17) corresponding to A “ 2, and let Q “ x1{2plog xq´B. Let P denote the set of primes |a| ă p ď x so that there is a prime power qb ą Q with b ě 2 and qb|pp ` aq. Define exponents αpqq by the prime factorization pp ` aq “ qαpqq. |a|ăpďx qďx`a pźRP ź SIEVE METHODS LECTURE NOTES, SPRING 2020 67

Then M “ M1 ` M2 ` M3 ` M4, where

M1 “ log pp ` aq, pP źP αpqq M2 “ log q . qďQ ź αpqq M3 “ log q , θ Qăźqďx αpqq M4 “ log q . θ x ăźqďx`a Our goal is to prove that M4 " x. We accomplish this by first observing that (6.10) M „ x by the Prime Number Theorem, and then upper bounding M1,M2,M3. For M1, if p P P then p ` a is divisible by d2 for some d ą Q1{3. Hence x M ! plog xq ! x6{7. 1 d2 1{3 dąÿQ We handle M2 with the Bombieri-Vinogradov Theorem. Letting Epx; s, cq “ πpx; s, cq ´ lipxq{φpsq we have b M2 “ plog qqπpx; q , ´aq b qÿďQ lipxq “ plog qq ` Epx; qb, ´aq φpqbq qbďQ ˆ ˙ ÿ x „ lipxq log Q „ . 2 We cannot evaluate M3 asymptotically, but a good upper bound will suffice. The most crude method is to use the Brun-Titchmarsh inequality, Theorem 3.2 with explicit constant. This gives

M3 “ plog qqπpx; q, ´aq θ Qăÿqďx x log q ď p2 ` op1qq θ pq ´ 1q logpx{qq Qăÿqďx θ x dt “ p2 ` op1qqx t logpx{tq żQ 1 „ 2 log x. 2 ´ 2θ ´ ¯ Combining the estimates for M1,M2 and M3, we find that 1 1 M1 ` M2 ` M3 ď p1 ` op1qq ` 2 log x. 2 2 ´ 2θ ˆ ˙ 68 KEVIN FORD

Recalling the bound on θ, and comparing this with (6.10), we find that M4 "θ x. As each number p ` a is divisible by at most one prime ą xθ we see that

M4 x #tp ď x : P `pp ` aq ą xθu ě " , logpx ` aq θ log x as desired. 

Remarks. Most improvements to Theorem 6.7 come from better estimates of M3 using Hypothesis BTpx, N, a; λq (an exception is the work of Hooley [84], which makes use of a Selberg-type sieve). These in turn rely on a variety of tools, from complicated sieves to bounds on Kloosterman sums. The bound µ2 ą 2{3 of Fouvry enabled Adleman and Heath-Brown [1] to deduce that the first case of Fermat’s Last Theorem is true for infinitely many primes p; this is now a historical point in light of Wiles’s proof 10 years later. The bound on µ2 also played an important role in the original AKS polynomial-time algorithm [2] for determining the primality of numbers.

6.3. Application to Carmichael numbers. A composite number n is a if for all pa, nq “ 1, an´1 ” 1 pmod nq. Such a number mimics a prime w.r.t. the Fermat congruence. An old criteria of Korselt says that n is a Carmichael number if and only if n is squarefree and pp ´ 1q|pn ´ 1q for every prime p|n. The smallest Carmichael numbers are 561, 1105 and 1729. One way to construct Carmichael numbers is to observe that if k P N, and 6k ` 1, 12k ` 1 and 18k ` 1 are all prime, then n “ p6k ` 1qp12k ` 1qp18k ` 1q is a Carmichael number. By the Prime k-tuples conjecture (Conjecture 1.3), there are C x such numbers k x. „ log3 x ď Alford, Granville and Pomerance showed unconditionally in 1994 [3] that there are infinitely many Carmichael numbers. Moreover, they showed a lower bound Cpxq " x2{7 for the counting function Cpxq of Carmichael numbers. A key ingredient is finding many smooth shifted primes p ´ 1. In fact, Alford, Granville and Pomerance proved that 5 p1´µ q´op1q Cpxq " x 12 1 . 5 With Baker and Harman’s [7] value µ1 ď 0.2961, we get an exponent of 0.29329 .... The 12 fraction comes from lower bounds for prime in progressions to “virtually all” moduli. Harman [75, 77] improved the exponent, showing Cpxq " x0.4736p1´µ1q´op1q, where now the exponent is a bit larger than 1{3.

6.4. Applications to Euler’s function and the sum of divisors function.

6.4.1. Popular values of Euler’s function. Let Apmq “ #tm : φpmq “ nu. Erdos˝ [31] showed that there is a constant c ą 0 such that Apmq ą mc infinitely often. A key ingredient in the proof is Theorem 6.4. The argument was sharpened by Pomerance [110], to connect c with the exponent in Theorem 6.4.

Theorem 6.8 (Erdos;˝ Pomerance). For every ε ą 0 there are infinitely many n such that Apnq ą n1´µ1´ε.

Currently, the best bound we know is µ1 ď 0.2961 due to Baker and Harman [7], while it is conjectured that µ1 “ 0. The conclusion then would be best possible since trivially

Apmq ď #tn : φpnq ď mu — m log2 m. SIEVE METHODS LECTURE NOTES, SPRING 2020 69

Proof. Fix µ1 ă ν ă 1 and let z be large. Let P “ tp ď plog zq1{ν : P `pp ´ 1q ď log zu. By hypothesis, #P ě plog zq1{ν´op1q as z Ñ 8. Let ν log z M “ , log log z Z ^ and let N denote the set of all integers which are the product of M distinct primes from P. Note that for all n P N , φpnq ď n ď z and P `pφpnqq ď log z. Hence, there is an m P tφpnq : n P N u such that #N Apmq ě Ψpz, log zq By Theorem 4.1 ( inequality (4.1)), Ψpz, log zq “ zop1q. Also, as z Ñ 8, we have

M M #P #P plog zqp1´op1qq{ν #N “ ě ě M M M ˆ ˙ ˆ ˙ ˜ ¸ 1 ´1´op1q ¨ ν log z ´1 ě plog zq ν log2 z “ z1´ν´o“p1q. ‰ “ ‰

1´ν´op1q Hence there is an m ď z with Apmq ě z . Taking ν arbitrarily close to µ1, the theorem follows.  6.4.2. The range of Euler’s function. Let

V “ tφpnq : n P Nu “ t1, 2, 4, 6, 8, 10, 12, 16, 18, 20, 22, 24, 28,...u denote the range of Euler’s totient function φpnq, and let V pxq “ #tm P V : m ď xu be its counting function. Evidently V contains only one odd number, namely 1, but what can we say about the growth of V pxq? Since φppq “ p ´ 1 for all primes p, trivially x V pxq ě πpxq „ . log x Pillai [105] gave the first non-trivial upper bound on V pxq, namely x V pxq ! . plog xqplog 2q{e Using sieve methods, Erdos˝ [31] improved this to x V pxq “ px Ñ 8q. plog xq1´op1q Upper and lower bounds for V pxq were sharpened in a series of papers by Erdos˝ [34], Erdos˝ and Hall [40, 41], Pomerance [111], Maier and Pomerance [95], and finally by Ford [45]. The exact order of V pxq is now known [45, Theorem 1], namely x V pxq “ exptCplog x ´ log xq2 ` D log x ´ pD ` 1{2 ´ 2Cq log x ` Op1qu, log x 3 4 3 4 where C “ 0.81781464640083632231 ... and D “ 2.17696874355941032173 ... are specific constants defined in [45]. Sieve methods played a crucial role in these investigations. Below we use the results about the normal behavior of ωpnq and ωpp ` aq to provide nontrivial upper and lower boudns for V pxq. 70 KEVIN FORD

Theorem 6.9. We have x log x V pxq " 2 . log x ? Proof. Let y “ expt log xu and let B “ tpq : q ď y ă p ď x{q, p and q primeu. Evidently φpmq ď x for m P B. Our goal is to show that there is little overlap among the numbers φpmq. By simple inclusion-exclusion,

(6.11) V pxq ě |B| ´ Z,Z :“ #tm1, m2 P B : m1 ‰ m2, φpm1q “ φpm2qu. By Mertens, x x log x |B| “ πpx{qq ´ πpyq " " 2 . q log x log x qďy qďy ÿ ÿ Also, Z is the number of solutions of pp ´ 1qpq ´ 1q “ pp1 ´ 1qpq1 ´ 1q pp ‰ p1, pq P B, p1q1 P Bq. Fix q and q1, and write q ´ 1 q1 ´ 1 g “ pq ´ 1, q1 ´ 1q, r “ , s “ . g g Then the above equation reduces to pp ´ 1qr “ pp1 ´ 1qs, where pr, sq “ 1. Thus, for some n ď x{pqsq we have p “ 1 ` rn and p1 “ 1 ` sn. Apply Theorem 2.5 with the pair of linear forms rn ` 1, sn ` 1. Here E “ rs|r ´ s| ! x3. Hence x{pqsq #tn ď x{pqsq : nr ` 1, ns ` 1 both primeu ! plog xq2 log2px{pqsqq 2 xplog xq2 g ! 2 log2 x qq1 We now sum over q, q1 using Exercise 2.12. This gives pq ´ 1, q1 ´ 1q 1 2 ď g qq1 q q,q1ďy gďy{2 ˆ qďy ˙ qÿ‰q1 ÿ q”1 ÿpmod gq g ! plog xq2 2 φpgq2 g y 2 ďÿ{ p 1 ď plog xq2 1 ` ` O 2 pp ´ 1q2 p2 p y 2 ďź{ ˆ ˆ ˙˙ 2 ! plog2 xq log x. It follows that a xplog xq4 Z ! 2 . plog xq3{2 Combined with (6.11), this completes the proof.  SIEVE METHODS LECTURE NOTES, SPRING 2020 71

Theorem 6.10. We have x V pxq ! exp 33plog xq2 . log x 3 Proof. Let ( ε “ 0.001, δ “ Qp1 ´ εq ě ε2{3. Let

S “ tp : ωpp ´ 1q ď p1 ´ εq log2 pu and let Spxq be the counting function of S. By Theorem 6.2, and Lemma 5.3,

Spxq ď #tp ď x : ωpp ´ 1q ď p1 ´ εq log2 xu x plog x ` Op1qqk´1 ! 2 log2 x pk ´ 1q! k 1 ε log x ďp ´ÿq 2 (6.12) x plog xqk´1 ! 2 log2 x pk ´ 1q! kďp1´εq log2 x x ÿ ! . plog xq1`δ Also define log y W pxq “ max V pyq. yďx y log y Although y V pyq may not be monotone, W pxq is and this will be convenient in the proof. Let x be large. Then there is a y ď x with log y W pxq “ V pyq. y By Theorem 6.9, W pxq Ñ 8 as x Ñ 8 and hence y Ñ 8 as x Ñ 8. We now bound V pyq. Let plog yqθ θ “ 0.97, y “ exp . 1 3 log y " 2 * Associate to each v P V with v ď y a preimage n, that is, φpnq “ v. We have n ! y log2 y by a classical estimate. We divide these v into four classes:

(a) V1 “ tv :Ωpvq ě 2.9 log2 y or Ωpnq ě 2.9 log2 yu; 2 (b) V2 “ tv : p |n for some p ą y1u; (c) V3 “ tv R V1 Y V2 : p|n for some p ą y1, p P Su; (d) V4 “ V X r1, xszpV1 Y V2 Y V3q (the remaining v). Theorem 5.7 (c) implies immediately that 2 yplog2 yq y (6.13) |V1| ! ! . plog yq2.9 log 2´1 plog yq1.01 Trivially, y log y y (6.14) |V | ! 2 ! . 2 p2 log y 100 pąy p q ÿ1 72 KEVIN FORD

Now suppose that v P V3. Then p|n for some p P S, p ą y1. Since v R V2, v “ pp ´ 1qφpn{pq “ pp ´ 1qw y for some w P V , w ď p´1 . Thus, y 1 |V3| ď V ! Spyq `W pyqy . p ´ 1 p logpy{pq y1ăpďy y ăpďy{2 ˆ ˙ p y 2 1 pÿPS ą { pÿPS loomoon A standard partial summation argument, together with (6.12), yields 1 Spyq y{2 Sptq ! ` 2 dt p logpy{pq y y1 t logpy{tq y1ăpďy{2 ż pÿPS 1 1 y{2 dt ! ` plog yq1`δ plog y qδ tplog tq logpy{tq 1 ży1 plog yq2 ! 2 . plog yq1`δθ Therefore, by the monotonicity of W pq and (6.12), 2 plog2 yq yW pxq (6.15) |V3| ! W pyq ! . yplog yq1`δθ plog yq1`δθ{2

Finally, suppose that v P V4. Let 3 log2 y θ y2 “ y1 “ exptplog yq u. We claim that

1 v “ w, v “ pp ´ 1qw or v “ pp ´ 1qpp ´ 1qw pw P V , w ď y2q,

1 where p, p are primes ą y1. Since v R V3, any prime factor of n which is ą y1 is not in S. This implies that n has at most two prime factors which are ą y1. If n has three or more such factors, then none of them is in S and thus

Ωpvq ě 3p1 ´ εq log2 y1 ą 3p1 ´ εqpθ ´ op1qq log2 y ą 2.9 log2 y, contradicting that v R V1. Thus, n “ qm, where q is 1, a prime ą y1 or the product of two primes ą y1, ` Ωpmq Ωpnq and P pmq ď y1. But then m ď y1 ď y1 ď y2 since v R V1 and φpnq “ φpqqφpmq. This proves the claim with w “ φpmq. Thus, y y |V4| ď V py2q ` V min y2, ` V min y2, . p ´ 1 pp ´ 1qpp1 ´ 1q p´1ďy p 1 p1 1 y ÿ ˆ ˆ ˙˙ p ´ qpÿ´ qď ˆ ˆ ˙˙ t t 1 For t ď y2, V ptq “ log t W ptq ď log t W py2q. again separating out the terms with p ą y{2 or with pp ą y{2 we find that y y y |V4| ! W py2q ` ` log y p logpy{pq pp1 logpy{pp1q p y 2 pp1 y 2 „ ďÿ{ ÿď {  yplog yq2 ! W py q 2 . 2 log y SIEVE METHODS LECTURE NOTES, SPRING 2020 73

Combining this with (6.13), (6.14) and (6.15) gives

1 W pxq 2 W pxq ! ` ` W py2qplog yq . plog yq0.01 plog yqδθ{2 2 Again, using the monotonicity of W pq, θ W py2q ď W exptplog xq u . Also recall that W pxq Ñ 8 as x Ñ 8, and we obtain` ˘ 2 θ W pxq ď Kplog2 xq W exptplog xq u for some absolute constant K ą 0. Iterating this expression´ yields ¯ k kpk´1q 2k θk W pxq ď K θ plog2 xq W exptplog xq u k ´ ¯ provided that plog xqθ " 1. Taking log x k “ 3 ´ log θ Z ^ produces 2 2 W pxq ď exptp´1{ logpθqqplog3 xq ` Oplog3 xqu ! expt33plog2 xq u. This completes the proof.  6.5. Exercises.

1 ` α Exercise 6.1. Show that for every α ă 2 , a positive proportion of primes p satisfy both P pp ´ 1q ą p and P `pp ` 1q ą pα. 2 Exercise 6.2. Improve the upper estimate (6.5) for pďx gppq . Exercise 6.3 (Ford, 1995 - see [45]). (a) Suppose thanř Apmq “ k. Also suppose that p ą 2m ` 1 is a prime such that (i) 2p ` 1 and 2mp ` 1 are both prime; (ii) dp ` 1 is composite for all d|2m except for d “ 2, d “ 2m. Show that Ap2mpq “ k ` 2. (b) Assume the Prime k-tuples conjecture, Conjecture 1.3. Show that a prime p satisfying the above conditions always exists. Conclude that for any k ě 2 that there is a number m with Apmq “ k. [This is a conjecture of Sierpinski´ (see [116] and [37]), which was proved for even k by Ford and Konyagin [52] and for odd k by Ford [46].] Exercise 6.4. Carmichael [20, 21] conjectured that Apmq “ 1 is impossible. Assume that Apmq “ 1 and φpnq “ m. 2 (a) (Carmichael-Klee) Show that if d p|d p|n and q “ 1 ` d is prime, then q |n. (b) Show that 223272432|n. ś (c) Show that either 132|n or 192|n. Hint: consider the two cases 32}n and 33|n. 74 KEVIN FORD

7. SMALLGAPSBETWEENPRIMES 7.1. Introduction. Prior to 2005, there were only weak results know about small gaps between primes. Let pn denote the n-th prime, and set

pn 1 ´ pn ∆ “ lim inf ` . nÑ8 log n The Prime Number Theorem implies ∆ ď 1. Prior to 2005, it was not known that ∆ “ 0, which is itself a very weak bound in the direction of the Twin Prime Conjecture. Here we summarize the major events: ‚ Hardy-Littlewood, 1926 [73] (unpublished): ∆ ď 2{3 assuming the Extended Riemann Hypothesis for Dirichlet L-functions.

‚ Erdos,˝ 1940 [33]: ∆ ă 1 unconditionally. ? 2` 3 ‚ Bombieri and Davenport, 1966 [13]: ∆ ď 8 “ 0.466 ... ‚ Maier, 1988 [94]: ∆ ď 0.248. We begin by showing Erdos’˝ argument from 1940, which incorporated a basic sieve bound.

Theorem 7.1. Suppose that, uniformly for all even h ď 2 log x we have

x{2 (7.1) #tx{2 ă n ď x : n and n ` h are both primeu ď pB ` op1qqCh log2 x where p ´ 1 1 C “ C ,C “ 2 1 ´ . h p ´ 2 pp ´ 1q2 p|h pą2 ˆ ˙ pźą2 ź

1 Then ∆ ď 1 ´ 2B .

Basic upper bound sieves, such as Theorem 2.5, show that (7.1) holds for some finite B, while Theorem 3.5 implies that B “ 4 is admissible.

Proof. The basic idea is that the Prime Number Theorem implies that the average gap between primes up to x is „ log x, but (7.1) implies that there are not many gaps that are extremely close to log x. Let x be large and let pn`1, . . . , pn`m`1 be the primes in px{2, xs. Put dj “ pj`1 ´ pj for all j. Fix 1 1 3B ă ε ă 2B and let I “ p1 ´ εq log x, p1 ` εq log x .

Assume that dj ą p1 ´ εq log x for all n `“ 1 ď j ď n ` m. For each‰ even k P I, let

Nk “ #tn ` 1 ď j ď n ` m : dj “ ku, so that by (7.1), we have

x{2 (7.2) Nk ď pB ` op1qqCk . log2 x SIEVE METHODS LECTURE NOTES, SPRING 2020 75

Now x n`m ě d “ kN 2 j k j“n`1 k 1 ε log x ÿ ąp ´ÿq

ě kNk ` p1 ` εq log x m ´ Nk kPI kPI ÿ ˆ ÿ ˙ “ p1 ` εqm log x ´ Nk pp1 ` εq log x ´ kq . kPI ÿ x{2 The Prime Number Theorem gives m „ log x . Hence, by (7.2), x 1 ` ε pB{2 ` op1qqx (7.3) ě ` op1q x ´ Ck pp1 ` εq log x ´ kq . 2 2 log2 x kPI ˆ ˙ ÿ We claim that

2 (7.4) Ck “ y ` Oplog yq. kďy ÿ Assuming the claim, partial summation gives

2 kCk „ 2ε log x, kPI ÿ and we conclude from (7.3) that ε ε 0 ě ´ pB{2q 2εp1 ` εq ´ 2ε ` op1q “ ´ Bε2 ` op1q. 2 2 1 ` ˘ This is a contradiction if ε ă 2B , and proves the theorem. Now we prove the claim (7.4). Write Ck “ C d|k gpdq, where g is multiplicative, supported on square- free integers, gp2q “ 0 and gppq “ 1 for primes p ą 2. Thus, p´2 ř 1 d 2 plog dq2 log d gpdq ! ! 2 ! . d φpdq d d ˆ ˙ We then compute y C “ C gpdq 1 “ C gpdq k 2d kďy dďy kďy dďy ÿ dÿodd p2ÿdq|k dÿodd Y ] Cy gpdq gpdq “ ` O y ` gpdq 2 d d d dąy dďy ÿ ˆ ÿ ÿ ˙ Cy gppq “ 1 ` ` Oplog2 yq 2 p pą2 ź ˆ ˙ “ y ` Oplog2 yq, which proves (7.4).  76 KEVIN FORD

7.2. Improved gap detectors: GPY-Zhang-Maynard-Tao. In 2005 (the paper appeared in 2009), Gold- ston, Pintz and Yıldırım[59] showed that ∆ “ 0 using a new type of prime detector. Let ph1, . . . , hkq be an admissible k-tuple of non-negative integers; that is, the set of linear forms pn`h1, . . . , n`hkq is admissible in the sense of Definition 1. For some non-negative “weight function” wpnq, consider k 1 (7.5) S “ n`hj prime ´ 1 wpnq. Nănď2N j“1 ÿ ˆ ÿ ˙ If S ą 0 then there is an n P pN, 2Ns such that at least two of the forms n ` hj are simultaneously prime. The object is to choose wpnq so that

(a) wpnq is small when there are few primes among the n ` hj (b) wpnq is large when n ` hj is prime ( or nearly prime) for many j;

(c) We can find a good upper bound for Nănď2N wpnq and, for every j, a good lower bound for the sum wpnq1n h . Nănď2N ` j prime ř A naive choiceř is 1 wpnq “ n`hj prime @j. This satisfies (a) and (b) but not (c), because we need something like the Hardy-Littlewood conjectures (Con- jecture 1.3) to get the required lower bounds. Motivated by Selberg’s sieve, Goldston, Pintz and Yıldırım make the choice 2 logpz{dq k`` wpnq “ λ , λ “ µpdq , ` ě 0. d d log z d n h n h ˆ |p ` 1ÿq¨¨¨p ` kq ˙ ˆ ˙ Elaborating on the ideas in [59], they proved in [60] that p ´ p lim inf n`1 n . ? 2 ă 8 nÑ8 log nplog2 nq More interestingly, they showed that any exponent improvement in the Bombieri-Vinogradov Theorem would imply that bounded gaps exist infinitely often. More precisely,

1 Theorem 7.2 (Goldston-Pintz-Yıldırım, 2007). Assume that for some θ ą 2 we have lipyq x (7.6) EHpθq : @A ą 0, max max πpy; q, aq ´ !A A . pa,qq“1 yďx φpqq log x qďxθ ˇ ˇ ÿ ˇ ˇ ˇ ˇ Then there is a constant Cpθq such that pn`1 ´ pn ď Cˇpθq infinitely often.ˇ In particular, Cp0.971q “ 16. Unconditionally, the Bombieri-Vinogradov Theorem (Theorem 2.17) implies EHpθq for all θ ă 1{2, while Elliott and Halberstam [30] conjectured EHpθq for all θ ă 1.

Conjecture 7.3 (Elliott-Halberstam Conjecture). We have EHpθq for every θ ă 1. Motohashi and Pintz [102] showed in fact that the bounded gaps conclusion would follow from a version of (7.6) restricted to smooth moduli up to xθ, where θ ą 1{2, that is moduli with P `pqq ď xδ. [135] then surprised the world in May, 2013 by supplying such a proof of the modified version of (7.6).

Theorem 7.4 (Yitang Zhang, 2013 [135]). For infinitely many n, pn`1 ´ pn ď 70000000. SIEVE METHODS LECTURE NOTES, SPRING 2020 77

A large on-line collaborative Polymath project [108] refined Zhang’s ideas in the summer of 2013 and subsequently reduced the bound to about 4600. Then, in October, 2013, James Maynard [97] introduced a better weight function wpnq, which reduced the bound further to 600 and furthermore showed that bounded gaps could contain arbitrarily many primes. Around the same time, Terence Tao (unpublished) had a similar idea for improving the weitgh function.

2 4m Theorem 7.5 (Maynard-Tao). For any m there is a number Cm ! m e such that pn`m ´ pn ď Cm 2 2m infinitely often. Assuming the Elliott-Halberstam Conjecture, we have C2 ď 12 and Cm ! m e .

A second Polymath project [109] resulted in further numerical improvements, culminating in the bound pn`1 ´ pn ď 246 infinitely often. This is the current world record.

7.3. Bounded gaps between primes. We now prepare the ground for the proof of Theorem 7.5. The method is robust enough to handle general linear forms (not only those of type n ` hi), and moreover the bounds can be made uniform in the coefficients of the forms, as in [98], with little additional effort.

Theorem 7.6. For every m P N there is a number Km such that the following holds. Fix k P N with k ě Km. Uniformly over all N ě 100 and every admissible set pa1n ` b1, . . . , akn ` bkq of linear forms, 100 100 with 1 ď ai ď plog Nq and ´aiN{2 ď bi ď Nplog Nq for all i, we have

k N # N ă n ď 2N : 1a n`b prime ě m ě i i plog Nqck j“1 " ÿ * for some constant ck depending only on k. Moreover, we have 4m (a) Km ! me for all m ě 2. 2m (b) Assuming the Elliott-Halberstam Conjecture, we have Km ! me .

5 The PolyMath8b project [109] implies that K2 “ 50 is admissible. Also, Maynard [97] showed K2 “ 5 is admissible assuming the Elliott-Halberstam conjecture.

Proof of Theorem 7.5 from Theorem 7.6. Let k “ Km. Fix h1 ă ... ă hk so that n ` h1, . . . , n ` hk is an admissible set of linear forms (we say that the tuple ph1, . . . , hkq is admissible). Apply Theorem 7.6, we see that

lim inf pn`m´1 ´ pn ď hk ´ h1. nÑ8

When m “ 2, there is an admissble tuple with h50 ´ h1 “ 246, proved in [109]. For general m, let h1, . . . , hk be the k smallest primes greater than k. Then n ` h1, . . . , n ` hk is clearly admissible, and by the Prime Number Theorem,

2 4m hk ´ h1 „ k log k “ Km log Km ! m e .

2 2m Assuming the Elliott-Halberstam Conjecture, the above calculation yields Cm ! m e . When m “ 2, we may take k “ 5, and we apply Theorem 7.6 with the 5-tuple p0, 2, 6, 8, 12q. 

5 The theorems in [109] are stated only in the case ai “ 1 and bi fixed, however it is clear from the proof that the same quantitative bounds hold in the range of uniformity of Theorem 7.6. The relevant parts of [109] to be adjusted are Theorems 19 (i), 20 (i) and 26. 78 KEVIN FORD

We now describe the prime-detector which we will use to prove Theorem 7.6. Let N ě 100, assume EHpθq for some θ P r1{3, 1q, and define

θ ´ 1 1{s 1{s 1{s2 (7.7) s “ log2 N,R “ N 2 s ,D “ N , z “ D “ N . For each k P N we will construct a special sequence λpdq (which depends only on N and k) for d “ k pd1, . . . , dkq P N , which is supported on the set k 2 ´ (7.8) D “ DpNq :“ td P N : d1 ¨ ¨ ¨ dk ď R, µ pd1 ¨ ¨ ¨ dkq “ 1,P pd1 ¨ ¨ ¨ dkq ą zu.

We will frequently use the fact that D is divisor-closed, that is, if d P D and rj|dj for all j then r P D. Let µ` denote an upper bound sieve which is guaranteed by Theorem 2.19 (with respect to the parameters z, D). In particular we have ` (7.9) |µ ptq| ď 1 pt P Nq.

Now let pa1n ` b1, . . . , akn ` bkq be an arbitrary admissible set of linear forms (in particular, ai ‰ 0 and pai, biq “ 1 for all i), with respect to Definition 1. Let k k (7.10) E “ Epa, bq “ ai paibj ´ ajbiq, E “ E pa, bq “ d P N : pd1 ¨ ¨ ¨ dk,Eq “ 1 . i“1 iăj ź ź ! ) Let

ρpdq “ #tn mod d : pa1n ` b1q ¨ ¨ ¨ pakn ` bkq ” 0 pmod dqu, and note that ρppq ă p for all p (because the set of forms is admissible) and ρppq “ k for all p - E; see Theorem 2.5. Let ρppq (7.11) V “ 1 ´ . p pďz ź ˆ ˙ Finally, motivated by Selberg’s sieve and using an idea from Koukoulopulos [92, Ch. 28], let 2 (7.12) wpnq “ µ`ptq λpdq .

ˆ t|pa1n`b1q¨¨¨pakn`bkq ˙ˆ dPDXE ˙ ÿ @j:djÿ|aj n`bj By Theorem 2.19, wpnq ě 0 for all n. The first factor is a familiar upper bound sieve that we used in Theorem 2.5, for example, and very efficiently sieves out those n for which some ain`bi has a prime factor ď z. The second factor is the new ingredient, a kind of k-dimensional version of the Selberg method. We will optimize λpdq later, and at this point only impose the normalizing condition (7.13) |λpdq| ď 1 pd P Dq.

The purpose of imposing d P E is to ensure that d1, . . . , dk are pairwise relatively prime.

Lemma 7.7. Suppose that mj|ajn ` bj for every j and m P E . Then m1, . . . , mk are pairwise relative prime, and pmj, ajq “ 1 for all j.

Proof. If p|mi and p|mj then p divides aipajn ` bjq ´ ajpain ` biq “ aiaj ´ ajai, and so p|E. This proves the first claim. Since pa1n ` b1, . . . , akn ` bkq is an admissible set, paj, bjq “ 1 for all j. Hence, if p is prime, p|mj|pajn ` bjq and p|aj then p|bj, a contradiction. Thus, paj, mjq “ 1.  SIEVE METHODS LECTURE NOTES, SPRING 2020 79

Notational Convention. Throughout the remainder of this section, constants implied by O and ! sym- bols may depend on k and θ, but not on any other parameter. We also suppose that N is sufficiently large, in terms of k and θ. In particular, our bounds are uniform in the coefficients ai, bi in some range. Proposition 7.8. Adopt the notation (7.7), (7.8), and let µ` be an upper bound sieve function from Theorem 2.19 with parameters z, D. Let λpdq satisfy (7.13) and be supported on D. For r P D define

λpr1d1, . . . , r d q (7.14) ξprq “ k k . d ¨ ¨ ¨ d d 1 k ÿ Let pa1n ` b1, . . . , akn ` bkq be an admissible set of linear forms, with k ě 2 and such that 2 2 (7.15) 1 ď |ai| ď N , |bi| ď N p1 ď i ď kq. Define E, E by (7.10), V by (7.11) and wpnq by (7.12). Then ξprq2 N wpnq “ VN ` O 99k . r1 ¨ ¨ ¨ rk plog Nq Nănď2N rP ÿ ÿD ˆ ˙ Proof. From (7.12), we have wpnq “ µ`ptq λpdqλpeq 1. Nănď2N tďD d,ePDXE Nănď2N ÿ ÿ ÿ t|pa1n`b1ÿq¨¨¨pakn`bkq @j:rdj ,ej s|paj n`bj q

Since d, e P E , by Lemma 7.7 the inner sum is empty unless pdiei, djejq “ 1 for all i ‰ j. In this case, the simultaneous conditions rdj, ejs|pajn ` bjq, 1 ď j ď k, define a single residue class n modulo k j“1rdj, ejs. Also, the condition t|pa1n ` b1q ¨ ¨ ¨ pakn ` bkq defines ρptq residue classes modulo t. But P `ptq ď z ă P ´pd e q for each j, hence n runs over ρptq residue classes modulo trd , e s ¨ ¨ ¨ rd , e s. ś j j 1 1 k k Hence, ρptqN wpnq “ µ`ptq λpdqλpeq ` Opρptqq trd1, e1s ¨ ¨ ¨ rdk, eks (7.16) Nănď2N tďD d,ePDXE ˆ ˙ ÿ ÿ pdiei,dj eÿj q“1 pi‰jq “ NV `B ` T, where µ`ptqρptq λpdqλpeq V ` “ ,B “ , t rd1, e1s ¨ ¨ ¨ rdk, eks tďD d,ePDXE ÿ pdiei,dj eÿj q“1 pi‰jq and, by (7.13) and (7.9), |T | ! |D|2 ρptq. tďD ÿ We begin with the error terms T . We have kωprqµ2prq |D| ď kωprqµ2prq ď R r rďR rďR P ´ÿprqąz P ´ÿprqąz k 2 ď R 1 ` ! Rplog Nq2k, p 2 zăpďR ź ˆ ˙ 80 KEVIN FORD and ρptq k ρptq ď D ď D 1 ` ! Dplog Nqk. t p tďD tďD pďD ÿ ÿ ź ˆ ˙ Hence, (7.17) T ! R2Dplog Nq3k ! N θ. The function gptq “ ρptq{t satisfies (Ω) with κ “ k since ρppq ď k for all p. Therefore, by the Fundamental Lemma (Theorem 2.19),

` ´ 1 s log s 1 (7.18) V “ V 1 ` Ope 2 q “ V ` O . plog Nq100k ˆ ˙ ` ˘ ωpm q We now record a very crude bound for B. For any mi “ rdi, eis, there are at most 3 i choices for di, ei. Hence, from (7.13), k k λpdqλpeq 3ωpmiq 3 (7.19) ď ď 1 ` ! s6k ! log N. m1 ¨ ¨ ¨ mk 2 mi 2 p ˇ d,ePD ˇ i“1 miďR zăpďR ˆ ˙ ˇ ÿ ˇ ź ´ ÿ ź ˇ ˇ P pmiqąz ˇ ˇ To asymptotically bound B, we first remove the conditions d, e P E and pdiei, djejq “ 1. Now from (7.10) and (7.15), 2 E ! N 2k`4pk {2q. log N 2 Hence there are ! log z ! s prime factors of E which are ą z. If d R E or e R E then there is a p|E with p|mj for some j. Write mj “ pm, then analogously to (7.19) we have k λpdqλpeq 3ωpmq`1 3ωpmj q s2 log N ď ! s6k ! . m1 ¨ ¨ ¨ mk 2 mp 2 mj z z ˇ d,ePD ˇ i“1 p|E mďR j‰i mj ďR ˇ dREÿor eRE ˇ ÿ pÿąz P ´ÿm z ź ´ ÿ ˇ ˇ p qą P pmj qąz ˇ ˇ Similarly, for each i ‰ j we have λpdqλpeq 1 3 k s6k 1 ď 2 1 ` ! ! . m1 ¨ ¨ ¨ mk p p z log z z d,ePD zăpďR2 zăpďR2 ˆ ˙ pdiei,dÿj ej qą1 ÿ ź Therefore, log N λpdqλpeq (7.20) B “ O ` B1,B1 “ . z rd1, e1s ¨ ¨ ¨ rdk, eks d,eP ˆ ˙ ÿD Combining (7.16) with (7.17), (7.18) and (7.20), plus the crude bound (7.19), we find that NV log N NB1 wpnq “ NVB1 ` T ` O ` z plog Nq100k Nănď2N (7.21) ÿ ˆ ˙ N “ NVB1 ` O . plog Nq99k ˆ ˙ It remains to bound B1. Write 1 pd, eq 1 (7.22) “ “ φprq. rd, es de de r d,e |pÿ q SIEVE METHODS LECTURE NOTES, SPRING 2020 81

Then

1 λpdq λpeq B “ φpr1q ¨ ¨ ¨ φprkq d1 ¨ ¨ ¨ dk e1 ¨ ¨ ¨ ek rP j:r d j:r e ÿD ˆ @ ÿj | j ˙ˆ @ ÿj | j ˙ φpr1q ¨ ¨ ¨ φpr q “ k ξprq2. r2 ¨ ¨ ¨ r2 rP 1 k ÿD 2 For any r ď R, r has at most s prime factors ą z. Hence, for all ri, 2 φpriq s log N (7.23) “ p1 ´ 1{pq “ 1 ` O “ 1 ` . ri z z p r ź| i ˆ ˙ ˆ ˙ Similar to (7.19) we have 1 k (7.24) ξprq ď 1 ` ! s2k ! log N. p zăpďR ź ˆ ˙ Therefore, ξprq2 log3 N B1 “ ` O . r1 ¨ ¨ ¨ rk z rP ÿD ˆ ˙ Combining this with (7.21) completes the proof.  Proposition 7.9. Assume EHpθq. Adopt the notation (7.7), (7.8), and let µ` be an upper bound sieve function from Theorem 2.19 with parameters z, D. Let λpdq satisfy (7.13) and be supported on D. For r P D and 1 ď m ď k define

1 λpr1d1, . . . , rkdkq (7.25) ζmprq “ rm“1 . d1 ¨ ¨ ¨ dk dPD dmÿ“1

Let pa1n ` b1, . . . , akn ` bkq be an admissible set of linear forms, with k ě 2, such that

100 N 100 1 ď am ď plog Nq , ´ am ď bm ď N log N (7.26) 2 2 2 1 ď |ai| ď N , |bi| ď N pi ‰ mq. Define E, E by (7.10), V by (7.11) and wpnq by (7.12). Then, for 1 ď m ď k we have VY ζ prq2 N w n 1 m m O , p q amn`bm prime “ ` 40k2 p1 ´ 1{pq r1 ¨ ¨ ¨ rk plog Nq Nănď2N pďz rP ÿ ÿD ˆ ˙ where ś lip2amN ` bmq ´ lipamN ` bmq N Ym :“ „ . am log N Proof. We begin with 1 ` (7.27) wpnq amn`bm prime “ µ ptq λpdqλpeq 1. Nănď2N tďD d,ePDXE Nănď2N ÿ ÿ ÿ t|pa1n`b1ÿq¨¨¨pakn`bkq @j:rdj ,ej s|paj n`bj q amn`bm prime 82 KEVIN FORD

As in the proof of Proposition 7.8, d P E and e P E implies that pdiei, djejq “ 1 for all i ‰ j. Also, since 2 θ´2{s rdm, ems ď R “ N , p “ amn ` bm is prime and

amN N (7.28) p “ a n ` b ě ě , m m 2 2 we see that

dm “ em “ 1. The range of n implies that

amN ` bm ă p ď 2amN ` bm.

For each i ‰ m, the condition rdi, eis|ain ` bi is equivalent to

´1 p ” ai paibm ´ ambiq pmod rdi, eisq,

Again, d P E and e P E implies that this defines a single residue class modulo rdi, eis, and moreover this residue class is coprime to rdi, eis. By (7.28), the condition t|pa1n ` b1q ¨ ¨ ¨ pakn ` bkq is equivalent to

pain ` biq ” 0 pmod tq, pamn ` bm, tq “ 1. i‰m ź This defines ρ˚ptq residue classes for n modulo t, where ρ˚ is multiplicative by the Chinese Remainder Theorem, and moreover for primes q we have

ρpqq if q|am (7.29) ρ˚pqq “ #ρpqq ´ 1 if q - am.

To see this, note that when q|am, the congruence amn ` bm ” 0 pmod qq has no solutions, and for any n we have pamn ` bm, qq “ 1 since pam, bmq “ 1. When q - am, there are ρpqq solutions of

pa1n ` b1q ¨ ¨ ¨ pakn ` bkq ” 0 pmod qq, including the single solution of amn ` bm ” 0 pmod qq, which must be removed. ˚ 100 Therefore, there are ρ ptq residue classes for p modulo amt. By assumption, 1 ď am ď log N ă z, ˚ and so amt is coprime to rd1, e1s ¨ ¨ ¨ rdk, eks. Hence, the inner sum in (7.27) defines precisely ρ ptq reduced residue classes for the prime p modulo amtrd1, e1s ¨ ¨ ¨ rdk, eks. Define Epuq by

lip2amN ` bmq ´ lipamN ` bmq Epuq “ max πp2amN ` bm; u, sq ´ πpamN ` bm; u, sq ´ pu,sq“1 φpuq ˇ ˇ ˇ ˇ ˇ ˇ and write u “ amtrdˇ1, e1s ¨ ¨ ¨ rdk, eks. Then, by (7.27), ˇ (7.30) amYm wpnq1 “ µ`ptq λpdqλpeq ρ˚ptq ` Opρ˚ptqEpuqq amn`bm prime φpuq Nănď2N tďD d,ePDXE „  ÿ ÿ pdiei,dj eÿj q“1 pi‰jq dm“em“1 ˚ ˚ ˚ “ amYmV B ` T , SIEVE METHODS LECTURE NOTES, SPRING 2020 83

` ´ where, since P pamtq ď z ă P prd1, e1s ¨ ¨ ¨ rdk, eksq, µ`ptqρ˚ptq V ˚ “ , φpamtq tďD ÿ λpdqλpeq B˚ “ , φprd1, e1s ¨ ¨ ¨ rdk, eksq d,ePDXE pdiei,dj eÿj q“1 pi‰jq dm“em“1 |T ˚| ! ρ˚ptq Epuq. tďD d,ePDXE ` P ÿptqďz pdiei,dj eÿj q“1 pi‰jq ˚ We use Hypothesis EHpθq to handle the error term T . Note that x :“ 2amN ` bm ą N by hypothesis, and since d, e P D, the moduli satisfy 2 θ θ u ď amtd1 ¨ ¨ ¨ dke1 ¨ ¨ ¨ ek ď amDR ď N ď x ωpqq if N is large enough. For each squarefree q “ rd1, e1s ¨ ¨ ¨ rdk, eks, there are ď p3kq ways to choose ˚ ωptq 2amN`|bm| d1, e1, . . . , dk, ek. Also, ρ ptq ď k . Thus, by Cauchy-Schwarz and the trivial bound Epuq ! u , ˚ 2 ωptq 2 ωpqq |T | ! µ ptqk µ pqqp3kq Epamtqq tďD P ´pqqąz ` P ÿptqďz qďÿR2 2 ωprq ď µ prqp3kq Epamrq r DR2 ďÿ µ2prqp3kq2ωprq 1{2 1{2 ! pN ` |b |q1{2 Epa rq m r m P ` r N r DR2 ˆ pÿqď ˙ ˆ ďÿ ˙ 1{2 2 2amN ` bm ! pN log100 Nq1{2plog Nq9k {2 . plog Nq1000k2 ˆ ˙ Invoking the bounds on am and bm, we conclude that N (7.31) T ˚ ! . plog Nq100k2 As in the proof of Proposition 7.8, we have m rdi, eis log N “ 1 ` O . φprd , e sq z i“1 i i ź ˆ ˙ Hence, by the argument in (7.19), log2 N λpdqλpeq B˚ “ O ` . z rd1, e1s ¨ ¨ ¨ rdk, eks ˆ ˙ d,ePDXE pdiei,dj eÿj q“1 pi‰jq dm“em“1 As in the proof of Proposition 7.8, the “missing terms”, those with d P D, e P D and with either log N pdiei, djejq ą 1, d P E , or e P E , have total Op z q. Using (7.22) and (7.23) again, we get 2 2 log N ζmprq (7.32) B˚ “ O ` . z r1 ¨ ¨ ¨ rk rP ˆ ˙ ÿD 84 KEVIN FORD

Finally, apply the Fundamental Lemma of the sieve (Theorem 2.19) with the function ˚ ρ ptqφpamq gptq “ , φpamtq where, by (7.29), for primes p we have ρ˚ppq ρppq p “ p if p|am, gppq “ $ ˚ ’ ρ ppq ρppq´1 & p´1 “ p´1 if p - am. g p 2k p p Ω κ 2k Again, p q ď { for all , thus ( ) holds%’ with “ . Then, by Theorem 2.19, ˚ 1 ´ 1 s log s 1 ˚˚ V “ 1 ` Ope 2 q p1 ´ gppqq “ 1 ` O V , φ a 100k2 p mq pďz plog Nq ´ ¯ ź ˆ ˆ ˙˙ where, using (7.29), 1 ρppq ρppq ´ 1 V ˚˚ “ 1 ´ 1 ´ φpamq p p ´ 1 p|am ˆ ˙ pďz ˆ ˙ ź pź-am V 1 ´1 1 “ 1 ´ 1 ´ φpamq p p pďz p a ź ˆ ˙ ź| m ˆ ˙ V 1 ´1 “ 1 ´ . a p m pďz ź ˆ ˙ Therefore, V p 1 (7.33) V ˚ “ ` O . a p 1 90k2 m pďz ´ plog Nq ź ˆ ˙ The same argument leading to (7.19) yields B˚ ! log N. Combining (7.30) with (7.31), (7.32) and (7.33) yields the claimed asymptotic.  Next, we prove two relatively easy inversion formulas.

Lemma 7.10. For all r P D and 1 ď m ď k, µpbqξpr1, . . . , rm 1, b, rm 1, . . . , r q ζ prq “ 1 ´ ` k . m rm“1 b bP ÿN Proof. Let rm “ 1. By (7.14), the right side equals

µpbq λpr1d1, . . . , rm 1dm 1,d mb, rm 1dm 1,...q “ ´ ´ ` ` b d ¨ ¨ ¨ d b d 1 k ÿ ÿ 1 λpr1d1, . . . , rm´1dm´1,`, r m`1dm`1,...q “ µpbq “ ζmprq.  di ` d :i‰m i‰m `P b ` iÿ ÿN ÿ| Lemma 7.11. For allśd,

µpb1q ¨ ¨ ¨ µpb qξpb1d1, . . . , b d q λpdq “ 1 k k k . dPD b ¨ ¨ ¨ b b 1 k ÿ SIEVE METHODS LECTURE NOTES, SPRING 2020 85

Proof. Let d P D. By (7.14), the right side is

µpb1q ¨ ¨ ¨ µpb q λpb1d1e1, . . . , b d e q “ k k k k b ¨ ¨ ¨ b e ¨ ¨ ¨ e b 1 k e 1 k ÿ ÿ k λpl1d1, . . . , lkdkq “ µpbiq “ λpdq.  l1 ¨ ¨ ¨ lk l i“1 b l ÿ ź ÿi| i Now we describe how we will construct the functions ξpq and λpq. Let Fk denote the set of functions F pxq that are continuously differentiable, symmetric and supported on the set k (7.34) Rk “ tx P r0, 1s : x1 ` ¨ ¨ ¨ ` xk ď 1u, and such that

(7.35) |F pxq| ď 1 px P Rkq, and F is not identically zero on Rk. For such an F , we then take

log r1 log r (7.36) ξprq “ 1 µpr q ¨ ¨ ¨ µpr q p1 ` k{pq´1 F ,..., k . rPD 1 k log R log R zăpďR ź ˆ ˙ constant In this way, by Lemma 7.11, for any d P D weloooooooooomoooooooooon have 1 µ2p`qkωp`q λpdq p1 ` k{pq ď ď “ p1 ` k{pq, b1 ¨ ¨ ¨ bk ` ˇ zăpďR ˇ bPD P ´p`qąz zăpďR ˇ ź ˇ ÿ P `ÿp`qďR ź ˇ ˇ that is, |λpdq| ď 1 for all d P D, as required by (7.35). We next insert the definition (7.36) into Propositions 7.8 and 7.9, thus relating the sums in question to integrals over F . We first need some general tools, first relating a sum over a 1-variable function to an integral, and using it to handle multivariate functions. Lemma 7.12. Suppose g C1 a, b , 0 a b 1, with g t 1 and g1 t log R throughout a, b . ? P r s ď ă ď | p q| ď | p q| ď r s Suppose that e log R ď z ď R and write R “ zu. Then 1 log n log R b log u g “ e´γ gptq dt ` O . n log R log z a u RaănďRb ˆ ˙ ˆ ż ˆ ˙ ˙ P ´ÿpnqąz

log u 1 Proof. Let δ “ u and a “ maxpδ, aq. We separate the sum into two parts: 1 log n 1 log n S1 “ g ,S2 “ g , 1 n log R 1 n log R RaăÿnďRa ˆ ˙ Ra ăÿnďRb ˆ ˙ P ´pnqąz P ´pnqąz

If δ ă a then S1 “ 0, otherwise we have the crude bound 1 log Rδ log R |S | ď ! “ δ . 1 n log z log z P `pnqďRδ P ´ÿpnqąz 86 KEVIN FORD

We use partial summation on S2, first writing b 1 log n R 1 log t S2 :“ g “ g dΦpt, zq. a1 1 n log R R t log R Ra ăÿnďRb ˆ ˙ ż ˆ ˙ P ´pnqąz log t ? By Hypothesis, log z ď log t for t ď R. Hence, by Theorem 2.20 (iii), e´γt t Φpt, zq “ ` Eptq,Eptq “ O . log z euδ log z ˆ ˙ Therefore, Rb ´γ Rb log t Rb 1 log t log t e log t dt Eptqgp log R q g p log R q gp log R q S2 “ g ` ´ Eptq 2 ´ 2 dt log z a1 log R t t a1 t log R t R ˇ a1 R ż ˆ ˙ ˇR ż „  ´γ b ˇ e log R log R ˇ “ gpyq dy ` O uδ . ˇ log z 1 e log z ża ˆ ˙ log u Recalling that δ “ u and our bound on S1, the lemma follows; if δ ă a then S “ S2 and otherwise we a1 δ use that a |g| ď 0 1 “ δ.  1 Lemmaş 7.13. Supposeş that f P C pRkq, |fpxq| ď 1 on Rk, and Bf max max pxq ď log R. xPRk i Bx ˇ i ˇ ? ˇ ˇ Let R “ zu, where 3 ď u ď log R. then ˇ ˇ ˇ ˇ fp log n1 ,..., log nk q k log R log R ´γ log R log u “ e f ` Ok . ´ n1 ¨ ¨ ¨ nk log z Rk u P pn1¨¨¨nkqąz ˆ ˙ „ ż ˆ ˙  2 ÿ µ pn1¨¨¨nrq“1

2 Proof. We first insert “missing” summands corresponding to µ pn1 ¨ ¨ ¨ nkq “ 0. These have total at most 1 1 1 k 1 log R k ď k2 ! , n n p2 m k z log z ´ 1 ¨ ¨ ¨ k p z ´ P pn1¨¨¨nkqąz ą ˆ P pmqąz ˙ ˆ ˙ 2 ÿ ÿ ÿ µ pn1¨¨¨nkq“0 mďR which is tiny. Repeated application of Lemma 7.12 (each time with a “ 0) shows that

log n1 log nk ´γ k fp log R ,..., log R q e log R log u “ f ` Ok , ´ n1 ¨ ¨ ¨ nk log z Rk u P pn1ÿ¨¨¨nkqąz ˆ ˙ „ ż ˆ ˙  which implies the desired conclusion. 

Proposition 7.14. Let F P Fk. Define ξ by (7.36). (i) Under the hypotheses of Proposition 7.8, we have log z k wpnq „ VN e´γ IpF q pN Ñ 8q, log R Nănď2N ÿ ˆ ˙ SIEVE METHODS LECTURE NOTES, SPRING 2020 87 where (7.37) IpF q “ F 2pxq dx. żRk (ii) Under the hypotheses of Proposition 7.9, we have k log z k kθ wpnq1 „ VN e´γ JpF q pN Ñ 8q, amn`bm prime log R 2 Nănď2N m“1 ÿ ÿ ˆ ˙ where 2 (7.38) JpF q “ ¨ ¨ ¨ F pxq dx1 dx2 ¨ ¨ ¨ dxn.

xż2,...,xkż ˆ ż ˙ Proof. From the definitions (7.7), we have R “ zu, where θ 1 u “ s2 ´ — s2. 2 s ˆ ˙ (i) From Proposition 7.8, the definition (7.36) of ξ and Lemma 7.13, we have log R k log s N wpnq “ σ2VN e´γ IpF q 1 ` O ` O , log z s2 plog Nq99k Nănď2N ÿ ˆ ˙ ˆ ˆ ˙˙ ˆ ˙ where log z k σ “ p1 ` k{pq´1 „ . log R zăpďR ź ˆ ˙ The final error term is negligible since p ´ 1 k 3 1 V σ2 ě 1 ´ 1 ´ " . p p k plog Nq3k pď2k 2kăpďR ź ˆ ˙ ź ˆ ˙ (ii) From the symmetry of F , we see that ζmprq is independent of m. By Lemma 7.10, 2 2 ζ prq 1 1 log r1 log r 1 “ σ2 F ,..., k . r ¨ ¨ ¨ r r ¨ ¨ ¨ r r log R log R r 1 k r ,...,r 2 k ˜ r1 1 ¸ ÿ 2ÿ k ÿ ˆ ˙ log ri For each i set xi “ log R . With x2, . . . , xk fixed we have 0 ď x1 ď 1 ´ px2 ` ¨ ¨ ¨ ` xkq. By Lemma 7.12, the sum on r1 is equal to

1´x2´¨¨¨´x log R k log s log ri e´γ F pxq dx `O , x “ p2 ď i ď kq. log z 1 F s2 i log R „ ż0 ˆ ˙  fpx2,...,xkq Lemma 7.13 then implieslooooooooooooomooooooooooooon that ζ2prq log R k`1 1 „ σ2 e´γ JpF q. r r1 ¨ ¨ ¨ rk log z ÿ ˆ ˙ Recalling Proposition 7.9, we have k 2 1 kV N{ log N ζ1prq wpnq amn`bm prime „ . p1 ´ 1{pq r1 ¨ ¨ ¨ rk m“1 Nănď2N pďz rP ÿ ÿ ÿD ś 88 KEVIN FORD

´γ log R θ Now pďzp1 ´ 1{pq „ e { log z by Mertens, and log N „ 2 , and the desired asymptotic follows.  Armedś with Proposition 7.14, we can now apply these results to prime gaps and prime k-tuples.

Theorem 7.15. Fix k P N and m P N, and assume Hypothesis EHpθq. There is a constant ck such that the following holds. Suppose that there is a function F P Fk and such that kJpF q 2pm ´ 1q M pF q :“ ą , k IpF q θ where IpF q,JpF q are defined in (7.37) and (7.38), respectively. Then, for all sufficiently large N, and all admissible tuples pa1n ` b1, . . . , akn ` bkq of linear forms, with 100 100 1 ď ai ď log N, ´aiN{2 ă bi ď N log N p1 ď i ď kq, c there are " N{plog Nq k integers n P pN, 2Ns for which at least m of the numbers a1n ` b1, . . . , akn ` bk are prime. In particular, unconditionally the conclusion holds provided that MkpF q ą 4pm ´ 1q. Proof. Let k 1 S “ vpnqwpnq, vpnq :“ aj n`bj prime ´ pm ´ 1q. Nănď2N j“1 ÿ ÿ By the two parts of Proposition 7.14, we have log z k kJpF qθ S „ VN e´γ ´ pm ´ 1qIpF q . log R 2 ˆ ˙ „  By hypothesis, the bracketed expression is positive. From (7.11) we have minpk, p ´ 1q V ě 1 ´ " plog zq´k, p pďz ź ˆ ˙ and thus vpnqwpnq S N S1 :“ wpnq ě “ " . k k plog Nqk Nănď2N Nănď2N vpÿnqě1 ÿ It follows that there are many values of n with vpnq ą 0. More precisely, by Cauchy-Schwarz,

pS1q2 ď #tN ă n ď 2N : vpnq ě 1u wpnq2 . Nănď2N ˆ ÿ ˙ Thus, N 2 ´1 (7.39) #tN ă n ď 2N : vpnq ě 1u " wpnq2 plog Nq2k Nănď2N ˆ ÿ ˙ By (7.12), k 3 0 ď wpnq ď τpain ` biq . j“1 ź SIEVE METHODS LECTURE NOTES, SPRING 2020 89

100 Hence, by Holder’s¨ inequality and the bound ain ` bi ď 3Nplog Nq ,

k 2 6 wpnq ď τpain ` biq Nănď2N Nănď2N j“1 ÿ ÿ ź k 1{k 6k ď τpajn ` bjq j“1 Nănď2N ź ˆ ÿ ˙ ď τ 6kpdq d 3N log N 100 ď pÿ q 6k ! Nplog Nq100`2 ´1.

6k Combined with (7.39), this completes the proof of the first claim, with ck “ 2k ` 100 ` 2 ´ 1. The final statement follows from the Bombieri-Vinogradov Theorem, which implies Hypothesis EHpθq for all θ ă 1{2. 

7.4. Bounds on MkpF q.

Definition 6. Let kJpF q Mk :“ sup MkpF q “ sup . F PFk F PFk IpF q

We begin with a simple upper bound for Mk from [109].

k log k Theorem 7.16 ([109]). We have Mk ď k´1 log k “ log k ` Op k q.

Proof. Let x2, . . . , xk be given and set y “ 1 ´ px2 ` ¨ ¨ ¨ ` xkq. The integral over those x with y “ 0 has measure zero and can be discarded. Thus, we may assume that y ą 0. For any A ą 0, by Cauchy-Schwarz we have y 2 y y 2 dx1 F pxq dx1 ď p1 ` Ax1qF pxq dx1 1 ` Ax ˆ ż0 ˙ ż0 ż0 1 logp1 ` Ayq y “ p1 ` Ax qF pxq2 dx . A 1 1 ż0 Put A “ B{y for some constant B to be determined, then integrate over x2, . . . , xk. We get logp1 ` Bq JpF q ď p1 ´ x ´ ¨ ¨ ¨ ´ x ` Bx qF pxq2 dx. B 2 k 1 żRk Since F pxq is symmetric, we may interchange x1 and xi. Doing this for each i and summing gives

logp1 ` Bq 2 kJpF q ď pk ´ pk ´ 1q xi ` B xiqF pxq dx. B Rk ż ÿ ÿ Taking B “ k ´ 1, the integral above equals kIpF q and this completes the proof.  Theorem 7.17. We have

Mk ě log k ´ log2 k ´ Op1q. 90 KEVIN FORD

Proof. Let δ ą 0, and let g : r0, δs Ñ r0, 8q be a function with |gptq| ď 1 for all t. We’ll specialize to functions of the type

F pxq “ gpx1q ¨ ¨ ¨ gpxkq. For short, let δ δ 2 m1 “ gptq dt, m2 “ g ptq dt. ż0 ż0 We interpret IpF q and JpF q probabilistically. Let Z1,...,Zk be independent random variables with density function 1 g2ptq, 0 ď t ď δ. Then m2

2 2 k IpF q “ g px1q ¨ ¨ ¨ g pxkq dx “ m2 PpZ1 ` ¨ ¨ ¨ ` Zk ď 1q. żRk Also, δ 2 2 2 JpF q ě ¨ ¨ ¨ g px2q ¨ ¨ ¨ g pxkq gpx1q dx1 dx2 ¨ ¨ ¨ dxk 0 x2`¨¨¨`ż xkďż1´δ ˆ ż ˙ 2 k´1 “ m1m2 PpZ2 ` ¨ ¨ ¨ ` Zk ď 1 ´ δq. Thus, 2 2 km1 PpZ2 ` ¨ ¨ ¨ ` Zk ď 1 ´ δq km1 (7.40) MkpF q ě ¨ ě PpZ2 ` ¨ ¨ ¨ ` Zk ď 1 ´ δq. m2 PpZ1 ` ¨ ¨ ¨ ` Zk ď 1q m2 We will choose g so that the probability on the RHS is about 1. If 1 δ µ :“ Z “ tg2ptq dt, E i m 2 ż0 then we want 1 ´ δ (7.41) µ ă k ´ 1 so that EpZ2 ` ¨ ¨ ¨ ` Zkq “ pk ´ 1qµ ă 1 ´ δ. We can bound the probability of a large deviation from the mean using Chebyshev’s inequality and the calculated variance 1 δ σ2 :“ pZ ´ µq2 “ Z2 ´ µ2 “ t2g2ptq dt ´ µ2. E i E i m 2 ż0 Then 2 2 EpZ2 ` ¨ ¨ ¨ ` Zk ´ pk ´ 1qµq “ pk ´ 1qσ . Thus, under the assumption of (7.41), we have

P pZ2 ` ¨ ¨ ¨ ` Zk ě 1 ´ δq ď P p|Z2 ` ¨ ¨ ¨ ` Zk ´ pk ´ 1qµ| ě 1 ´ δ ´ pk ´ 1qµq (7.42) pk ´ 1qσ2 ď . p1 ´ δ ´ pk ´ 1qµqq2 We will choose parameters so that the right side of (7.42) is very small. SIEVE METHODS LECTURE NOTES, SPRING 2020 91

2 It then remains to maximize m1{m2 subject to µ À 1{k. Motivated by the proof of Theorem 7.16, for any A ą 0 we have δ δ 2 2 dt logp1 ` Aδq m ď p1 ` Atqg ptq dt “ pm2 ` Am2µq . 1 1 ` At A ˆ ż0 ˙ˆ ż0 ˙ 1 Moreover, equality holds only for gptq “ 1`At . That is, m2 1 (7.43) 1 ď min ` µ logp1 ` Aδq. m Aą0 A 2 ˆ ˙ The minimum occurs when 1 δ logp1 ` Aδq ` µ “ , A 1 ` Aδ A2 ˆ ˙ 1 and then taking gptq “ 1`At gives equality in (7.43). With this function gptq and assuming that Aδ is large, we compute logp1 ` Aδq δ 1 m1 “ , m2 “ « , A 1 ` Aδ A and 1 1 logp1 ` Aδq µ “ logp1 ` Aδq ´ 1 ` « . m A2 1 ` Aδ A 2 ˆ ˙ We will take a convenient choice of A, δ satisfying the simpler relation (7.44) A “ k logp1 ` Aδq. Then 1 1 1 µ “ ´ ` k A kAδ and m2 1 1 A 1 “ A ` ą . m k2 δ k2 2 ˆ ˙ Thus, by (7.40) and (7.42), A pk ´ 1qσ2 (7.45) M pF q ě 1 ´ . k k p1 ´ δ ´ pk ´ 1qµq2 ˆ ˙ Crudely, 2 δ 2 2 2 2 1 Aδ t dt δ δ σ ď EZi ď “ ă . m 1 ` Aδ pAtq2 1 ` Aδ A 2 ˆ ˙ ż0 Also, using (7.44), we compute (after some algebra) 1 1 1 ´ δ ´ pk ´ 1qµ “ pk ´ eA{kq ´ . A kpeA{k ´ 1q ˆ ˙ In particular, for this to be positive, we need A ă k log k. Combined with (7.45), we conclude that A pk ´ 1qpeA{k ´ 1q MkpF q ě 1 ´ . k k eA{k 2 1 A 2 ˜ p ´ q p ´ kpeA{k´1q q ¸ A good choice for A is

A “ kplog k ´ log2 kq. 92 KEVIN FORD

(this gives δ 1 ). Then eA{k k log k and we see that „ log2 k “ { 1 M ě plog k ´ log kq 1 ´ O “ log k ´ log k ` Op1q, k 2 log k 2 ˆ ˆ ˙˙ as required.  Together with Theorem 7.15, Theorem 7.17 immediately implies Theorem 7.6. To obtain the claimed 4m bounds on Km, notice that by Theorem 7.17 there is a k ! me with Mk ą 4pm ´ 1q. The PolyMath8b project provides better bounds on Mk, as well as numerical bounds when k is small. Theorem [109, Theorem 3.9 (vii), (xi)]. We have

(i) M54 ą 4; (ii) Mk “ log k ´ Op1q. Also, Maynard [97] proved that

(7.46) M5 ą 2. Consequently, assuming the Elliott-Halberstam conjecture, or any admissible 5-tuple, infinitely often at least two of the forms are prime.

7.5. Consecutive integers with large prime factors. One special case of the prime k-tuples conjecture, Conjecture 1.3 states that for infinitely many primes p, p ` 1 “ 2q for a prime q. In this direction, we prove Theorem 7.18 (K. Ford and J. Maynard, 2014; unpublished). There is a constant B so that for infinitely many n P N, P `pnq ě n{B and P `pn ` 1q ě pn ` 1q{B.

Lemma 7.19 (Heath-Brown [79]). For any k there is a set of k positive integers a1, . . . , ak such that

(7.47) ai ´ aj “ pai, ajq pi ą jq. Examples are k “ 4 : t6, 8, 9, 12u k “ 5 : t60, 63, 64, 66, 72u.

The condition (7.47) is equivalent to pai ´ ajq|ai for all i ‰ j. Thus, Lemma 7.19 is one of the assertions in Lemma 1 of Heath-Brown [79]. As we do not require the other properties of the ai from [79], our proof is much shorter.

Proof. By induction. If ta1, . . . , aku satisfies (7.47), then so does the k ` 1 element set

tM,M ´ a1,...,M ´ aku,M “ a1 ¨ ¨ ¨ ak |ai ´ aj|.  iăj ź Proof of Theorem 7.18. By Theorem 7.17, for some k we have Mk ą 4. Thus, by Theorem 7.6, in any set of k admissible linear forms, two are prime infinitely often. Let a1, . . . , ak satisfy (7.47), which exist by Lemma 7.19. The set of forms a1n ` 1, . . . , akn ` 1 is admissible since for any prime p, pain ` 1q ı 0 pmod pq when p|n. By Theorem 7.6, for some pair i ă j, infinitely often ain ` 1 and ajn ` 1 are prime. ś By (7.47), aj ´ ai “ pai, ajq and hence aj ai pain ` 1q and pajn ` 1q pai, ajq pai, ajq SIEVE METHODS LECTURE NOTES, SPRING 2020 93 are consecutive integers. Thus the theorem follows with ai B “ max . i‰j pai, ajq  7.6. Locally repeated values of Euler’s function. We partially solve a longstanding conjecture about the solubility of (7.48) φpn ` kq “ φpnq, where φ is Euler’s function and k is a fixed positive integer.

Hypothesis Sk. The equation (7.48) holds for infinitely many n. Erdos˝ conjectured in 1945 that for any m, the simultaneous equations (7.49) φpnq “ φpn ` 1q “ ¨ ¨ ¨ “ φpn ` m ´ 1q has infinitely many solutions n. If true, this would immediately imply hypothesis Sk for every k. However, there is only one solution of (7.49) known when m ě 3, namely n “ 5186, m “ 3. In 1956, Sierpinski´ [125] showed that for any k, (7.48) has at least one solution n (e.g. take n “ pp ´ 1qk, where p is the smallest prime not dividing k). This was extended by Schinzel [117] and by Schinzel and Wakulicz [120], who showed that for any k ď 2 ¨ 1058 there are at least two solutions of (7.48). In 1958, Schinzel [117] explicitly conjectured that Sk is true for every k P N. There is good numerical evidence for Sk, at least when k “ 1 or k is even [63]. Information about solutions for k P t1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12u can also be found in OEIS [104] sequences A001274, A001494, A330251, A179186, A179187, A179188, A179189, A179202, A330429, A276503, A276504 and A217139, respectively. Below 1011 there are very few solutions of (7.48) when k ” 3 pmod 6q [63], e.g. only the two solutions n P t3, 5u for k “ 3 are known. A further search by G. Resta (see [104], sequence A330251) reveals 17 more solutions in r1012, 1015s.

There is a close connection between Hypothesis Sk for even k and generalized prime twins. Hypothesis Ppa, bq: there are infinitely many n P N such that both an ` 1 an bn ` 1 are prime. Hypothesis Ppa, bq is a special case of the Prime k-tuples conjecture, Conjecture 1.3. Schinzel [117] observed that Hypothesis Pp1, 2q implies Sk for every even k. The proof is simple: if n ` 1 and 2n ` 1 are prime and larger than k, then φpkp2n ` 1qq “ φppn ` 1q2kq “ 2nφpkq. Graham, Holt and Pomerance [63] generalized this idea, showing the following. Lemma 7.20 ([63, Theorem 1]). For any k and any number j such that j and j ` k have the same prime j j`k factors, Hypothesis Pp pj,j`kq , pj,j`kq q implies Sk. j j`k j`k This also has an easy proof: if pj,j`kq r ` 1 and pj,j`kq r ` 1 are both prime, then n “ jp pj,j`kq r ` 1q satisfies (7.48). Note that for odd k there are no such numbers j, and for each even k there are finitely many such j (see [63], Section 3). Extending a bound of Erdos,˝ Pomerance and Sark´ ozy˝ [44] in the case k “ 1, Graham, Holt and Pomerance showed that the solutions of (7.48) not generated from Lemma 7.20 are very rare, with counting function O px expt´plog xq1{3uq. Yamada [134] sharpened this bound to ? ? k Okpx expt´p1{ 2 ` op1qq log x log log log xuq. Assuming the Hardy-Littlewood conjectures [72], when 2 k is even we conclude that there are „ Ckx{ log x solutions n ď x of (7.48), where Ck ą 0. Using the fact that K2 “ 50 is admissible in Theorem 2.5, we will prove the following. 94 KEVIN FORD

Theorem 7.21 (Ford [48], 2020). We have

(a) For any k that is a multiple of 442720643463713815200, Sk is true; (b) There is some even ` ď 3570 such that Sk is true whenever `|k; consequently, the number of k ď x for which Sk is true is at least x{3570. Under the assumption of the Elliott-Halberstam Conjecture (Conjecture 7.3), Maynard [97] showed that K2 ď 5, improving the bound K2 ď 6 proved by Goldston, Pintz and Yıldırım[59] under the same hypothe- sis. A generalized version of the Elliot-Halberstam conjecture (in the notation of [109], this is the statement that GEHrθs holds for all θ ă 1), implies that K2 ď 3 [109, Theorem 16 (xii)]. Improvements to K2 allow us to improve significantly on Theorem 7.21.

Theorem 7.22 (Ford [48], 2020). If K2 ď 5, then Sk is true for all k with 30|k. If K2 ď 4, then Sk is true for all k with 6|k. In particular, the Elliot-Halberstam conjecture implies Sk for all k with 30|k, and the Generalized Elliot-Halberstam conjecture implies Sk for all k with 6|k.

Incidentally, the conclusion of Theorem 7.22 when K2 ď 4 is not improved if we have the stronger bound K2 ď 3. Using Theorem 7.6, we also make progress toward Erdos’˝ conjecture that (7.49) has infinitely many solutions.

Theorem 7.23 (Ford [48], 2020). For any m ě 3 there is a tuple of distinct positive integers h1, . . . , hm so that for any ` P N, the simultaneous equations

φpn ` `h1q “ φpn ` `h2q “ ¨ ¨ ¨ “ φpn ` `hmq have infinitely many solutions n. Very recently, Sungjin Kim [91] proved weaker statements in the direction of Theorem 7.21. He used

Theorem 2.5 to show that Sk holds for some k P tB, 2B,..., 50Bu, with B “ pď50 p. He also proved that the set of k for which Sk holds has counting function " log log x. ś Now we get to the proofs. Throughout, 1 ď a ă b are integers. We first show that Ppa, bq implies Sk for certain k, inverting Lemma 7.20. Define a b (7.50) κpa, bq “ pb1 ´ a1q p, a1 “ , b1 “ . pa, bq pa, bq p a1b1 ź| We observe that κpa, bq is always even.

Lemma 7.24. Assume Ppa, bq. Then Sk holds for every k which is a multiple of κpa, bq.

1 a 1 b 1 1 Proof. Define a “ pa,bq , b “ pa,bq and observe that Ppa, bq ñ Ppa , b q. Let s “ p|a1b1 p, and suppose that r ą maxpa1, b1q such that a1r ` 1 and b1r ` 1 are both prime. Let ` P and set N ś 1 1 1 1 m1 “ b `spa r ` 1q, m2 “ a `spb r ` 1q. As all of the prime factors of a1b1 divide `s, we have φpb1`sq “ b1φp`sq and φpa1`sq “ a1φp`sq, and it 1 1 follows than φpm1q “ φpm2q. Finally, m1 ´ m2 “ pb ´ a q`s “ `κpa, bq.  Proof of Theorem 7.21. Let

ta1, . . . , a50u “ t1, 2, 4, 5, 6,..., 48, 49, 52, 56u, SIEVE METHODS LECTURE NOTES, SPRING 2020 95

By Theorem 7.6, for some i, j with 1 ď i ă j ď 50, Ppai, ajq is true. We compute 5 3 2 lcmtκpai, ajq : 1 ď i ă j ď 50u “ 442720643463713815200 “ 2 3 5 p, 7ďpď47 ź and thus (a) follows from Lemma 7.24. For part (b), we take

ta1, . . . , a50u “ t15, 20, 30, 36, 40, 45, 60, 72, 75, 80, 90, 96, 100, 108, 120, 135, 144, 150, 180, 192, 200, 216, 225, 240, 250, 270, 288, 300, 320, 324, 360, 375, 384, 400, 405, 450, 480, 500, 540, 600, 720, 750, 810, 900, 960, 1080, 1200, 1440, 1500, 1800u, numbers that only have prime factors 2, 3, 5. We also compute that

max κpai, ajq “ 3570, 1ďiăjď50 and again invoke Lemma 7.24. This proves (b).  442720643463713815200 Remarks. For any choice of a1, . . . , a50, 6 |Lpaq, where

Lpaq “ lcmtκpai, ajq : i ă ju.

Without loss of generality, assume pa1, . . . , a50q “ 1. For a prime 7 ď p ď 47, if p|ai for some i then p - aj for some j and thus p|κpai, ajq. If p - ai for all i, by the pigeonhole principle, there are two indices with 2 b ai ” aj pmod pq. Again, p|κpai, ajq. Thus, p|Lpaq. Now we show that 5 |Lpaq. Let Sb “ tai : 5 }aiu 2 for b ě 0. Then |S0| ě 1. If |Sb| ě 1 for some b ě 2, then there are i, j with 5 |ai and 5 - aj, and then 2 5 |κpai, ajq. Otherwise, we have |Sb| ě 21 for some b P t0, 1u. By the pigeonhole principle, there is i ‰ j b b b`2 2 b with 5 }ai, 5 }aj and 5 |pai ´ ajq. This also implies that 5 |κpai, ajq. Simlarly, let Tb “ tai : 3 }aiu. 2 Then we have either |Tb| ě 1 for some b ě 2, or |Ti| ě 7 for some i P t0, 1u. Either way, 3 |Lpaq. Let b Ub “ tai : 2 }aiu. Then either |Ub| ě 1 for some b ě 4 or |Ub| ě 9 for some b P t0, 1, 2, 3u. Either 4 3 5 way, 2 |Lpaq. It is easy to construct a “ pa1, . . . , a50q such that 3 - Lpaq and 2 - Lpaq. However, such constructions seem to always produce q|Lpaq for some prime q ą 50. We believe that 3570 is the smallest number than can be produced for Theorem 7.21 (b). Using numbers divisible by 4 or more primes always produces some very large κpa, bq, thus we limited our search to sets of numbers composed only of the primes 2,3,5. For a given finite set of integers tb1, . . . , bru, the problem of minimizing maxi,jPI κpbi, bjq over all 50-element subsets I Ă t1, . . . , ru, is equivalent to that of finding the largest clique in a graph. Take vertex set t1, . . . , ru and draw an edge from i to j if κpbi, bjq ď t. Using the Sage routing clique number() with t “ 3569 and tb1, . . . , bru being the smallest 800 numbers composed only of primes 2,3,5 (the largest being 12754584), we find that the largest clique has size 49.

Proof of Theorem 7.22. Same as the proof of Theorem 7.21 (a), but take ta1, a2, a3, a4, a5u “ t1, 2, 3, 4, 6u if K2 ď 5 and ta1, . . . , a4u “ t1, 2, 3, 4u if K2 ď 4. 

Proof of Theorem 7.23. Let m ě 2, k “ Km and consider any set ta1, a2, . . . , aku of k positive integers. By Theorem 7.6, there are 1 ď i1 ă i2 ă ¨ ¨ ¨ ă im ď k such that for infinitely many r, the m numbers ai1 r ` 1, . . . , aim r ` 1 are all prime. Let r be such a number. Define 2 pai1 ¨ ¨ ¨ aim q hj “ p1 ď j ď mq. aij 96 KEVIN FORD

2 Let ` P N and set n “ `pai1 ¨ ¨ ¨ aim q r. Then, since aij |hj for all j, it follows that for any j,

φpn ` `hjq “ φp`hjpaij r ` 1qq “ φp`hjqaij r “ φp`hjaij qr.  7.7. Locally repeated values of σ. One can ask analogous questions about the sum of divisors function σpnq. As σppq “ p ` 1 vs φppq “ p ´ 1, oftentimes one can port theorems about φ over to σ. This is not the case here, since our results depend heavily on the existence of solutions of aφpbq “ bφpaq, which is true if and only if a and b have the same set of prime factors. The analogous equation σpaq σpbq aσpbq “ bσpaq ô “ a b has more sporadic solutions, e.g. if a, b are both perfect numbers or multiply perfect numbers.

Theorem 7.25 (Ford [48], 2020). For a positive proportion of all k P N, the equation σpnq “ σpn ` kq has infinitely many solutions n. As we shall see from the proof, there is a specific number A and a finite set B such that for some element b P B, the equation σpnq “ σpn`kq has infinitely many solutions for all numbers k “ `b where p`, Aq “ 1. Unfortunately, our methods cannot specify any particular k for which the conclusion holds. Our method requires finding, for t “ K2, numbers a1, . . . , at so that

σpa1q σpatq (7.51) “ ¨ ¨ ¨ “ “ y. a1 at Such collections of numbers are sometimes referred to as “friends” in the literature, e.g. [107]. Finding larger collections of ai satisfying (7.51) leads to stronger conclusions.

Theorem 7.26 (Ford [48], 2020). Let m ě 2, let t “ Km and assume that there is a y and positive integers a1, . . . , at satisfying (7.51). Then there are positive integers h1 ă h2 ă ¨ ¨ ¨ ă hm so that for a positive proportion of integers `, there are infinitely many solutions of

σpn ` `h1q “ ¨ ¨ ¨ “ σpn ` `hmq. It is known [103] that for y “ 9, there is a set of 2095 integers satisfying (7.51). The number y “ 9 has the largest known multiplicity of σpnq{n. Also K2 ď 50 [109], and hence Theorem 7.25 follows from the case m “ 2 of Theorem 7.26. We cannot make the conclusion unconditional when m ě 3, since the best known bounds for K3 is K3 ď 35410 [109, Theorem 3.2 (ii)].

Conjecture 7.27. For any t, there is an y such that σpaq{a “ y has at least t solutions. That is, there are arbitrarily large circles of friends.

Clearly, Conjecture 7.27 implies the conclusion of Theorem 7.26 for all m. In [39], Erdos˝ mentions Conjecture A and states that he doesn’t know of any argument that would lead to its resolution. In the opposite direction, Wirsing [132] showed that the number of n ď z with σpnq{n “ y is is Opzc{ log log zq for some c, uniformly in y. Pollack and Pomerance [107] studied the solutions of (7.51), gathering data on pairs, triples and quadruples of friends, but did not address Conjecture A. SIEVE METHODS LECTURE NOTES, SPRING 2020 97

Using (7.51) and prime pairs an ´ 1 and bn ´ 1, one can generate many solutions of σpnq “ σpn ` kq, analogous to Lemma 7.20; see Yamada [134, Theorem 1.1]. For example, one can generate solutions with k “ 1 if there is an integer m with σpmq{m “ σpm ` 1q{pm ` 1q “ y (the ratios need not be integers as claimed in [134]). Indeed, if r ą m ` 1, and rm ´ 1 and rpm ` 1q ´ 1 are both prime, then σpmprpm ` 1q ´ 1qq “ σpmqrpm ` 1q “ rmpm ` 1qy, σppm ` 1qpmr ´ 1qq “ σpm ` 1qrm “ rmpm ` 1qy. ? ? Yamada [134, Theorem 1.2] showed that there are ! x expt´p1{ 2 ` op1qq log x log log log xu solutions n ď x not generated in this way.

Proof of Theorem 7.26. Let t “ Km and a1, . . . , at satisfy (7.51). Put A “ lcmra1, . . . , ats and for each i define bi “ A{ai. By Theorem 7.6 applied to the collection of linear forms bin ´ 1, 1 ď i ď t, there exist i1, . . . , im such that for infinitely many r P N, the m numbers bij r ´ 1 are all prime. Let r ą A be such a number, and let ` P N such that p`, Aq “ 1 (this holds for a positive proportion of all `). Let

tj “ `aij pbij r ´ 1q “ A`r ´ `aij p1 ď j ď mq. By (7.51), for every j we have

σptjq “ σp`qσpaij qbij r “ σp`qyaij bij r “ yσp`qAr.  98 KEVIN FORD

8. LARGEGAPSBEWTEENCONSECUTIVEPRIMES th 8.1. Introduction. Let pn denote the n prime, and let

GpXq :“ max ppn`1 ´ pnq pn`1ďX denote the the maximum gap between consecutive primes less than X. It is clear from the prime number theorem that GpXq ě p1 ` op1qq log X, as the average gap between the prime numbers which are ď X is „ log X. Explicit gaps of (at least) this size may be constructed by observing that P pnq`2,P pnq`3,...,P pnq`n is a sequence of n´1 composite numbers, where P pnq is the product of the primes ď n; by the prime number theorem, P pnq “ ep1`op1qqn. In 1931, Westzynthius [131] proved that infinitely often the gap between consecutive prime numbers can be an arbitrarily large multiple of the average gap. His bound is6 log X log X GpXq " 3 . log4 X

In 1934, Ricci [114] slightly improved this to GpXq " log X log3 X. In 1935 Erdos˝ [32] made a much larger improvement, showing log X log2 X GpXq " 2 plog3 Xq and in 1938 Rankin [112] added a quadruple-log, showing

log X log2 X log4 X (8.1) GpXq ě pc ` op1qq 2 plog3 Xq 1 γ with c “ 3 . The constant c was increased several times [122, 113, 96, 106], ultimately getting to c “ 2e by Pintz [106]. It was a well-known open problem (and Erdos˝ prize problem) to show that one could take c Ñ 8. In August 2014, in two independent papers of Ford-Green-Konyagin-Tao [49] and Maynard [99], it was shown that c could be taken to be arbitrarily large. The methods of proof in [49] and [99] are quite different. The arguments in [49] used recent results [66] on the number of solutions to linear equations in primes, whereas the arguments in [99] instead relied on a multidimensional prime-detecting sieve of the type introduced in [99] (but more complicated). Later, in [50], a quantitative improvement to Rankin’s bound was given, namely Theorem 8.1 (Ford-Green-Konyagin-Maynard-Tao [50, Theorem 1]). For sufficiently large X, one has log X log X log X GpXq " 2 4 . log3 X Here we present a proof of the original theorem from [49] and [99] that the c in (8.1) may be taken arbitrarily large (without a specific rate of growth), which is much simpler than that in either of the two original papers. It is based on a hybrid approach, utilizing ideas worked out in [50], but without the need to make various estimates quantitative.

Theorem 8.2. The bound (8.1) holds for any real number c ą 0, if x is large enough, depending on c.

6 Recall that log2 x “ log log x, log3 x “ log log log x, and so on. SIEVE METHODS LECTURE NOTES, SPRING 2020 99

FIGURE 1. Gpxq vs. various approximations

Based on a probabilistic model of primes, Cramer´ [24] conjectured that GpXq lim sup 2 “ 1. XÑ8 log X Granville [64] offered a refinement of Cramer’s´ model and has conjectured that the lim sup above is in fact at least 2e´γ “ 1.1229 .... Recently, Banks, Ford and Tao [9] made a specific conjecture about the largest gap which is dependent on a problem called the interval sieve. These conjectures are well beyond the reach of our 2 methods. Numerical evidence is inconclusive, in fact maxXď4¨1018 GpXq{ log X « 0.9206, slightly below the predictions of Cramer´ and Granville. This bound is a consequence of the gap of size 1132 following the prime 1693182318746371. See also Figure 1 for a plot of Gpxq versus various approximations. Unconditional upper bounds for GpXq are far from the conjectured truth, the best being GpXq ! X0.525 and due to Baker, Harman and Pintz [8]. Even the Riemann Hypothesis only7 furnishes the bound GpXq ! X1{2 log X [23].

8.1.1. Notational conventions. Our arguments will rely heavily on probabilistic arguments using discrete random variables. We will use boldface symbols such as X or a to denote random variables (and non- boldface symbols such as X or a to denote deterministic counterparts of these variables). Vector-valued random variables will be denoted in arrowed boldface, e.g. ~a “ pasqsPS might denote a random tuple of random variables as indexed by some index set S. The letters p and q will always denote primes.

7Some slight improvements are available if one also assumes some form of the pair correlation conjecture; see [78]. 100 KEVIN FORD

8.2. Overall plan of the proof. We construct many consecutive integers in pX{2,Xs, each of which has a “very small” prime factor. By the Chinese Remainder Theorem, this is equivalent to sieving out an interval by progressions to small primes. Definition 7 (Jacobsthal’s function). Let x be a positive integer. Define Y pxq to be the largest gap in the integers with no prime factor ď x. Equivalently, Y pxq is the largest integer y for which one may select residue classes ap mod p, one for each prime p ď x, which together “sieve out” (cover) a whole interval of the form t1, 2, . . . , yu. The equivalence of the two definitions of Y pxq is easy by the Chinese remainder theorem. One conse- quence is that pP pxq, 2P pxqs contains Y pxq consecutive numbers that have a prime factor ď x, and thus these numbers are all composite. We conclude that (8.2) Gp2P pxqq ě Y pxq. Since log P pxq „ x by the Prime Number Theorem, this essentially says that GpXq Á Y plog Xq. All known lower bounds in GpXq are based on lower bounds for Y pxq. Fix a large, positive real number c, let x be a large integer and define log x log x (8.3) y :“ cx 3 , plog xq2 Z 2 ^ Also let (8.4) z :“ xlog3 x{p5 log2 xq, and introduce the three disjoint sets of primes S :“ ts prime : log20 x ă s ď zu, P :“ tp prime : x{2 ă p ď xu, Q :“ tq prime : x ă q ď yu. We will show that Y pxq ě y ´ x by covering px, ys with residue classes modulo primes ď x. Now P pxq “ ep1`op1qx by the prime number theorem, so (8.2) and (8.3) imply that

p1`op1qx log3 x Gpe q ě p1 ` op1qqcx log x 2 . plog2 xq AS G is monotone, Theorem 8.2 follows upon taking c arbitrarily large. We first reduce the problem to finding residue classes modulo the primes in S Y P which cover most of ~ the primes in Q. For residue classes ~a “ pas mod sqsPS and b “ pbp mod pqpPP , define the sifted sets

Sp~aq :“ tn P Z : n ı as pmod sq for all s P Su and likewise ~ T pbq :“ tn P Z : n ı bp pmod pq for all p P Pu. Theorem 8.3 (Sieving primes). Let c ą 0 be arbitrary, let x be sufficiently large and suppose that y obeys ~ (8.3). Then there are vectors ~a “ pas mod sqsPS and b “ pbp mod pqpPP , such that x (8.5) #pQ X Sp~aq X T p~bqq ď . 5 log x SIEVE METHODS LECTURE NOTES, SPRING 2020 101

Proof the Theorem 8.3 implies Theorem 8.2. We will first take 20 ap “ 0 pp ď log x, z ă p ď x{4q. This is a “big gun” and eliminates all numbers from px, ys except primes and a negligible set of z-smooth numbers. It dates from work of Westzynthius [131], Erdos˝ [32] and Rankin [112]. Let ~a and ~b be as in Theorem 8.3, and consider the sifted set U :“ px, ys X Sp~aq X T p~bq X V, where 20 V “ tn P Z : n ı 0 pmod pq for all p ď log x and z ă p ď x{4u. The elements of U, by construction, are not divisible by any prime in p0, log20 xs Y pz, x{4s. Thus, each element must either be a z- (i.e., a number with all prime factors at most z), or must consist of a prime greater than x{4, possibly multiplied by some additional primes that are all at least log20 x. However, from (8.3) we know that y “ opx log xq. Thus, we see that an element of U is either a z-smooth number or a prime in px{4, ys. In the second case, the element lies in Q X Sp~aq X T p~bq. Conversely, every element of Q X Sp~aq X T p~bq lies in U. Thus, U only differs from Q X Sp~aq X T p~bq by a set R consisting of z-smooth numbers in r1, ys. Let u :“ log y „ 5 log2 x . By Theorem 4.1 and (8.3), log z log3 x y x (8.6) #R ď Ψpy, zq ! ! . plog xq5`op1q log2 x Thus, we find that x #U ď p1 ` op1qq . 5 log x By matching each of these surviving elements to a distinct prime in px{4, x{2s and choosing congruence classes appropriately, we thus find congruence classes ap mod p for p ď x which cover all of the integers in px, ys. This proves Y pxq ě y ´ x “ p1 ´ op1qqy, and hence Theorem 8.2. 

8.2.1. The Westzynthius-Erdos-Rankin˝ argument giving (8.1) for some c ą 0. It is very easy to show that (8.5) holds for some value of c ą 0. Indeed, by the pigeonhole principle, for any finite set R and prime p there is a residue class ap so that |R X pap mod pq| ě |R|{p. Consequently, there are chocies of as for s P S and bp for p P P such that 1 1 # Q X Sp~aq X T p~bq ď |Q| 1 ´ 1 ´ s p sPS pPP ´ ¯ ź ˆ ˙ ź ˆ ˙ log x ! |Q| 2 log z 2 yplog2 xq cx ! 2 ď . plog xq log3 x log x Hence, if c is small enough, then (8.5) holds.

8.2.2. Improving the Westzynthius-Erdos-Rankin˝ method. We argue in two stages:

Stage 1. For each prime s P S, we select each as mod s uniformly at random from Z{sZ, independently for each s. Let ~a :“ pas mod sqsPS ; 102 KEVIN FORD

Stage 2. For each prime p P P, we select the residue class bp mod p also at random, but in a strategic way which is dependent on the choice of ~a; this is done in such a way so that each bp mod p covers many primes in Q left uncovered by Stage 1.

What we gain in Stage 1 is only what is typical for residue classes for these primes, but the random choice will be advantagoeus for Stage 2, which is much more complicated. Greatly improving upon arguments from Maier and Pomerance [96] and Pintz [106], we show in Stage 2 that for any fixed r, there are residue classes bp mod p for p P P which cover an average of at least r numbers left uncovered by Stage 1.

8.3. Concentration of Sp~aq. The sifted set Sp~aq is a random periodic subset of Z, each element surviving with probability

1 1 σ :“ 1 ´ “ 1 ´ . s s sPS 20 ź ˆ ˙ log źxăsďz ˆ ˙

From Mertens’ bound and (8.4),

logplog20 xq 100plog xq2 (8.7) σ „ “ 2 . log z log x log3 x

In particular, we have

x (8.8) #pQ X Sp~aqq “ pq P Sp~aqq “ σ#Q „ 100c . E P log x qPQ ÿ

We now show that Q X Sp~aq is concentrated about its mean. To accomplish this, we first show that for any reasonably sized integers n1, . . . , nt, the events ni P Sp~aq are close to being independent.

2 2 Lemma 8.4. Let t ď log x, and let n1, . . . , nt be distinct integers in r´x , x s. Then

1 t Ppn1, . . . , nt P Sp~aqq “ 1 ` O σ . log16 x ˆ ˆ ˙˙

mpsq Proof. For each s P S, the probability that n1, . . . , nt are all in Sp~aq is equal to 1 ´ t , where mpsq is the number of distinct residue classes modulo s occupied by n1, . . . , nt. We have mpsq “ t unless s divides 2 one of the numbers ni ´ nj for 1 ď i ă j ď t. Since |ni ´ nj| ď 2x , each difference ni ´ nj has Oplog xq prime factors. Therefore, mpsq ă t occurs for at most Opt2 log xq “ Oplog3 xq primes s P S. Byt the independence of the choices as for s P S, the events “tn1, . . . , ntu doesn’t intersect as mod s” are SIEVE METHODS LECTURE NOTES, SPRING 2020 103 independent. Thus, mpsq pn , . . . , n P Sp~aqq “ 1 ´ P 1 t s sPS ź ˆ ˙ t t ´1 mpsq “ 1 ´ 1 ´ 1 ´ s s s sPS ˆ ˙ sPS ˆ ˙ ˆ ˙ ź mźpsqăt 3 1 Oplog xq t “ 1 ` O 1 ´ log19 x s sPS ˆ ˆ ˙˙ ź ˆ ˙ 1 t2 “ 1 ` O σt 1 ` O log16 x s2 sPS ˆ ˆ ˙˙ ź ˆ ˆ ˙˙ 1 “ 1 ` O σt. log16 x  ˆ ˆ ˙˙ Corollary 8.5. With probability ě 1 ´ Op1{ log6 xq, we have 1 x (8.9) #pQ X Sp~aqq “ 1 ` O σ#Q „ 100c . log4 x log x ˆ ˆ ˙˙ Proof. From Lemma 8.4, we have 2 E #pQ X Sp~aqq “ Ppq1, q2 P Sp~aqq q1,q2PQ ` ˘ ÿ 1 “ 1 ` O σ#Q ` σ2p#Qqp#Q ´ 1q , log16 x ˆ ˆ ˙˙ ` q1“q2 q1‰q2 ˘ and so by (8.8), (8.3), (8.7), loomoon loooooooooomoooooooooon 2 2 2 2 2 x pσ#Qq E #pQ X Sp~aqq ´ σ#Q “ E#pQ X Sp~aqq ´ pσ#Qq ! ! . log16 x log14 x Combining this` last estimate with Chebyshev’s˘ inequality, we conclude that σ#Q x2{ log16 x 1 P |#pQ X Sp~aqq ´ σ#Q| ě ! ! . log4 x pσ#Qq2plog xq´8 log6 x  ˆ ˙ 8.4. The weight function wpp, nq. We will also choose the vector~b at random, but in a strategic way which is dependent on ~a. Each residue class bp mod p must cover many primes in Q (in fact, many primes in Q X Sp~aq), and accomplishing this is the key to success of the whole enterprise. This is done via showing the existence of a good “weight” function wpp, nq. Let k be a fixed positive integer, large in terms of the constant c (in fact, k “ exppc2q will do), and let ph1, . . . , hkq be a fixed admissible k-tuple of positive integers (that is, for any prime, ph1, . . . , hkq does not 2 2 2 X \ cover pZ{pZq). For instance, p1, 3 , 5 ,..., p2k ´ 1q q.

Theorem 8.6 (Existence of good sieve weight). Let k be a fixed positive integer and ph1, . . . , hkq a fixed admissible k´tuple. Suppose x is large and y is defined by (8.3). Then there are quantities τ, u satisfying (8.10) τ “ xop1q,u " log k px Ñ 8q and a non-negative weight function wpp, nq defined on P ˆ pr´y, ys X Zq satisfying 104 KEVIN FORD

‚ Uniformly for every p P P, one has y (8.11) wpp, nq „ τ k . nP log x ÿZ ‚ Uniformly for every q P Q and i “ 1, . . . , k, one has u x{2 (8.12) wpp, q ´ h pq „ τ . i k k pPP log x ÿ ‚ Uniformly for all p P P and n P Z, (8.13) wpp, nq ! xop1q px Ñ 8q.

Remark 2. One should think of wpp, nq as being a smoothed out indicator function for the event that n ` h1p, . . . , n ` hkp are all almost primes in r1, ys. It is thus natural to bring into play the technology from Section 7.

Proof. We first recall the construction of sieve weights from Section 7. Let N “ 2y.

1 ` Define s, R, D, z by (7.7) where θ “ 3 , define D as in (7.8), and let µ be an upper bound sieve guaranteed by the Fundamental Lemma (Theorem 2.19). Fix a prime p P P, and consider the forms

fi,ppmq “ m ` phip ´ 3yq p1 ď i ď kq, where 2y “ N ă m ď 2N “ 4y (so that hip ´ y ă fi,ppmq ď hip ` y). Here we write m “ n ` 3y, which maps p´y, yq to pN, 2Nq. Define E, E by (7.10), and define wpp, nq as in (7.12), that is, 2 ` 1 wpp, nq “ µ ptq λpdq dPE p´y ă n ď yq, t n h p n h p j:d n h p ˆ |p ` 1 ÿq¨¨¨p ` k q ˙ˆ @ jÿ| ` j ˙ where ξprq is defined by (7.36), and λpdq is defined from Lemma 7.11. Here F is a symmetric, smooth function defined on Rk, where Rk is defined in (7.34). Moreover, we choose F so that

MkpF q ě 0.9Mk ě p0.9 ´ op1qq log k by Theorem 7.17. Also, since

kpk´1q{2 E “ p phj ´ hiq , ˇ iăj ˇ ˇ ź ˇ ˇ 1 ˇ the hi are bounded and p ą x{2 ą R, the factorˇ dPE above is superfluousˇ and may be removed. By Proposition 7.14 (i), log z k wpp, nq “ wpp, m ` 3yq „ V p2yq e´γ IpF q, log R ´yănďy Nămď2N ÿ ÿ ˆ ˙ where IpF q is defined in (7.37) and ρpqq V “ 1 ´ , q qďz ź ˆ ˙ SIEVE METHODS LECTURE NOTES, SPRING 2020 105 where, for prime q ď z,

k ρpqq “ # n mod q : pn ` hjpq ” 0 pmod qq j“1 " ź * k “ # n mod q : pn ` hjq ” 0 pmod qq j“1 " ź * is independent of p (since q ă p). This proves (8.11) with log z k (8.14) τ “ 2V e´γplog xq IpF q “ xop1q. log R ˆ ˙ Next, fix a prime q P Q and an index i P t1, . . . , ku. Then 2 ` wpp, q ´ hipq “ 1p prime µ ptq λpdq . pPP x 2 p x ˜ t q h h p ¸˜ d q h h p j ¸ ÿ { ÿă ď | j‰ip ÿ`p j ´ iq q j | `p ÿj ´ iq @ ś The asymptotic (8.12) follows from Proposition 7.14 (ii) applied to the linear forms ajn ` bj, 1 ď j ď k, where ai “ 1, bi “ 0 and for j ‰ i, aj “ hj ´ hi and bi “ q. Here we have N “ x{2, and technically the R,D values used to construct wpp, nq with N “ x{2 differ from those defined with N “ 2y by a logarithmic factor. However, the proof of Theorem 7.14 (ii) is robust under this kind of slight tweaking of R and D. Also, the quantity E has prime factors which are either bounded or ą x and as before, the factor 1 dPE is superfluous. Also, |aj| ! 1 and q ď y ! x log x ! N log N, which are within the allowable bounds for Proposition 7.14 (ii). We also note that log R u “ M pF q " log k 2 log x k by Theorem 7.17. Thus, (8.10) follows. Finally, (8.13) since the definition of wpp, nq implies that wpp, nq is bounded by a divisor function. 

8.5. Strategic choice of ~b. Our goal is to choose residue classes bp modulo p P P such that bp mod p contains many elements of Q X Sp~aq. For each p P P, let n˜p denote the random integer with probability density wpp, nq (8.15) pn˜ “ nq :“ p´y ď n ď yq, P p w p, n1 n1PZ p q and chosen independently for each p P P. Noticeř that the random numbers n˜p are chosen independently of the vector ~a. Roughly speaking, this gives more weight to n for which many of the numbers n ` hip are prime. In order to capture the event that bp mod p contains many elements of Sp~aq, for each p P P and fixed (non-random) ~a, we consider the quantity

(8.16) Xpp~aq :“ Ppn˜p ` hip P Sp~aq for all i “ 1, . . . , kq, k over the random integer n˜. In light of Lemma 8.4, we expect that Xpp~aq „ σ for most choices of p and ~a, and this will be confirmed below (Lemma 8.8). With this in mind, let Pp~aq denote the set of all the primes 106 KEVIN FORD p P P such that k k σ (8.17) Xpp~aq ´ σ ď . log3 x ˇ ˇ ˇ ˇ We now define the random variables nˇ p. Supposeˇ we are in the event ~a “ ~a. If p P PzPp~aq, we set np “ 0. Otherwise, if p P Pp~aq, we define np to be the random integer with conditional probability distribution

Zpp~a; nq (8.18) Ppnp “ n|~a “ ~aq :“ , Xpp~aq where, for any ~a, any p P P and any n,

Ppn˜p “ nq if n ` hjp P Sp~aq for j “ 1, . . . , k (8.19) Zpp~a; nq “ #0 otherwise, with the np (p P Pp~aq) jointly independent, conditionally on the event ~a “ ~a. From (8.16) we see that these random variables are well defined. Observe that the support of np is contained in those n for which n`hip P Sp~aq for all i, that is, the residue class n mod p contains at least k elements of Sp~aq. Also, recalling Remark 1, we see that, conditionally on ~a “ ~a, np is very likely to be a number for which there are " log k of the numbers n ` h1p, . . . , n ` hkp which are prime (and hence in Q). Thus, the residue class np mod p will likely have many elements of Q X Sp~aq, as desired. Unlike n˜p, the random numbers np are very much dependent on the vector ~a. However, conditional on ~a “ ~a, all of the np (p P P) are independent. Our main objective is a concentration bound for an average of Zpp~a; q ´ hipq.

Lemma 8.7. Fix c, k, and let u be the value guaranteed by Theorem 8.6. Define Zpp~a; nq by (8.18). Then, as x Ñ 8, with probability 1 ´ op1q we have k u x u (8.20) σ´k Z p~a; q ´ h pq „ „ p i σ 2y 200c i“1 p P ~a ÿ Pÿp q for all but at most opx{ log xq of the primes q P Q X Sp~aq. Proof of Theorem 8.3 from Lemma 8.7. By Corollary 8.5 and Lemma 8.7, there is some vector ~a such that (8.9) holds and also (8.20) holds for almost all q P Q X Sp~aq. Fix this vector ~a (it is no longer random), and choose random integers np according to the laws (8.18). Suppose that q P Q X Sp~aq. Substituting definition (8.18) into the left hand side of of (8.20), using (8.17), and observing that q “ np ` hip is only possible if p P Pp~aq, we find that k k ´k ´k σ Zpp~a; q ´ hipq “ σ Xpp~aqPpnp “ q ´ hip|~a “ ~aq i“1 p P ~a i“1 p P ~a ÿ Pÿp q ÿ Pÿp q 1 k “ 1 ` O Ppnp “ q ´ hip|~a “ ~aq log3 x i“1 p P ~a ˆ ˆ ˙˙ ÿ Pÿp q 1 “ 1 ` O Ppq P epq, log3 x pPP ˆ ˆ ˙˙ ÿ SIEVE METHODS LECTURE NOTES, SPRING 2020 107 where ep “ tnp ` hip : 1 ď i ď ku X Q X Sp~aq. By (8.20), we conclude that ux u (8.21) pq P e q „ „ . P p 2σy 200c pPP ÿ Observe that each random set ep is contained in a single arithmetic progression modulo p. Now we set bp “ np mod p for each p P P. Then, for any q P Q X Sp~aq, by the independence of the np, ~ Ppq P T pbqq “ P pq ı bp pmod pq @p P Pq

“ p1 ´ Ppq ” bp pmod pqqq pPP ź ď p1 ´ Ppq P epqq (8.22) pPP ź ď exp ´ Ppq P epq ! pPP ) ÿ u “ exp ´ p1 ` op1qq . 200c ! ) Hence, by (8.9), 200cx u #pQ X Sp~aq X T p~bqq ď exp ´ . E log x 300c x ! ) The right hand side is ď 5 log x if k is large enough, thanks to (8.10) which states u " log k. Therefore, ~ there is some choice of the vector b so that (8.5) holds, and this completes the proof of Theorem 8.3. 

It remains to prove Lemma 8.7. We first confirm that PzPp~aq is small with high probability.

Lemma 8.8. With probability 1 O 1 log3 x , P ~a contains all but O 1 x of the primes p P. ´ p { q p q p log3 x log x q P 3 In particular, E#Pp~aq “ #Pp1 ` Op1{ log xqq.

Proof. It suffices to show that for each p P P, we have 1 (8.23) P pp P Pp~aqq “ 1 ´ O . log6 x ˆ ˙ From (8.23), we get #P x E p#PzPp~aqq “ P pp R Pp~aqq ! ! , log6 x log7 x pPP ÿ and then by Markov’s inequality,

x E p#PzPp~aqq 1 P #PzPp~aq ě ď ! . log4 x x{ log4 x log3 x ˆ ˙ We will prove (8.23) by computing first and second moments of Xpp~aq. Recall that, by (8.16),

Xpp~aq :“ 1n`hipPSp~aq @i Ppn˜p “ nq. n ÿ 108 KEVIN FORD

The right side is not random (unless we make ~a “ ~a random), since Ppn˜p “ nq is a deterministic function of n which is independent of ~a. Using Lemma 8.4,

EXpp~aq “ Ppn ` hip P Sp~aq for all i “ 1, . . . , kq Ppn˜p “ nq n (8.24) ÿ 1 k 1 k “ 1 ` O 16 σ Ppn˜p “ nq “ 1 ` O 16 σ . log x n log x ˆ ˆ ˙˙ ÿ ˆ ˆ ˙˙ Similarly,

2 EXpp~aq “ Ppnl ` hip P Sp~aq for 1 ď i ď k; l “ 1, 2qPpn˜p “ n1qPpn˜p “ n2q n ,n ÿ1 2 1 2k 2 “ 1 ` O σ ` O ypy{pq max pPpn˜p “ nqq , log16 x n ˆ ˆ ˙˙ ´ ¯ since

#tnl ` hip : i “ 1, . . . , k; l “ 1, 2u “ 2k unless n1 ” n2 pmod pq and there are Opypy{pqq such pairs pn1, n2q. From (8.15), (8.11), (8.13), and ´1`op1q ´op1q (8.10) one has Ppn˜p “ nq ! x for all p P P and n P Z. Also, σ " x by (8.7), hence

2 1 2k (8.25) EXpp~aq “ 1 ` O σ . log16 x ˆ ˆ ˙˙ Combining (8.24) and (8.25), we compute

2 2k k σ E Xpp~aq ´ σ ! . log16 x ˇ ˇ ˇ ˇ By Chebyshev’s inequality, for any p P Pˇ, ˇ

k 1 1 P pp R Pp~aqq “ P Xpp~aq ´ σ ě ! , log3 x log10 x ˆ ˙ ˇ ˇ which proves (8.23). ˇ ˇ 

Proof of Lemma 8.7. We first show that replacing Pp~aq with P has negligible effect on the sum, with high probability. The purpose is to set up an application of (8.12) and to decouple some expressions involving ~a. Fix i P t1, . . . , ku. By Lemma 8.4 and the definition (8.19) of Zpp~a,nq, we have

´k ´k E σ Zpp~a; nq “ σ Ppn˜p “ nqPpn ` hjp P Sp~aq for j “ 1, . . . , kq n pPP pPP n ÿ ÿ ÿ ÿ 1 “ 1 ` O Ppn˜p “ nq log16 x pPP n ˆ ˆ ˙˙ ÿ ÿ 1 “ 1 ` O #P. log16 x ˆ ˆ ˙˙ SIEVE METHODS LECTURE NOTES, SPRING 2020 109

Next, by (8.17) and Lemma 8.8 we have

´k ´k E σ Zpp~a; nq “ σ Pp~a “ ~aq Xpp~aq Ppnp “ n|~a “ ~aq n p P ~a ~a p P ~a n ÿ Pÿp q ÿ Pÿp q ÿ equals 1 1 looooooooooomooooooooooon “ 1 ` O Pp~a “ ~aq 1 log3 x ~a p P ~a ˆ ˆ ˙˙ ÿ Pÿp q 1 1 “ 1 ` O E #Pp~aq “ 1 ` O #P. log3 x log3 x ˆ ˆ ˙˙ ˆ ˆ ˙˙ Subtracting these two expectations, we conclude that

´k #P x (8.26) E σ Zpp~a; nq ! ! . log3 x log4 x n p P P ~a ÿ P ÿz p q

We substitute n “ q ´ hip and find that

k ´k ´k E σ Zpp~a; q ´ hipq ď E σ Zpp~a; nq qPQXSp~aq i“1 pPPzPp~aq n pPPzPp~aq ÿ ÿ ÿ xÿ ÿ ! . log4 x

By Markov’s inequality, with probability 1 ´ Op1{ log xq, we have

k ´k x σ Zpp~a; q ´ hipq ď . log3 x q Q S ~a i“1 p P P ~a P ÿX p q ÿ P ÿz p q Hence, with probability 1 ´ Op1{ log xq, we have

k 1 σ´k Z p~a; q ´ h pq ď p i log x i“1 p P P ~a ÿ P ÿz p q for all but Opx{ log2 xq primes q P Q X Sp~aq. Recalling our goal (8.20), it therefore suffices to show that with probability 1 ´ op1q, for all but at most opx{ log xq primes q P Q X Sp~aq, one has

k xu (8.27) F pq;~aq :“ σ´k Z p~a; q ´ h pq „ . p i 2σy i“1 pPP ÿ ÿ We accomplish this with another first-second moment calculation. First, we note that from Theorem 8.6, (8.11) and (8.12), we have u x (8.28) pq “ n˜ ` h pq „ pq P Q, 1 ď i ď kq. P p i k 2y pPP ÿ 110 KEVIN FORD

Hence, combining (8.28) with Lemma 8.4 and (8.15), we get

k ´k E F pq;~aq “ σ Ppq ` phj ´ hiqp P Sp~aq @jqPpn˜p “ q ´ hipq q Q S ~a qPQ i“1 pPP P ÿX p q ÿ ÿ ÿ 1 k “ 1 ` O Ppn˜p “ q ´ hipq log16 x qPQ i“1 pPP ˆ ˆ ˙˙ ÿ ÿ ÿ k ux σy xu „ σk „ . 2ky log x 2σy qPQ i“1 ÿ ÿ ˆ ˙ This matches what we want, since by corollary (8.5), #pQ X Sp~aqq „ σy{ log x with high probability. Similarly,

2 E F pq;~aq “ Ppq ` phj ´ hi` qp` P Sp~aq for j “ 1, . . . , k; ` “ 1, 2q qPQXSp~aq p1,p2PP i1,i2 ÿ qÿPQ ÿ

ˆ Ppn˜p1 “ q ´ hi1 p1qPpn˜p2 “ q ´ hi2 p2q σy ux 2 „ σk´1 , log x 2y ˆ ˙ where in the last step we used the fact that the terms with p1 “ p2 contribute negligibly (the argument is similar to that leading to (8.25)). Putting the first and second moment bounds together, and using (8.8), we get xu 2 xu xu 2 F pq;~aq ´ “ F pq;~aq2 ´ 2 F pq;~aq ` # pQ X Sp~aqq E 2σy E 2σy E 2σy E q Q S ~a q Q S ~a q Q S ~a P ÿX p q ˆ ˙ P ÿX p q P ÿX p q ˆ ˙ σy xu 2 “ o . log x 2σy ˜ ˆ ˙ ¸ xu Using Chebyshev’s inequality, we find that with probability 1 ´ op1q, F pq;~aq „ 2σy for all but opσy{ log xq primes q P Q X Sp~aq. Now σy{ log x — x{ log x, and the lemma follows. 

8.6. Remarks: quantitative improvements. The proof described above may be adapted to the case where k Ñ 8 (x Ñ 8). The relevant estimates needed for the analog of Theorem 8.6 may be found in [98]. The error terms corresponding to bounds for primes in progressions from the sum (8.12) need to be of the 2 form x{plog xq100k , and this is achieved (as in [98]) by a careful analysis of Siegel exceptional zeros. With k « plog xq1{5, the analog of Theorem 8.6 will have a factor u " log log x in (8.12). Inserted into the final estimate (8.22) in the proof of Theorem 2, we find that to succeed we need

u " c log c, which means that we can improve Y pxq be a factor " u{ log u (and hence Gpxq improved by a factor log u " log log u . In light of (8.21), however, we may expect an improvement of order " u for Y pxq, and of order " log u for Gpxq. This is achieved by dealing effectively with overlaps among the random sets ep, using techniques from hypergraph covering (§4-5 of [50]). SIEVE METHODS LECTURE NOTES, SPRING 2020 111

REFERENCES [1] L. M. Adleman and D. R. Heath-Brown, The first case of Fermat’s last theorem. Invent. Math. 79 (1985), no. 2, 409–416. [2] M. Agrawal, N. Kayal and N. Saxena, PRIMES is in P. Ann. of Math. (2) 160 (2004), no. 2, 781–793; errata: Ann. of Math. (2) 189 (2019), no. 1, 317–318. [3] W. R. Alford, A. Granville and C. Pomerance, There are infinitely many Carmichael numbers. Ann. of Math. 139 (1994), 703–722. [4] A. Balog, p ` a without large prime factors. Seminar on number theory, 1983–1984 (Talence, 1983/1984), Exp. No. 31, 5 pp., Univ. Bordeaux I, Talence, 1984. [5] Linear equations in primes. Mathematika 39 (1992), no. 2, 367–378. [6] R. C. Baker and G. Harman, The Brun-Titchmarsh theorem on average, (Proceedings in honor of ), Birkhauser, Boston, 1996, 39–103. [7] , Shifted primes without large prime factors, Acta Arith. 83 (1998), 331–361. [8] R. C. Baker, G. Harman and J. Pintz, The difference between consecutive primes. II., Proc. London Math. Soc. (3) 83 (2001), no. 3, 532–562. [9] W. Banks, K. Ford and T. Tao, Large prime gaps and probabilistic models, submitted. Arxiv: 1908.08613 [10] P. T. Bateman and R. A. Horn, Primes represented by irreducible polynomials in one variable, Proc. Sympos. Pure Math., Vol. VIII, Amer. Math. Soc., Providence, R.I. (1965), 119–132. [11] P. Billingsly, On the distribution of large prime divisors, Collection of articles dedicated to the memory of Alfred´ Renyi,´ I. Period. Math. Hungar. 2 (1972), 283–289. [12] E. Bombieri, On the large sieve. Mathematika 12 (1965), 201–225. [13] E. Bombieri and H. Davenport, Small differences between prime numbers. Proc. Roy. Soc. London Ser. A 293 (1966), 1–18. [14] E. Bombieri, J. Friedlander and H. Iwaniec, Primes in arithmetic progressions to large moduli. II, Math. Ann. 277 (1987), 361–393. [15] V. Y. Bouniakowsky, Nouveaux theor´ emes` relatifs a` la distinction des nombres premiers et a` la decomposition´ des entiers en facteurs,Mem.´ Acad. Sci. St. Petersbourg´ (6) (1857), 305–329. [16] V. Brun, Uber¨ das Goldbachsche Gesetz und die Anzahl der Primzahlpaare, Archiv for Math. og Naturvid. B 34 (1915), no. 8, 19pp. [17] V. Brun, Om fordelingen av primtallene i forskjellige talklasser. En ovre begrænsning, Nyt Tidsskr. f. Math. 27 B (1916), 45–58. [18] V. Brun, La serie´ 1/5+1/7+1/11+1/13+ 1/17+1/19+1/29+1/31+1/41+1/43+1/59+1/61+... ou` les denominateurs´ sont “nom- bres premiers jumeaux” est convergente ou finie, Bull. Sci. Math. (2) 43 (1919), 100–104, 124–128. [19] V. Brun, Le crible d’Eratosthene` et le theor´ eme` de Goldbach, Skr. Norske Vid.-Akad. Kristiania I. 1920, no. 3, 36 pp. [20] R. D. Carmichael , On Euler’s φ-function , Bull. Amer. Math. Soc. 13 (1907) , 241–243. [21] , Note on Euler’s φ-function , Bull. Amer. Math. Soc. 28 (1922) , 109–110. [22] A. C. Cojocaru and M. Ram Murty. An introduction to sieve methods and their applications. London Mathematical Society Student Texts, vol. 66. Cambridge University Press, 2006. [23] H. Cramer,´ Some theorems concerning prime numbers, Ark. Mat. Astr. Fys. 15 (1920), 1–33. [24] H. Cramer,´ On the order of magnitude of the difference between consecutive prime numbers, Acta Arith. 2 (1936), 396–403. [25] H. Davenport, Multiplicative number theory, 3rd ed., Graduate Texts in Mathematics vol. 74, Springer-Verlag, New York, 2000. [26] H. Diamond, H. Halberstam and W. F. Galway, A Higher-Dimensional Sieve Method: With Procedures for Computing Sieve Functions, Cambridge Tracts in Mathematics, vol. 177, 2008. [27] L. E. Dickson, A new extension of Dirichlet’s theorem on prime numbers, Messenger Math., 33 (1904), 155–161. [28] P. G. L. Dirichlet, P. G. L. Beweis des Satzes, dass jede unbegrenzte arithmetische Progression, deren erstes Glied und Dif- ferenz ganze Zahlen ohne gemeinschaftlichen Factor sind, unendlich viele Primzahlen enthalt¨ [Proof of the theorem that every unbounded arithmetic progression, whose first term and common difference are integers without common factors, contains infinitely many prime numbers], Abhandlungen der Koniglichen¨ Preußischen Akademie der Wissenschaften zu Berlin, 48 ( 1837), 45–71. [29] P. Donnelly and G. Grimmett, On the asymptotic distribution of large prime factors, J. London Math. Soc. (2) 47 (1993), 395–404. [30] P. D. T. A. Elliott and H. Halberstam, A conjecture in prime number theory, Symp. Math. 4 (1968), 59–72. [31] P. Erdos˝ , On the normal number of prime factors of p ´ 1 and some related problems concerning Euler’s φ-function , Quart. J. Math. Oxford 6 (1935), 205–213. [32] , On the difference of consecutive primes , Quart. J. Math. Oxford Ser. 6 (1935), 124–128. 112 KEVIN FORD

[33] , The difference of consecutive primes. Duke Math. J. 6 (1940), 438–441. [34] , Some remarks on Euler’s φ-function and some related problems , Bull. Amer. Math. Soc. 51 (1945), 540–544. [35] , On integers of the form 2k ` p and some related problems, Summa Brasil. Math. 2 (1950). 113–123. [36] , Some remarks on number theory, Riveon Lematematika 9 (1955), 45–48, (Hebrew. English summary). [37] , Some remarks on Euler’s φ-function , Acta Arith. 4 (1958), 10–19. [38] , An asymptotic inequality in the theory of numbers, Vestnik Leningrad. Univ. 15 (1960), no. 13, 41–49, (Russian). [39] , On the distribution of numbers of the form σpnq{n and on some related questions, Pacific J. Math. 52 (1974), 59–65. [40] P. Erdos˝ and R.R.Hall , On the values of Euler’s φ-function , Acta Arith. 22 (1973), 201–206. [41] , Distinct values of Euler’s φ-function , Mathematika 23 (1976), 1–3. [42] P. Erdos˝ and M. Kac, The Gaussian law of errors in the theory of additive number theoretic functions. Amer. J. Math. 62 (1940), 738–742. [43] P. Erdos˝ and C. Pomerance, On the normal number of prime factors of φpnq , Rocky Mountain J. of Math. 15 (1985), 343–352. [44] P. Erdos,˝ C. Pomerance, and A. Sark´ ozy,˝ On locally repeated values of certain arithmetic functions. III. Proc. Amer. Math. Soc. 101 (1987), no. 1, 1–7. [45] K. Ford, The distribution of totients, Ramanujan J. (Paul Erdos˝ memorial issue) 2 (1998), 67–151. [46] The number of solutions of φpxq “ m, Annals of Math. 150 (1999), 283–311. [47] The distribution of integers with a divisor in a given interval, Ann. Math. (2) 168 (2008), 367–433. [48] , Solutions of φpnq “ φpn ` kq and σpnq “ σpn ` kq, preprint, March 2020. arXiv:2002.12155 [49] K. Ford. B. Green, S. Konyagin, T. Tao, Large gaps between consecutive prime numbers, Ann. Math. 183 (2016), 935–974. [50] K. Ford. B. Green, S. Konyagin, J. Maynard and T. Tao, Long gaps betweenconsecutive prime numbers, J. Amer. Math. Soc., 31 (2018), no. 1, 65–105. [51] K. Ford and H. Halberstam, The Brun-Hooley sieve, J. Number Th. 81 (2000), 335–350. [52] K. Ford and S. Konyagin, On two conjectures of Sierpinski´ concerning the arithmetic functions σ and φ, Number Theory in Progress (Zakopane, Poland, 1997), vol. II, de Gruyter (1999), 795-803. [53] E.´ Fouvry, Theor´ eme` de Brun-Titchmarsh: application au theor´ eme` de Fermat. (French) [The Brun-Titchmarsh theorem: application to the Fermat theorem], Invent. Math. 79 (1985), no. 2, 383–407. [54] J. Friedlander, Shifted primes without large prime factors, in Number theory and applications (Banff, AB, 1988) , Kluwer Acad. Publ., Dorbrecht (1989), 393–401. [55] J. Friedlander and H. Iwaniec, The polynomial X2 ` Y 4 captures its primes Ann. of Math. (2), 148 (3) (1998), 945–1040. [56] The asymptotic sieve, Ann. of Math. (2), 148 (3) (1998), 1041–1065. [57] J. Friedlander and H. Iwaniec, Opera de Cribro, American Math. Soc., 2010. [58] M. Goldfeld, On the number of primes p for which p ` a has a large prime factor. Mathematika 16 (1969), 23–27. [59] D. Goldston, J. Pintz and C. Yıldırım, Primes in tuples. I, Ann. of Math. 170 (2009), no. 2, 819–862. [60] , Primes in tuples. II. Acta Math. 204 (2010), no. 1, 1–47. [61] D. Goldston, S. Graham, J. Pintz and C. Yıldırım, Small gaps between primes or almost primes, Trans. Amer. Math. Soc. 361 (2009), no. 10, 5285–5330. [62] , Small gaps between products of two primes, Proc. London Math. Soc. (3) 98 (2009), 741–774. [63] S. W. Graham, J. J. Holt and C. Pomerance, On the solutions to φpnq “ φpn ` kq. Number theory in progress, Vol. 2 (Zakopane-Koscielisko,´ 1997), 867–882, de Gruyter, Berlin, 1999. [64] A. Granville, Harald Cramer´ and the distribution of prime numbers, Scandanavian Actuarial J. 1 (1995), 12–28. [65] B. J. Green and T. C. Tao, The primes contain arbitrarily long arithmetic progressions, Ann. of Math. 167 (2008), 481–547. [66] , Linear equations in primes, Annals of Math. 171 (2010), no. 3, 1753–1850. [67] , The quantitative behaviour of polynomial orbits on nilmanifolds, Annals of Math. 175 (2012), no. 2, 465–540. [68] B. J. Green and T. C. Tao and T. Ziegler, An inverse theorem for the Gowers U 4-norm, Glasg. Math. J. 53 (2011), no. 1, 1–50. [69] , An inverse theorem for the Gowers U s`1rNs-norm, Annals of Math. 176 (2012), 1231–1372. [70] H. Halberstam and H.-E. Richert, Sieve Methods, Academic Press, London, 1974. [71] R. R. Hall, G. Tenenbaum, Divisors, Cambridge Tracts in mathematics vol. 90, 1988. [72] G. H. Hardy and J. E. Littlewood, Some problems of ‘partitio numerorum’; III: On the expression of a number as a sum of primes, Acta Math., 114 (3) (1923), 215–273. [73] , Some problems of ‘partitio numerorum’; VII., unpublished. [74] G. H. Hardy and S. Ramanujan, The normal number of prime factors of a number n , Quart. J. Math. 48 (1917), 76–92. [75] G. Harman, On the number of Carmichael numbers up to x. Bull. London Math. Soc. 37 (2005), no. 5, 641–650. [76] , Prime detecting sieves, London Math. Soc. monographs, 2006. [77] , Watt’s mean value theorem and Carmichael numbers. Int. J. Number Theory 4 (2008), no. 2, 241–248. SIEVE METHODS LECTURE NOTES, SPRING 2020 113

[78] D. R. Heath-Brown, Gaps between primes, and the pair correlation of zeros of the zeta function, Acta Arith. 41 (1982), no. 1, 85–99. [79] , The divisor function at consecutive integers Mathematika 31 (1984), no. 1, 141–149. [80] Artin’s conjecture for primitive roots, Quart. J. Math. Oxford Ser. (2) 37 (1986), no. 145, 27–38. [81] A. Hildebrand and G. Tenenbaum , Integers without large prime factors , J. Theor.´ Nombres Bordeaux 5 (1993), 411–484. [82] C. Hooley, On Artin’s conjecture, J. Reine Angew. Math. 225 (1967), 209–220. [83] , On the Brun-Titchmarsh theorem. J. Reine Angew. Math. 255 (1972), 60–79. [84] , On the largest prime factor of p ` a. Mathematika 20 (1973), 135–143. [85] , On the Brun-Titchmarsh theorem. II. Proc. London Math. Soc. (3) 30 (1975), 114–128. [86] Applications of Sieve Methods to the Theory of Numbers, Cambridge University Press, 1976. [87] On an almost-pure sieve, Acta Arith. LXVI (1994), 359–368. [88] H. Iwaniec, On the error term in the linear sieve. Acta Arith. 19 (1971), 1–30. [89] H. Iwaniec and E. Kowalski, Analytic number theory, Amer. Math. Soc. Colloquium Publications vol. 53, 2004. [90] R. Jajte, On random partitions of the segment, Bull. Acad. Polon. Sci. 19 (1971), 231–233. [91] Sungjin Kim, On the equations φpnq “ φpn ` kq and φpp ´ 1q “ φpq ´ 1q, preprint. [92] D. Koukoulopoulos, The distribution of prime numbers, Graduate Studies in Math. vol. 203, Amer. Math. Soc., 2019. [93] E. Landau, Neuer Beweis des Primzahlsatzes und Beweis des Primidealsatzes. Mathematische Annalen. 56 (4) (1903), 645– 670. [94] H. Maier, Small differences between prime numbers. Michigan Math. J. 35 (1988), no. 3, 323–344. [95] H. Maier and C. Pomerance , On the number of distinct values of Euler’s φ-function , Acta Arith. 49 (1988), 263–275. [96] , Unusually large gaps between consecutive primes. Trans. Amer. Math. Soc. 322 (1990), no. 1, 201–237. [97] J. Maynard, Small gaps between primes, Annals of Math. 181 (2015), 383–413. [98] J. Maynard, Dense clusters of primes in subsets, Compos. Math. 152 (2016), no. 7, to appear. [99] J. Maynard, Large gaps between primes, Ann. Math. 183 (2016), 915–933. [100] H. L. Montgomery and R. C. Vaughan, On the large sieve, Mathematika 20 (1973), 119–134. [101] Y. Motohashi, A note on the least prime in an arithmetic progression with a prime difference. Acta Arith. 17 (1970), 283–285. [102] Y. Motohashi and J. Pintz, A smoothed GPY sieve, Bull. Lond. Math. Soc. 40 (2008), no. 2, 298–310. [103] The Multiply Perfect Numbers Page, http://wwwhomes.uni-bielefeld.de/achim/mpn.html [104] The On-Line Encyclopedia of Integer Sequences, https://oeis.org/ [105] S. Pillai , On some functions connected with φpnq , Bull. Amer. Math. Soc. 35 (1929), 832–836. [106] J. Pintz, Very large gaps between consecutive primes. J. Number Theory 63 (1997), no. 2, 286–301. [107] P. Pollack and C. Pomerance, Some problems of Erdos˝ on the sum-of-divisors function, Trans. Amer. Math. Soc. Ser. B 3 (2016), 1–26. [108] D. H. J. Polymath, New equidistribution estimates of Zhang type, Algebra Number Theory 8 (2014), 2067–2199. See also http://michaelnielsen.org/polymath1/index.php?title=Bounded_gaps_between_primes [109] D. H. J. Polymath, Variants of the Selberg sieve, and bounded gaps between primes, Research in the Mathematical Sciences 1:12 (2014). [110] C. Pomerance, Popular values of Euler’s function. Mathematika 27 (1980), no. 1, 84–89. [111] , On the distribution of the values of Euler’s function , Acta Arith. 47 (1986), 63–70. [112] R. A. Rankin, The difference between consecutive prime numbers, J. London Math. Soc. 13 (1938), 242–247. [113] R. A. Rankin, The difference between consecutive prime numbers. V, Proc. Edinburgh Math. Soc. (2) 13 (1962/63), 331–332. [114] G. Ricci, Ricerche arithmetiche sui polinomi II (Intorno a una proposizione non vera di Legendre), Rend. Circ. Mat. di Palermo 58 (1934), 190–208. [115] N. P. Romanoff, Uber¨ einige Satze¨ der additiven Zahlentheorie, Math. Ann. 109 (1934), 668–678. [116] A. Schinzel , Sur l’equation φpxq “ m , Elem. Math. 11 1956, 75–78. [117] , Sur l’equation´ φpx ` kq “ φpxq.. (French) Acta Arith 4 (1958), 181–184. [118] , Remarks of the paper “Sur certaines hypotheses` concernant les nombres premiers” , Acta Arith. 7 (1961/62), 1–8. [119] A. Schinzel and W. Sierpinski,´ Sur certaines hypotheses` concernant les nombres premiers, Acta Arith., 4 (1958), 185–208. erratum, 5 (1959), p. 259. [120] A. Schinzel and A. Wakulicz, Sur l’equation´ φpx ` kq “ φpxq. II. (French) Acta Arith. 5 (1959), 425–426. [121] L. Shnirelmann, Uber¨ additive Eigenschaften von Zahlen, Math. Ann. 107 (1933), 649–690. [122] A. Schonhage,¨ Eine Bemerkung zur Konstruktion grosser Primzahllucken¨ , Arch. Math. 14 (1963), 29–30. [123] A. Selberg, The general sieve-method and its place in prime number theory. Proceedings of the International Congress of Mathematicians, Cambridge, Mass., 1950, vol. 1, pp. 286–292. Amer. Math. Soc., Providence, R. I., 1952. [124] A. Selberg, Lectures on sieves, A. Selberg’s collected papers, vol. II, Springer-Verlag, 1991, pp. 65–247. 114 KEVIN FORD

[125] W. Sierpinski,´ Sur une propriet´ e´ de la fonction φpnq. (French) Publ. Math. Debrecen 4 (1956), 184–185. [126] T. Oliveira e Silva, S. Herzog, S. Pardi, Empirical verification of the even Goldbach conjecture and computation of prime gaps up to 4 ˆ 1018, Math. Comp. 83 (2014), 2033–2060. [127] G. Tenenbaum, Introduction to Analytic and Probabilistic Number Theory, 3rd ed., Amer. Math Soc., 2015 [128] N. M. Timofeev, Hardy-Ramanujan and Halasz´ type inequalities for shifted prime numbers, Math. Notes 57 (1995), 522– 535. [129] E. C. Titchmarsh, A divisor problem, Rend. Circ. Mat. Palermo 54 (1930), 414–429. [130] Christian Tudesq. Majoration de la loi locale de certaines fonctions additives. Arch. Math. (Basel), 67(6):465–472, 1996. [131] E. Westzynthius, Uber¨ die Verteilung der Zahlen, die zu den n ersten Primzahlen teilerfremd sind, Commentationes Physico– Mathematicae, Societas Scientarium Fennica, Helsingfors 5, no. 25, (1931) 1–37. [132] E. Wirsing, Bemerkung zu der Arbeit uber¨ vollkommene Zahlen. (German) Math. Ann. 137 (1959), 316–318. [133] K. Wooldridge, Values taken many times by Euler’s phi-function. Proc. Amer. Math. Soc. 76 (1979), no. 2, 229–234. [134] T. Yamada, On equations σpnq “ σpn ` kq and φpnq “ φpn ` kq. J. Comb. Number Theory 9 (2017), no. 1, 15–21. [135] Yitang Zhang, Bounded gaps between primes. Annals of Mathematics 179 (2014), 1121–1174.

DEPARTMENT OF MATHEMATICS, 1409 WEST GREEN STREET,UNIVERSITYOF ILLINOIS AT URBANA-CHAMPAIGN, URBANA, IL 61801, USA Email address: [email protected]