# Bounded gaps between products of distinct primes

## Abstract

Let $$r \ge 2$$ be an integer. We adapt the Maynard–Tao sieve to produce the asymptotically best-known bounded gaps between products of r distinct primes. Our result applies to positive-density subsets of the primes that satisfy certain equidistribution conditions. This improves on the work of Thorne and Sono.

## Introduction

One of the most famous conjectures in mathematics is the twin prime conjecture, which states that

\begin{aligned} \liminf _{n \rightarrow \infty } (p_{n+1} - p_n) = 2, \end{aligned}

where $$p_i$$ denotes the i-th prime. The numerical evidence for this conjecture is striking because the average value of $$p_{n+1} - p_n$$ is known to grow arbitrarily large; specifically, the prime number theorem implies that the difference is $${\sim }{\log p_n}$$ on average. One of the first significant advances toward the twin prime conjecture is due to Chen Jingrun , who proved in 1973 that there are infinitely many primes p such that $$p+2$$ is a product of at most two primes.

In another direction, Goldston, Graham, Pintz, and Yıldırım (whom we will refer to as “GGPY”) considered the problem of proving a finite bound for gaps between primes. In 2005, Goldston, Pintz, and Yıldırım  used the Selberg sieve to prove that

\begin{aligned} \liminf _{n \rightarrow \infty } \frac{p_{n+1} - p_n}{\log p_n} = 0. \end{aligned}
(1.1)

GGPY  gave an alternative proof of (1.1) that also used a variant of Selberg’s sieve weights. These methods rely on the Bombieri–Vinogradov theorem, an equidistribution result stating that

\begin{aligned} \sum _{q \le x^\theta } \max _{(a,q) = 1} \left| \pi (x;q,a) - \frac{1}{\phi (q)}\pi (x)\right| \ll \frac{x}{(\log x)^A} \end{aligned}
(1.2)

for any $$A>0$$ and $$\theta < \frac{1}{2}$$, where

\begin{aligned} \pi (x) := \# \{p \text { prime} :p \le x\} \text { and } \pi (x;q,a) := \#\{p \text { prime} :p \le x, p \equiv a \pmod q\}. \end{aligned}

We say that $$\theta >0$$ is a level of distribution if (1.2) holds for any $$A>0$$. Also, these methods conditionally prove bounded gaps between the primes, i.e, a finite bound for

\begin{aligned} \liminf _{n \rightarrow \infty }(p_{n+1} - p_n), \end{aligned}

under the assumption that there exists a level of distribution $$\theta > \frac{1}{2}$$.

The GGPY approach can be applied to gaps between products of primes. Let $$\mathbb {P}$$ be the set of all primes, and consider a subset $$\mathcal {P}\subseteq \mathbb {P}$$. Let $$E_{r}(\mathcal P)$$ denote the set of positive integers that are products of r distinct primes in $$\mathcal P$$. GGPY  proved that

\begin{aligned} \liminf _{n \rightarrow \infty } (q_{n+1} - q_n) \le 6, \end{aligned}

where $$q_i$$ denotes the i-th number in $$E_2(\mathbb P)$$. Subsequently, Thorne  extended their method to prove the existence of bounded gaps between any number of consecutive $$E_r(\mathbb P)$$ numbers for any $$r \ge 2$$. In fact, Thorne’s result extends to $$E_r(\mathcal P)$$ for subsets $$\mathcal P$$ of the primes satisfying certain equidistribution conditions, thus yielding a number of intriguing consequences in the context of multiplicative number theory. For instance, for an elliptic curve $$E/\mathbb Q$$ given by the equation

\begin{aligned} E :y^2=x^3+ax^2+bx+c \end{aligned}

and a fundamental discriminant D, let

\begin{aligned} E(D) :Dy^2=x^3+ax^2+bx+c \end{aligned}

denote the D-quadratic twist of E. Thorne proved in [14, Theorem 1.2] that if E has no 2-torsion, then there are bounded gaps between squarefree fundamental discriminants for which E(D) has Mordell–Weil rank 0 and its Hasse–Weil L-function satisfies $$L(1,E(D)) \ne 0$$. Another corollary, [14, Corollary 1.3], states that there are bounded gaps between $$E_2(\mathbb P)$$ numbers pq such that the class group $${\text {Cl}}(\sqrt{-pq})$$ contains an element of order 4. In 2014, Chung and Li  proved an analogous and quantitatively stronger bound for the size of the gaps in the above results for squarefree numbers whose prime divisors are all in $$\mathcal {P}$$ instead than $$E_r(\mathcal {P})$$ numbers.

In 2013, Zhang  unconditionally proved that

\begin{aligned} \liminf _{n \rightarrow \infty } (p_{n+1} - p_n) < 7 \cdot 10^7 \end{aligned}

by finding a suitable modification of (1.2) that holds for $$\theta > \frac{1}{2}$$. Zhang’s result, while groundbreaking, cannot be easily extended to subsets of primes. Later that year, Maynard  (and Tao independently) developed a further refinement of the Selberg sieve to show that

\begin{aligned} \liminf _{n \rightarrow \infty } (p_{n+m} - p_n) \ll m^3 \exp (4m). \end{aligned}

Moreover, this refinement produces bounded gaps between primes with any level of distribution $$\theta > 0$$. This suggests that the Maynard–Tao sieve can be adapted to study gaps between primes in special subsets. In particular, Thorner  extended the methods in  to show that there exist bounded gaps between primes in Chebotarev sets. There are a number of interesting number-theoretic consequences for ranks of elliptic curves, Fourier coefficients of modular forms, and primes represented by binary quadratic forms.

Sono  used the Maynard–Tao sieve to improve the bound given by  for the gaps between products of two primes. Specifically, he showed that for every $$\varepsilon > 0$$,

\begin{aligned} \liminf _{n \rightarrow \infty } (q_{n+m} - q_{n}) \ll \exp \left( \frac{(4+\varepsilon )m}{3\log m}\right) \end{aligned}

holds for sufficiently large m in terms of $$\varepsilon$$. Moreover, Neshime [12, Remark 7.1] was able to modify Sono’s methods to show an even stronger bound of

\begin{aligned} \liminf _{n \rightarrow \infty } (q_{n+m} - q_{n}) \ll \sqrt{m}\exp \left( 4\sqrt{m}\right) . \end{aligned}
(1.3)

In this paper, we adapt the arguments in  and  to prove bounded gaps between consecutive $$E_r(\mathcal P)$$ numbers for any $$r \ge 2$$ and infinite subset $$\mathcal P \subseteq \mathbb P$$ satisfying the equidistribution conditions defined below. Let

\begin{aligned} \pi _{\mathcal {P}}(x) := \sum _{ \begin{array}{c} p \le x \\ p \in \mathcal {P} \end{array}} 1,\quad {\text {and}}\quad \pi _{\mathcal {P}}(x;q,a) := \sum _{ \begin{array}{c} p \le x \\ p \in \mathcal {P} \\ p \equiv a \pmod q \end{array}} 1. \end{aligned}

Let $$\delta = \delta (\mathcal {P})$$ denote the density of $$\mathcal {P}$$ in the set of all primes, i.e,

\begin{aligned} \pi _{\mathcal {P}}(x) = (1 + o(1)) \frac{\delta x}{\log x}. \end{aligned}
(1.4)

For $$\mathcal {P}$$ such that $$\delta (\mathcal {P}) > 0$$, we say that $$\mathcal {P}$$ satisfies a Siegel–Walfisz condition if there exists a squarefree positive integer $$B = B(\mathcal {P})$$ such that for all $$(q, B) = 1$$ and $$(a, q) = 1$$,

\begin{aligned} \left| \pi _{\mathcal {P}}(x; q, a) - \frac{1}{\phi (q)}\pi _{\mathcal {P}}(x) \right| \ll \frac{x}{(\log x)^A} \end{aligned}
(1.5)

holds for any $$A>0$$. Finally, for $$\mathcal {P}$$ that satisfies a Siegel–Walfisz condition, we say that $$\mathcal {P}$$ has level of distribution $$\theta > 0$$ if

\begin{aligned} \sum _{\begin{array}{c} q < x^{\theta } \\ (q, B) = 1 \end{array}} \max _{(a, q) = 1} \left| \pi _{\mathcal {P}}(x; q, a) - \frac{1}{\phi (q)}\pi _{\mathcal {P}}(x) \right| \ll \frac{x}{(\log x)^A} \end{aligned}
(1.6)

holds for any $$A > 0$$, with the implied constant depending on A. For the purposes of our paper, assume that $$\theta < \frac{1}{2}$$ throughout.

Define a set of linear forms $$n+h_1, \ldots , n+h_k$$ to be admissible if for every prime $$\ell$$, there exists an integer $$n_\ell$$ such that

\begin{aligned} \ell \not \mid \prod _{i=1}^k (n_\ell +h_i). \end{aligned}

We now state our main theorem in the context of admissible sets of linear forms $$n+h_1, \ldots , n+h_k$$ that are guaranteed to contain at least m $$E_r(\mathcal P)$$ numbers, for infinitely many n.

### Theorem 1.1

Suppose that a subset $$\mathcal {P}$$ of the primes has positive density $$\delta = \delta (\mathcal P)$$ in the set of all primes, satisfies a Siegel–Walfisz condition as in (1.5), and has a positive level of distribution as in (1.6), with $$B = B(\mathcal P)$$ defined accordingly. There exists a constant $$C(r,m,\mathcal P)$$, depending only on rm,  and $$\mathcal P$$, such that for any admissible set of linear forms $$\{n + h_1, \ldots , n + h_k\}$$ satisfying $$k > C(r, m, \mathcal {P})$$, it holds for infinitely many positive integers n that at least m of $$n + h_1, \ldots , n + h_k$$ are $$E_r(\mathcal {P})$$ numbers.

Note that the explicit value for the constant $$C(r,m,\mathcal P)$$ is given in (2.1).

From Theorem 1.1, we obtain bounded gaps for an arbitrary number of $$E_r(\mathcal P)$$ numbers.

### Corollary 1.2

Let $$a_{i}$$ denote the i-th $$E_r(\mathcal P)$$ number. Then, there exists a constant $$C(r,m,\mathcal P)$$, depending only on rm,  and $$\mathcal P$$, such that

\begin{aligned} \liminf _{n \rightarrow \infty } (a_{n+m} - a_{n}) < C(r,m,\mathcal P). \end{aligned}

The explicit value for the constant $$C(r,m,\mathcal P)$$ of this context is given in (2.2).

When r is fixed and m is large, our result improves on the work of , thus yielding improved effective constants in the contexts described in [14, Section 1].

### Corollary 1.3

Let $$K/\mathbb Q$$ be a Galois extension, and $$r \ge 2$$ be an integer. Then, there exists an effectively computable constant C(rmK) such that there are infinitely many nonconjugate m-tuples of ideals $$\mathfrak a_1,\ldots ,\mathfrak a_m$$ whose norms are $$E_r(\mathbb P)$$ numbers that are simultaneously contained in an interval of length C(rmK).

### Proof

Apply Theorem 1.2 to the Chebotarev set of primes that are inert in K. $$\square$$

### Corollary 1.4

Let $$E/\mathbb Q$$ be an elliptic curve without 2-torsion. Then, there exists an effectively computable squarefree integer $$N_E$$ such that the following holds: For every $$r\ge 1$$, there exists an effective constant C(rmE) such that there are infinitely many m-tuples of $$E_{2r}(\mathbb P)$$ numbers $$b_1< \cdots < b_{m}$$ for which

1. (1)

$$L\left( 1,E\left( N_E \cdot b_i\right) \right) \ne 0$$ for all $$1 \le i \le m$$,

2. (2)

$${\text {rank}}E\left( N_E \cdot b_i\right) = 0$$ for all $$1 \le i \le m$$, and

3. (3)

$$b_{m}-b_1< C(r,m,E)$$.

### Proof

For each $$E/\mathbb Q$$, one can apply Theorem 1.2 to a proof analogous to that of [14, Section 6], which computes the constants for the elliptic curve $$X_0(11):y^2 =x^3-4x^2-160x-1264$$. The computations rely on the work of Ono  and the Bombieri–Vinogradov-type result of Murty and Murty . $$\square$$

### Corollary 1.5

Let $$r \ge 2$$ be an integer. There exists an effectively computable constant C(rm) such that there are infinitely many m-tuples of $$E_r(\mathbb P)$$ numbers $$d_1< \cdots < d_m$$ such that the following hold:

1. (1)

The class group $${\text {Cl}}\left( \mathbb Q(\sqrt{-d_i})\right)$$ has an element of order 4 for all $$1 \le i \le m$$.

2. (2)

$$d_m-d_1< C(r,m)$$.

### Proof

Soundararajan  has proved that for any squarefree $$d \equiv 1 \pmod 8$$ whose prime factors are congruent to either 1 or $$-1 \pmod 8$$, the class group $${\text {Cl}}\left( \mathbb Q(\sqrt{-d})\right)$$ contains an element of order 4. Our corollary then follows immediately from applying Theorem 1.2 to $$\mathcal P = \{p \in \mathbb P:p \equiv 1 \pmod 8\}$$. $$\square$$

In , Thorne proved in the contexts of Corollaries 1.3, 1.4, and 1.5, we can take the constants $$C(r, m, K) = C(r, K) \exp \left( m^{\frac{1}{r-2}}\right)$$, $$C(r, m, E) = C(r, E) \exp \left( m^{\frac{1}{r-2}}\right)$$, and $$C(r, m) = C(r) \exp \left( m^{\frac{1}{r-2}}\right)$$, respectively. When r is fixed and m is large, we improve these bounds to $$C(r, m, K) = C(r, K) m^{\frac{1}{r}} \exp \left( m^{\frac{1}{r}}\right)$$, $$C(r, m, E) = C(r, E) m^{\frac{1}{r}} \exp \left( m^{\frac{1}{r}}\right)$$, and $$C(r, m) = C(r) m^{\frac{1}{r}} \exp \left( m^{\frac{1}{r}}\right)$$, respectively. We note that these bounds are not as strong as those obtained by Chung and Li in  when considering square-free numbers with no restriction on the number of prime factors.

In Sect. 2, we list the definitions and notations we will be using, state a precise version of our main result, and give an outline of our proof. Then, in Sect. 3, we prove a version of the Bombieri–Vinogradov theorem for $$E_r(\mathcal P)$$ numbers. We then use this result to prove our main theorem in the course of Sects. 4, 5, 6, and 7. Finally, in Sect. 8, we explicitly compute the constant given in Corollary 1.5 for $$r=2$$ and arbitrary m, which shows a concrete application of our asymptotically improved result on bounded gaps.

## Preliminaries

We detail below the equidistribution properties that we will assume for our infinite subset $$\mathcal {P} \subset \mathbb P$$, for which we will show that the gap between m consecutive $$E_r(\mathcal P)$$ is bounded infinitely often.

### Definitions and notations

All sums, products, and maxima are taken with the variables ranging over the positive integers $$\mathbb N$$. The exception to this will be that variables denoted by p or $$p_i$$ will be assumed to be taken over $$\mathcal P$$, and the variable $$\ell$$ will be assumed to be taken over $$\mathbb P$$. For the purposes of our paper, the level of distribution $$\theta$$ is assumed to be less than 1 / 2. Throughout the proof, we work with a fixed admissible set of k distinct linear forms $$\mathcal H$$, and without loss of generality assume that $$h_1< \cdots < h_k$$.

We let $$\phi$$ denote the Euler’s totient function, $$\mu$$ the Möbius function, and $$\tau _u$$ the function given by the number of distinct ways a number can be written as a product of u ordered positive integers. For two positive integers ab, we let (ab) denote their greatest common divisor and [ab] their least common multiple. The exception to this is in Sect. 3, where [ab] will denote the closed interval with endpoints a and b.

We fix $$r \ge 2$$, and for a given N, we further restrict our consideration to products of r distinct primes in $$\mathcal P$$ such that the prime factors satisfy a size constraint in terms of N. Specifically, for every $$1 \le h \le r$$, let $$E_h := \{p_1 \ldots p_h :N^\eta \le p_1< \cdots < p_h \text { and } N^{\frac{1}{2}} \le p_h\}$$, where $$0< \eta < \frac{1}{r}$$ is fixed. We note that the definition of $$E_h$$ has an implicit dependence on N. Furthermore, let $$\beta _h$$ be the indicator function for $$E_h$$, i.e,

\begin{aligned} \beta _h(n) = {\left\{ \begin{array}{ll} 1 &{} \text {if} \ \ ~n \in E_h \\ 0 &{} \text { otherwise.} \\ \end{array}\right. } \end{aligned}

All asymptotic notations from this point onward, such as oO,  and $$\ll$$, are to be interpreted as $$N \rightarrow \infty$$; in particular, the implied constants may depend on $$k, r, \eta ,$$ and $$\mathcal H$$. We will in multiple instances let $$\varepsilon , \epsilon ,$$ and $$\epsilon _1$$ denote positive real numbers that one can take to be sufficiently small.

### Statement of precise results

We now state a precise version of our main theorem.

### Theorem 2.1

Suppose that a subset $$\mathcal {P}$$ of the primes has positive density $$\delta = \delta (\mathcal P)$$ in the set of all primes, satisfies a Siegel–Walfisz condition as in (1.5), and has a positive level of distribution as in (1.6), with $$B = B(\mathcal P)$$ defined accordingly. Let $$\theta _1>0$$ be a level of distribution for $$\mathcal {P}$$, and let $$\theta := \min \left( \frac{1}{2}, \theta _1\right)$$. Let $$m \ge 2$$ be a positive integer, and let $$\{ n + h_1, n + h_2, \dots , n + h_k \}$$ be a admissible tuple of linear forms. Then for infinitely many positive integers n, at least m of $$n+h_1, \dots , n+h_k$$ are $$E_r(\mathcal {P})$$ numbers, given that

\begin{aligned} k > \exp \left( r+\frac{r}{\delta }\left( \frac{2B(m-1)(r-1)!}{\phi (B)\theta (r-1)^{r-1}}\right) ^\frac{1}{r}\right) . \end{aligned}
(2.1)

### Remark

For $$\mathcal P = \mathbb P$$, we have $$\delta = 1$$, $$B=1$$, and $$\theta _1 = \frac{1}{2}- \varepsilon$$ for all small $$\varepsilon$$.

Given this theorem, we easily obtain a corollary about bounded gaps between $$E_r(\mathcal {P})$$ numbers.

### Corollary 2.2

Suppose that a subset $$\mathcal {P}$$ of the primes has positive density $$\delta = \delta (\mathcal P)$$ in the set of all primes, satisfies a Siegel–Walfisz condition as in (1.5), and has a positive level of distribution as in (1.6), with $$B = B(\mathcal P)$$ defined accordingly. Let $$\theta _1>0$$ be a level of distribution for $$\mathcal {P}$$, and let $$\theta := \min \left( \frac{1}{2}, \theta _1\right)$$. Then, for $$r \ge 2$$,

\begin{aligned} \liminf _{n \rightarrow \infty } (a_{n+m} - a_{n}) \ll \mathcal L \log L, \end{aligned}
(2.2)

where $$a_{n}$$ denotes the n-th $$E_{r}(\mathcal {P})$$ number,

\begin{aligned} \mathcal L = \exp \left( r+\frac{r}{\delta }\left( \frac{2Bm(r-1)!}{\phi (B)\theta (r-1)^{r-1}}\right) ^\frac{1}{r}\right) . \end{aligned}

### Proof

In Theorem 2.1, we can let $$h_i$$ be the i-th prime greater than k for $$1 \le i \le k.$$ It is easy to verify that $$\{n + h_1, n + h_2, \ldots , n + h_k\}$$ is an admissible tuple of linear forms, and that $$h_k - h_1 \ll \mathcal {L} \log \mathcal {L}.$$ $$\square$$

### Remark

A computation using the results of Theorem 2.1 and Corollary 2.2 are done in Sect. 8.

### Outline of proof

As in , let $$D_0 = \log \log \log N$$. Let

\begin{aligned} W = \prod _{\begin{array}{c} \ell < D_0 \end{array}} \ell . \end{aligned}

Note then that $$W \ll (\log \log N)^2$$. For sufficiently large N, $$B \mid W$$, so we can define $$U = \frac{W}{B}$$. For each prime $$\ell \mid U$$, choose a residue class $$v_{\ell } \pmod \ell$$ such that

\begin{aligned} \left( \ell , \prod _{i = 1}^k (v_{\ell }+h_i)\right) = 1. \end{aligned}

By the Chinese remainder theorem, we can then choose a residue class $$v_0$$ of U such that

\begin{aligned} \left( U, \prod _{i = 1}^k (v_0+h_i)\right) = 1. \end{aligned}

For $$\rho > 0$$, define

\begin{aligned} S(N, \rho ) := \sum _{\begin{array}{c} N \le n < 2N \\ n\equiv v_0 \pmod U \end{array}} \left( \left( \sum _{i=1}^k \beta _r(n+h_i)\right) - \rho \right) w_n, \end{aligned}
(2.3)

where $$w_n$$ are nonnegative weights. Suppose we can show $$S(N,\rho ) > 0$$. Then, at least one summand in the sum over n must be positive; for this value of n, at least $$\left\lfloor \rho \right\rfloor + 1$$ of $$n+h_1, \ldots , n+h_k$$ are in $$E_r$$, as desired. It remains to show that for some choice of $$w_n$$, $$S(N, \rho ) > 0$$ for all sufficiently large N. Let $$R := N^{\frac{\theta }{2} - \epsilon }$$. We will choose $$w_n$$ to be the Maynard–Tao weights:

\begin{aligned} w_n := \left( \sum _{d_i \mid n+h_i} \lambda _{d_1, \ldots , d_k} \right) ^2, \end{aligned}
(2.4)

where $$\lambda _{d_1, \ldots , d_k}$$ is supported on $$d_1, \ldots , d_k$$ for which $$\prod _{i=1}^k d_i < R$$, $$(d_i, W) = 1$$ for $$1 \le i \le k$$, and $$\mu ^2\big (\prod _{i = 1}^k d_i\big ) = 1$$. We will defer our specific choice of $$\lambda _{d_1, \ldots , d_k}$$ to be optimized later.

We can write $$S(N,\rho ) = S_2 - \rho S_1$$ for

\begin{aligned} S_1&:= \sum _{\begin{array}{c} N \le n< 2N \\ n \equiv v_0 \pmod {U} \end{array}} \left( \sum _{d_i \mid n + h_i} \lambda _{d_1, \ldots , d_k} \right) ^2, \\ S_2^{(m)}&:= \sum _{\begin{array}{c} N \le n < 2N \\ n \equiv v_0 \pmod {U} \end{array}} \left( \sum _{d_i \mid n + h_i} \lambda _{d_1, \ldots , d_k} \right) ^2 \beta _r(n + h_m), \\ S_2&:= \sum _{m = 1}^{k} S_2^{(m)}. \end{aligned}

We will now show that $$S_2 - \rho S_1 > 0$$ for all sufficiently large N for some choice of $$\lambda _{d_1,\ldots ,d_k}$$.

### Proposition 2.3

Let F be a smooth function supported on

\begin{aligned} \mathcal {R}_{k, \eta } := \{ (x_1,\ldots , x_k)\in [0, 1]^k :x_i \le \frac{2\eta }{\theta }, \sum _{i = 1}^{k} x_i \le 1 \}. \end{aligned}

There exists a corresponding choice of $$\lambda _{d_1,\ldots ,d_k}$$ such that

\begin{aligned} S_1 = (1 + o(1)) \frac{\phi (W)^k BN (\log R)^k}{W^{k + 1}} I_k(F), \end{aligned}
(2.5)

and

\begin{aligned} S_2^{(m)} = (1 + o(1))\frac{\mathcal {T}_N\phi (B)\phi (W)^k(\log R)^{k + 1}}{W^{k + 1}}J_k^{(m)}(F). \end{aligned}
(2.6)

Here,

\begin{aligned} I_k(F) := \int _{0}^{1} \ldots \int _{0}^{1} F(t_1, \ldots , t_k)^2 dt_1 \ldots dt_k, \end{aligned}
\begin{aligned} J_k^{(m)}(F) := \int _{0}^{1} \ldots \int _{0}^{1} \left( \int _{0}^1 F(t_1, \ldots , t_k) dt_m \right) ^2 dt_1 \ldots dt_{m-1} dt_{m+1} \ldots dt_k, \end{aligned}

and where $$X_n := \sum _{n \le t < 2n} \beta _1(t)$$ and $$\sum ^{\dagger }$$ denotes the restriction that $$q = p_1 \ldots p_{r-1} < N^{\frac{1}{2}}$$ such that $$N^\eta \le p_1< \cdots < p_{r-1}$$. Furthermore, for $$0< \eta < \frac{1}{2(r-1)}$$, we have

\begin{aligned} \mathcal {T}_N \ge (1+o(1))\frac{\delta ^r N}{(\log N)(r-1)!}\left( \log \frac{1}{2(r-1)\eta } \right) ^{r-1}. \end{aligned}
(2.7)

The proof of Proposition 2.3 depends on a Bombieri–Vinogradov-type result, proved in Sect. 3:

### Theorem 2.4

Under the hypotheses of Theorem 2.1 on $$\mathcal {P}$$, the following inequality holds for any integer $$r \ge 2$$, $$u \in \mathbb R$$, and $$A>0$$:

\begin{aligned} \sum _{\begin{array}{c} q \le N^{u\left( \frac{1}{2} - \epsilon \right) } \\ (q, B) = 1 \end{array}} \max _{(a, q) = 1} \left| \sum _{n < N^u} \left( \frac{1}{\phi (q)} \beta _r(n; q) - \beta _r(n; q, a) \right) \right| \ll \frac{N^u}{(\log N)^A}, \end{aligned}

where $$\beta _r(n; q, a)$$ denotes $$\beta _r$$ supported only on $$x \equiv a \pmod {q}$$, $$\beta _r(n; q)$$ denotes $$\beta _r$$ supported only on $$(n, q) = 1$$, and the implied constant depends only on u and A.

(2.5) was proved in . We will prove (2.6) in Sects. 4, 5, and 6.

### Proposition 2.5

Retain the hypotheses on $$\mathcal P$$ in Theorem 2.1, and let $$\mathcal H$$ be an admissible set of k distinct linear forms given by $$n+h_1, \ldots , n+h_k$$. Let $$\mathcal {S}_{k,\eta }$$ denote the space of smooth functions $$F :[0,1]^k \rightarrow \mathbb R$$ supported on $$\mathcal {R}_{k,\eta }$$, with $$I_k(F) \ne 0$$ and $$J_k^{(m)}(F)\ne 0$$ for $$1 \le m \le k$$. Define

\begin{aligned} M_{k,\eta } := \sup _{F \in \mathcal {S}_{k,\eta }} \frac{J_k^{(m)}(F)}{I_k(F)} \quad \text {and}\quad \nu = \nu _{k,\eta } := \left\lceil \frac{\theta \phi (B)\delta ^r M_{k,\eta }}{2B(r-1)!}\left( \log \frac{1}{2(r-1)\eta } \right) ^{r-1}\right\rceil \end{aligned}

Then, there are infinitely many $$n \in \mathbb N$$ such that at least $$\nu$$ of the numbers $$n+h_i$$ are in $$E_r$$. In particular,

\begin{aligned} \liminf _{n \rightarrow \infty } (a_{n+\nu -1} - a_{n}) \le h_k - h_1. \end{aligned}

### Proof

As defined before, $$S(N, \rho ) = S_2- \rho S_1$$. By the definition of $$M_{k,\eta }$$, there exists $$F \in \mathcal {S}_{k,\eta }$$ such that $$\sum _{m=1}^k J_k^{(m)}(F) > (M_{k, \eta } - \epsilon _1) I_k(F)$$. We assume that $$\epsilon _1$$ is sufficiently small so that $$(M_{k, \eta } - \epsilon _1) I_k(F) > 0$$. Therefore, by Proposition 2.3, there exists a choice of weights $$\lambda _{d_1, \dots , d_k}$$ such that $$S(N, \rho )$$ is

\begin{aligned}&\ge \frac{\phi (W)N(\log R)^k}{W^{k+1}} \left( \frac{(1+o(1))\phi (B)\delta ^r\log R}{B(r-1)!\log N}\left( \log \frac{1}{2(r-1)\eta } \right) ^{r-1} \left( \sum _{m=1}^k J_k^{(m)}(F)\right) - \rho I_k(F) + o(1)\right) \\&\ge \frac{\phi (W)N(\log R)^k I_k(F)}{W^{k+1}} \left( \frac{(1+o(1))\phi (B)\delta ^r}{B(r-1)!}\left( \log \frac{1}{2(r-1)\eta } \right) ^{r-1}\left( \frac{\theta }{2}-\epsilon \right) \left( M_{k,\eta }-\epsilon _1 \right) - \rho + o(1)\right) . \end{aligned}

Set

\begin{aligned} \rho =\displaystyle \frac{\theta \phi (B)\delta ^r M_{k,\eta } }{2B(r-1)!}\left( \log \frac{1}{2(r-1)\eta } \right) ^{r-1}-\varepsilon . \end{aligned}

By choosing $$\epsilon$$ and $$\epsilon _1$$ suitably small in terms of $$\varepsilon$$, we obtain that $$S(N, \rho )>0$$ for all sufficiently large N. Thus, there are infinitely many $$n \in \mathbb N$$ such that at least $$\left\lfloor \rho \right\rfloor +1$$ of the numbers $$n+h_i$$ are in $$E_r$$. Since $$\left\lfloor \rho \right\rfloor +1 = \nu$$ for sufficiently small $$\varepsilon$$, taking $$\varepsilon \rightarrow 0$$ (and accordingly, $$\epsilon , \epsilon _1 \rightarrow 0$$) gives the result. $$\square$$

In light of Proposition 2.5, it remains to find a large lower bound for

\begin{aligned} \sup _{0< \eta < \frac{1}{2(r-1)} } \sup _{\begin{array}{c} F \in \mathcal {S}_{k,\eta } \end{array}}\frac{\sum _{m=1}^k J_k^{(m)}(F)}{I_k(F)} \end{aligned}
(2.8)

in terms of k. In Section 7, we make our choice of $$\eta$$ and $$F\in \mathcal {S}_{k,\eta }$$ so that

\begin{aligned} \frac{\theta \phi (B)\delta ^r \sum _{m=1}^k J^{(m)}_k(F)}{2B (r-1)! \cdot I_k(F)} \left( \log \frac{1}{2(r-1)\eta } \right) ^{r-1} - \rho > 0 \end{aligned}

holds as long as

\begin{aligned} k > \exp \left( r+\frac{r}{\delta }\left( \frac{2B\rho (r-1)!}{\phi (B)\theta (r-1)^{r-1}}\right) ^\frac{1}{r}\right) . \end{aligned}
(2.9)

## Proof of Bombieri–Vinogradov for products of primes

In , a Bombieri–Vinogradov result was proved for $$E_r(\mathcal {P})$$ numbers. The proof uses the following result of Bombieri, Friedlander, and Iwaniec [1, Equation 1.5], which was inspired by the work of Motohashi .

Recall that the convolution of two arithmetic functions a and b, denoted $$a * b$$, is defined as

\begin{aligned} (a * b)(n) = \sum _{d|n} a(d)b(n/d). \end{aligned}

### Lemma 3.1

Let $$x_1, x_2 > 0$$, and let $$\{a(i)\}$$ and $$\{b(i)\}$$ be two sequences. Let the restriction of these sequences on $$[N^{x_1}, 2N^{x_1}]$$ and $$[N^{x_2}, 2N^{x_2}]$$ be $$\{a'(i)\}$$, $$\{b'(i)\}$$, respectively. Note that $$a', b'$$ depend on N. Assume that $$\{b(i)\}$$ satisfies the following condition for any $$(d, k) = 1$$, $$(l, k) = 1$$: for any constant $$A > 0$$,

\begin{aligned} \left| \sum _{\begin{array}{c} n \equiv l \pmod k \\ (n, d) = 1 \end{array}} b'(n) - \frac{1}{\phi (k)} \sum _{(n, dk) = 1} b'(n)\right| \ll \Vert b'\Vert N^{\frac{1}{2}} \tau (d)^B (\log N)^{-A}, \end{aligned}

where $$\Vert \cdot \Vert$$ denotes the $$L_2$$ norm of the sequence. Then, for any constant $$A' > 0$$, the convolution $$a' * b'$$ satisfies

\begin{aligned} \sum _{q \le N^{\frac{x_1 + x_2}{2} - \varepsilon }} \max _{(a, q) = 1} \left| \frac{1}{\phi (q)}\sum _{\begin{array}{c} n< N^{x_1 + x_2} \\ (n, q) = 1 \end{array}} (a' * b')(n) - \sum _{\begin{array}{c} n < N^{x_1 + x_2} \\ n \equiv a \pmod q \end{array}} (a' * b')(n) \right| \ll \Vert a'\Vert \Vert b'\Vert \frac{N^{\frac{1}{2}(x_1 + x_2)}}{(\log N)^{A'}}. \end{aligned}

For our purposes, we will require a Bombieri–Vinogradov theorem for those $$E_r(\mathcal {P})$$ numbers with prime factors restricted to certain intervals.

### Theorem 3.2

Define

\begin{aligned} F_r(\mathcal {P}) := \left\{ \prod _{i = 1}^{r} p_i :p_i \in \mathcal {P}_i, p_i \text { all distinct} \right\} , \end{aligned}

where $$\mathcal {P}_i$$ denotes the restriction of $$\mathcal {P}$$ to some range $$[N^{a_i}, N^{b_i}]$$. Then, for any $$u \in \mathbb R$$ and $$A > 0$$, we have

\begin{aligned} \sum _{q \le N^{\frac{1}{2}u - \varepsilon }} \max _{(a, q) = 1} \left| \sum _{n < N^u} \left( \frac{1}{\phi (q)} \beta _r(n; q) - \beta _r(n; q, a) \right) \right| \ll \frac{N^u}{(\log N)^A}, \end{aligned}

where $$\beta _r(n; q, a)$$ denotes the indicator function $$\beta _r$$ for $$F_r$$ supported on $$x \equiv a \pmod {q}$$, $$\beta _r(n; q)$$ denotes $$\beta _r$$ supported on $$(n, q) = 1$$, and the implied constant only depending on u, A, and $$\varepsilon$$.

Suppose first that all pairs of intervals $$[a_i, b_i]$$ and $$[a_j, b_j]$$ are either identical or disjoint, and further suppose that $$[a_r, b_r]$$ and $$[a_i, b_i]$$ are the same interval for c values of $$i \le r$$. Define $$\Delta _r := \frac{1}{c} \beta _{r-1}*I_{\mathcal {P}_r} - \beta _r$$. We can approximate $$\beta _r$$ with $$\beta _{r-1} * I_{\mathcal {P}_r}$$ using the Triangle Inequality as follows:

\begin{aligned}&\sum _{q \le N^{\frac{1}{2}u - \varepsilon }} \max _{(a, q) = 1} \left| \sum _{n< N^u} \left( \frac{1}{\phi (q)} \beta _r(n; q) - \beta _r(n; q, a) \right) \right| \\&\qquad -\frac{1}{c} \sum _{q \le N^{\frac{1}{2}u - \varepsilon }} \max _{(a, q) = 1} \left| \sum _{n< N^u} \left( \frac{1}{\phi (q)} (\beta _{r-1} * I_{\mathcal {P}_r}(n; q) - \beta _{r-1} * I_{\mathcal {P}_r}(n; q, a) \right) \right| \\&\quad \le \sum _{q \le N^{\frac{1}{2}u - \varepsilon }} \max _{(a, q) = 1} \Big | \sum _{n < N^u} \left( \frac{1}{\phi (q)} \Delta _r(n; q) - \Delta _r(n; q, a) \right) \Big | \end{aligned}

Note that $$\Delta _r$$ only takes nonzero values at those integers divisible by the square of a prime in the interval $$[N^{a_r}, N^{b_r}]$$, and it has a maximum magnitude of at most 1 at each integer. Fix q. For every number p in $$[N^{a_r}, N^{b_r}]$$, at most $$\frac{N^u}{p^2}$$ numbers less than $$N^u$$ are divisible by $$p^2$$. Thus, for each q, we have

\begin{aligned} \left| \sum _{n < N^u} \frac{1}{\phi (q)}\Delta _r(n; q) \right| \le \frac{N^u}{\phi (q)} \sum _{\begin{array}{c} p \in [N^{a_r}, N^{b_r}] \\ p \text { prime} \end{array}} \frac{1}{p^2} \ll \frac{1}{\phi (q)}N^{u - a_r} \end{aligned}

Summing over all q, we obtain

\begin{aligned} \sum _{q \le N^{\frac{1}{2}u - \varepsilon }} \left| \sum _{n < N^u} \frac{1}{\phi (q)}\Delta _r(n ; q) \right| \ll N^{u - a_r} \sum _{q \le N^{\frac{1}{2}u - \varepsilon }} \frac{1}{\phi (q)} \ll N^{u - a_r}(\log N)(\log \log N),\nonumber \\ \end{aligned}
(3.1)

where we have used the bound $$\frac{1}{\phi (q)} \ll \frac{\log \log q}{q}$$.

Moreover, for every number p in $$[N^{a_r}, N^{b_r}]$$, at most $$\frac{N^u}{p^2q} + 1$$ numbers less than $$N^u$$ are divisible by $$p^2$$ and are congruent to $$a \pmod {q}$$. Thus, a similar approach gives

\begin{aligned} \sum _{q \le N^{\frac{1}{2}u - \varepsilon }} \left| \sum _{n < N^u} \Delta _r(n; q, a) \right| \ll N^{u - a_r}(\log N). \end{aligned}
(3.2)

The two error terms given by (3.1) and (3.2) are negligible, so it remains to show the desired equidistribution property for the sequence $$\beta _{r-1} * I_{\mathcal {P}_r}$$. We appeal to Lemma 3.1. A direct application would result in a bound of $$N^{1.5u}$$ instead of $$\frac{N}{(\log N)^A}$$, which is not strong enough for our purposes. We instead decompose our sum into dyadic intervals:

\begin{aligned} \beta _{r-1} * I_{\mathcal {P}_r}(n) = \sum _{t \in [1,n]} \beta _{r-1}(t) I_{\mathcal {P}_r}(n/t) = \sum _{\omega }\sum _{t \in J_{\omega }} \beta _{r-1}(t) I_{\mathcal {P}_r}(n/t) \end{aligned}

for the cover $$J_1, J_2, \ldots$$ of [1, n], $$J_{\omega } := [2^{\omega }, 2^{\omega + 1})$$. For each $$J_{\omega }$$, define the interval $$K_{\omega } = [1, \frac{N^u}{2^{\omega }}]$$. Let the restriction of $$\beta _{r-1}(x)$$ and $$I_{\mathcal {P}_r}$$ to the intervals $$J_\omega$$ and $$K_\omega$$ be $$\beta _{r-1, \omega }(x)$$ and $$I_{\mathcal {P}_r, \omega }$$, respectively. Note that

\begin{aligned} \sum _{x< N^u} \beta _{r-1, \omega } * I_{\mathcal {P}_r} \quad \text { and } \quad \sum _{x < N^u} \beta _{r-1, \omega } * I_{\mathcal {P}_r, \omega } \end{aligned}

are identical. By applying Lemma-3.1 to the sequences $$\beta _{r-1, \omega }$$ and $$I_{\mathcal {P}_r, \omega }$$ and splitting the support of the second sequence into $$\frac{\log (N^u)}{\log 2} + O(1)$$ dyadic intervals, we obtain the bound

\begin{aligned}&\sum _{q \le N^{\frac{1}{2}u - \varepsilon }} \max _{(a, q) = 1} \left| \sum _{n < N^u} \left( \frac{1}{\phi (q)} (\beta _{r-1, \omega } * I_{\mathcal {P}_r, \omega })(n; q) - (\beta _{r-1, \omega } * I_{\mathcal {P}_r, \omega })(n; q, a) \right) \right| \\&\quad \ll \sqrt{2^\omega } \sqrt{\frac{N^u}{2^{\omega }}} \frac{N^{\frac{1}{2}u}}{(\log N)^A} \ll \frac{N^u}{(\log N)^A} \end{aligned}

The total number of intervals needed to cover all of $$[1, N^u]$$ is $$\frac{\log N^u}{\log 2} + O(1)$$. Therefore, the sum of the above expression over all $$\omega$$ is $$\ll \frac{N^u}{(\log N)^{A'}}$$ for any $$A'>0$$, as desired.

## Reduction to counting prime numbers

We reduce $$S_2^{(m)}$$ to the following sum involving the prime counting function $$X_n$$.

### Lemma 4.1

We have that (4.1)

where $$\sum ^{\dagger }$$ is defined in Proposition 2.3 and $$\lambda _{\max } := \max _{d_1,\ldots ,d_k} \left| \lambda _{d_1, \ldots , d_k}\right|$$.

### Proof

Fix $$m \in \{ 1, \ldots , k\}.$$ We first switch the order of summation for $$S_2^{(m)}$$ to obtain

\begin{aligned} S_{2}^{(m)}&= \sum _{\begin{array}{c} N \le n< 2N \\ n \equiv v_{0} ~\,{(\mathrm{mod}}{~U}) \end{array}} \left( \sum _{d_{i} \left| n + h_{i}\right. } {\lambda _{d_{1}}, \ldots , d_{k}} \right) ^2 \beta _{r}(n + h_m) \\&= \sum _{\begin{array}{c} d_{1}, \ldots , d_{k} \\ e_{1}, \ldots , e_{k} \end{array}}\lambda _{d_{1}, \ldots , d_{k}}\lambda _{e_{1}, \ldots , e_{k}} \sum _{\begin{array}{c} N \le n < 2N \\ n \equiv v_{0} \,~({\mathrm{mod}}{~U}) \\ { [d_i, e_i]} | n+h_{i} \end{array}} \beta _{r}(n+h_m). \end{aligned}

For sufficiently large N, the inner sum vanishes if $$U, [d_1, e_1] , \ldots , [d_k,e_k]$$ are not pairwise coprime. Indeed, if $$p \mid U$$ and $$p \mid [d_i, e_i]$$, then either $$\lambda _{d_1, \dots , d_k} = 0$$ or $$\lambda _{e_1, \dots , e_k} = 0$$, as $$\lambda _{d_1, \dots , d_k}$$ is supported only when $$\mu ^2(BU \prod _{i = 1}^m d_i) = 1.$$ Now assume $$p \not \mid W$$. If $$p\mid [d_i, e_i]$$ and $$p \mid [d_j, e_j]$$, then $$p \mid n+h_i$$ and $$p \mid n+h_j.$$ This implies that $$p \mid h_i-h_j$$, which contradicts $$D_0 > h_k-h_1$$ (as $$D_0$$ grows with N). Thus, by the Chinese remainder theorem, where $$\sum ^{'}$$ denotes the restriction that $$U, [d_1, e_1] , \ldots , [d_k,e_k]$$ are pairwise coprime.

Note that $$[d_m, e_m]$$ divides $$n+h_m$$ while $$d_m, e_m \le R \le N^{\frac{1}{2}}$$. So, when $$\beta _r(n+h_m)=1$$, $$[d_m,e_m]$$ is composed of at most $$r-1$$ prime factors that are at least $$N^\eta$$ but at most $$N^\frac{1}{2}$$. Thus, we can write $$S_2^{(m)} = \sum _{h = 1}^{r} T_h$$, where where $$E'_{r-h} := \{p_1 \cdots p_{r-h} :N^\eta \le p_1< \cdots < p_{r-h} \}$$, and in the last step, we have used the Chinese remainder theorem to convert the congruence conditions (mod U) and (mod $$[d_i,e_i]$$) for $$i\ne m$$ into a single congruence $$v \pmod {U \prod _{i \ne m}[d_i,e_i]}$$. For n such that $$[d_m, e_m] \mid n+h_m$$, we can make the change of variables $$t = \frac{n+h_m}{[d_m,e_m]}$$ to obtain

\begin{aligned} T_h = M_h + \Xi _h, \end{aligned}

where $$v' \pmod {U\prod _{i \ne m}[d_i,e_i]}$$ is the residue class resulting from the change of variables, and $$\Xi _h$$ denotes the error resulting from t such that $$\beta _h(t) = 1$$ but $$\beta _r(n+h_m)=0$$ for the corresponding n. The latter occurs precisely when at least one prime dividing $$[d_m, e_m]$$ also divides t, since then the corresponding $$n + h_m$$ is not the product of distinct primes. We bound the error by where we have used the fact that $$U\prod _{i \ne m}[d_i,e_i] \le R^2U$$, since $$\prod _{i=1}^m d_i, \prod _{i=1}^m e_i < R$$. Also, the fact that $$p \mid [d_m,e_m]$$ implies that $$p \not \mid U\prod _{i \ne m} [d_i,e_i]$$, which allows us to conclude that

\begin{aligned} \sum _{\begin{array}{c} \frac{N+h_m}{[d_m, e_m]} \le t < \frac{2N+h_m}{[d_m, e_m]} \\ t \equiv v' \pmod {U\prod _{i \ne m}[d_i,e_i]} \\ p \mid t \end{array}} 1 = \frac{1}{p U\prod _{i \ne m}[d_i,e_i]} \cdot \frac{N}{[d_m,e_m]} + O(1). \end{aligned}

Next, we remove the congruence condition from the inner sum of $$M_h$$. To this end, we rearrange the sum as (4.2) (4.3)

where

\begin{aligned} \mathcal {E}_{h}(V,q) := 1 + \max _{(a,q)=1} \left| \sum _{\begin{array}{c} V \le n< 2V \\ n \equiv a \pmod q \end{array} }\beta _{h}(n) - \frac{1}{\phi (q)} \sum _{\begin{array}{c} V \le n < 2V \\ (n,q)=1 \end{array} }\beta _{h}(n) \right| . \end{aligned}

We can write the expression inside the error term as (4.4)

We further bound the inner sum above by (4.5)

where we have applied $$U\prod _{i \ne m} [d_i,e_i] \le \frac{R^2U}{[d_m,e_m]}$$, the Cauchy–Schwarz inequality, and the trivial bound

\begin{aligned} \mathcal {E}_{h}\left( \frac{N}{[d_m, e_m]}, \omega \right) \ll \frac{N}{[d_m,e_m]\phi (\omega )}. \end{aligned}

Since $$R^2U/[d_m, e_m] \ll N$$, we have that

\begin{aligned} \sum _{\begin{array}{c} \omega \le \frac{R^2U}{[d_m, e_m]} \\ (\omega ,B)=1 \end{array} } \frac{\tau _{3k-2}(\omega )^2}{\phi (\omega )} \ll \left( \log \frac{R^2U}{[d_m, e_m]}\right) ^{a(k)} \ll (\log N)^{a(k)} \end{aligned}

for some $$a(k) \in \mathbb N$$. This shows that

\begin{aligned} \left( \sum _{\begin{array}{c} \omega \le \frac{R^2U}{[d_m, e_m]} \\ (\omega ,B)=1 \end{array} } \tau _{3k-2}(\omega )^2 \frac{N}{[d_m, e_m]\phi (\omega )} \right) ^\frac{1}{2} \ll (\log N)^{\frac{a(k)}{2}}\left( \frac{N}{[d_m,e_m]}\right) ^{\frac{1}{2}}. \end{aligned}

To bound the second factor in (4.5), we use the Bombieri–Vinogradov theorem for $$h=1$$ and Theorem 3.2 for $$h>1$$. To justify this step, we check that

\begin{aligned} \frac{R^2}{[d_m,e_m]} \le \left( \frac{N}{[d_m,e_m]}\right) ^{\theta - 2\epsilon }, \end{aligned}

for the case $$h=1$$. As for the case $$h>1$$, we note that the congruence conditions $$n+h_m \equiv v_0+h_m \pmod U$$ and $$n+h_m \equiv h_m - h_i \pmod {[d_i,e_i]}$$ for $$i \ne m$$ are primitive for sufficiently large N and thus W. Thus, observing that $$\frac{N}{[d_m, e_m]}$$ and $$\frac{2N}{[d_m, e_m]}$$ are expressible as $$N^u$$ for some $$u\in \mathbb R$$, we can apply Theorem 3.2, as desired. Thus, we have for $$1 \le h \le r-1$$ that

\begin{aligned} \sum _{\begin{array}{c} q \le \frac{R^2U}{[d_m, e_m]} \\ (q,B)=1 \end{array} } \mathcal {E}_{h}\left( \frac{N}{[d_m, e_m]}, q \right) \ll \frac{N}{[d_m, e_m](\log N)^{A}} \end{aligned}

for any $$A > 0$$. This allows us to bound (4.4) by

\begin{aligned} \lambda _{\max }^2\sum _{\begin{array}{c} d_m, e_m\\ {[d_m,e_m]}\in E'_{r-h} \end{array}} \frac{N}{[d_m,e_m](\log N) ^{A'} } \le \lambda _{\max }^2\sum _{\begin{array}{c} q \le R^2\\ q \in E'_{r-h} \end{array}} 3^{r-h} \frac{1}{q} \frac{N}{(\log N)^{A'}} \ll \lambda _{\max }^2\frac{N}{(\log N)^{A}}, \end{aligned}

where $$A>0$$ can be arbitrary and $$A' > A$$. Thus, the error (4.3) is $$O\left( \lambda _{\max }^2\frac{N}{(\log N)^{A}}\right)$$ for any $$A>0$$.

Furthermore, the difference between (4.2) and (4.6)

is small. Indeed, (4.7)

Note that if $$p \mid U$$, then $$p < N^{\eta }$$, and since $$\beta _h$$ is supported on integers with prime factors $$\ge N^\eta$$, the innermost sum above is empty in this case. Thus, we only need to consider $$p \mid \prod _{i \ne m} [d_i,e_i]$$. Since $$\prod _{i \ne m} [d_i,e_i] \le R^2 < N$$, there can only be at most $$\left\lfloor 1/\eta \right\rfloor$$ prime factors for every $$\prod _{i \ne m} [d_i,e_i]$$, which shows that (4.7) is which is negligible.

Now that we have removed the coprimality condition from the inner sum of (4.2), we can rearrange and express our new sum (4.6) in terms of $$\beta _1$$. For a fixed choice of $$d_1, \ldots , d_k, e_1, \ldots , e_k$$, consider t in the range $$\frac{N+h_m}{[d_m,e_m]} \le t < \frac{2N+h_m}{[d_m,e_m]}$$ such that $$\beta _r(t) = 1$$. If the prime factors of t that are less than or equal to $$N^{\frac{1}{2}}$$ are all distinct from the prime factors of $$[d_m,e_m]$$, we can make a change of variables that divides t by these prime factors to obtain its largest prime factor u, obtaining the sum (4.8)

We can bound the error resulting from repeated prime factors dividing both $$[d_m,e_m]$$ and t as follows: Just as before, the error term resulting from $$\frac{N}{N^\eta [d_m,e_m]}$$ is $$\ll \lambda _{\max }^2N^{1-\eta +\varepsilon }$$, and the error term resulting from the O(1) is $$\ll \lambda _{\max }^2 R^2N^{\varepsilon }$$.

Summing (4.8) and the dominating error term of $$O\left( \lambda _{\max }^2 \frac{N}{(\log N)^A}\right)$$ across all h, we obtain (4.9)

Since

\begin{aligned} \sum _{\frac{N+h_m}{q} \le v< \frac{2N+h_m}{q}} \beta _1(v) = \sum _{\frac{N}{q} \le v < \frac{2N}{q}} \beta _1(v) + O\left( \frac{1}{q}\right) \end{aligned}

and we can replace the sum in (4.9) with $$\square$$

## Combinatorial sieve manipulations

In this section, we will only consider the innermost sum of (4.1), i.e. The manipulation done here will be similar to that of [8, Lemmas 5.2, 5.3].

### Lemma 5.1

Define

\begin{aligned} y_{r_1, \ldots , r_m}^{(m, q)} := \prod _{i \ne m} \mu (r_i)g(r_i) \sum _{\begin{array}{c} d_1, \ldots , d_k \\ r_i \mid d_i \\ d_m \mid q \end{array}} \frac{\lambda _{d_1, \ldots , d_k}}{\prod _{i \ne m} \phi (d_i)}, \end{aligned}
(5.1)

where g denotes the totally multiplicative function defined on the primes by $$g(\ell ) = \ell -2$$. Then, we have where

\begin{aligned} {y^{(m, q)}_{\max } = \max _{r_1, \ldots , r_k} |y_{r_1, \ldots , r_k}^{(m, q)}|.} \end{aligned}

Note that $$y_{r_1, \ldots , r_k}^{(m, q)}$$ is supported on $$(r_1, \ldots , r_k)$$ such that $$r_m \mid q.$$

### Proof

For squarefree $$d_i$$ and $$e_i$$ we have the identity

\begin{aligned} \frac{1}{\phi ([d_i, e_i])} = \frac{1}{\phi (d_i)\phi (e_i)}\sum _{u_i \mid d_i, e_i} g(u_i). \end{aligned}

Therefore, Swapping the order of summation between the u and d variables gives that the previous quantity is equal to Let us now consider the conditions that we have imposed from the $$'$$ in the second summation. We required that $$(W, d_i) = 1, (W, e_i) = 1$$ and $$(d_i, e_j) = 1$$ for $$i \ne j$$. Note that the first two conditions can be removed due to the restriction of the support of $$\lambda _{d_1,\ldots ,d_k}$$. We remove the last condition $$(d_i, e_j) = 1$$ by introducing variables $$s_{i, j}$$ for $$i \ne j$$. Since

\begin{aligned} \sum _{x \mid d_i, e_j} \mu (x) = 1 \end{aligned}

if $$(d_i, e_j) = 1$$ and the quantity is 0 otherwise, the previous sum can be rewritten as

\begin{aligned} \sum _{\begin{array}{c} u_1, \ldots , u_k \\ u_m = 1 \end{array}} \prod _{i \ne m} g(u_i) \sum _{\begin{array}{c} d_1, \ldots , d_k \\ e_1, \ldots , e_k \\ u_i \mid d_i, e_i \\ d_m, e_m \mid q \end{array}}\frac{\lambda _{d_1, \ldots , d_k}\lambda _{e_1, \ldots , e_k}}{\prod _{i \ne m} \phi (d_i)\phi (e_i)} \sum _{\begin{array}{c} s_{1, 2}, \ldots , s_{k, k-1} \\ s_{i, j} \mid d_i, e_j \end{array}} \prod _{\begin{array}{c} 1 \le i, j \le k \\ i \ne j \end{array}} \mu (s_{i, j}). \end{aligned}

Interchanging the order of summation between the s and d variables gives us

\begin{aligned} \sum _{\begin{array}{c} u_1, \ldots , u_k \\ u_m = 1 \end{array}} \prod _{i \ne m} g(u_i) \sum _{\begin{array}{c} s_{1, 2}, \ldots , s_{k, k-1} \end{array}} \prod _{\begin{array}{c} 1 \le i, j \le k \\ i \ne j \end{array}} \mu (s_{i, j}) \sum _{\begin{array}{c} d_1, \ldots , d_k \\ e_1, \ldots , e_k \\ u_i \mid d_i, e_i \\ s_{i, j} \mid d_i, e_j \\ d_m, e_m \mid q \end{array}}\frac{\lambda _{d_1, \ldots , d_k}\lambda _{e_1, \ldots , e_k}}{\prod _{i \ne m} \phi (d_i)\phi (e_i)}. \end{aligned}

Note that in the previous sum, we can restrict to the terms where $$(s_{i, a}, s_{i, j}) = 1$$ for any $$a \ne j$$. This is because $$(s_{i, a}, s_{i, j}) \mid (e_a, e_j)$$, and $$\lambda _{e_1, \ldots , e_k}$$ is supported on $$(e_1,\ldots ,e_k)$$ such that the $$e_i$$ are pairwise relatively prime. Similarly, we can assume that $$(s_{a, j}, s_{i, j}) = 1, (s_{i, j}, u_i) = 1$$, and $$(s_{i, j}, u_j) = 1.$$ We will denote these restrictions by $$\sum ^{\star }$$. As we have separated the d and e variables completely, we can substitute in the $$y^{(m, q)}$$ variables to rewrite the previous expression as where

\begin{aligned} a_j = u_j \prod _{i\ne j}s_{j, i} \quad \text {and} \quad b_j = u_j \prod _{i\ne j} s_{i, j}. \end{aligned}

Now, we use the fact that $$s_{i, j}$$ is relatively prime with $$s_{i, a}, s_{b, j}, u_i,$$ and $$u_j$$ in order to write $$\mu (a_j) = \mu (u_j)\prod _{i \ne j}\mu (s_{j, i})$$, and similar expressions for $$\mu (b_j), g(a_j),$$ and $$g(b_j).$$ Substituting these into the previous expression, we have We now bound the contribution from the terms with $$s_{i, j} > 1$$ in the previous expression. Since $$s_{i, j} \mid a_i$$, we have $$y^{(m, q)}_{a_1, \ldots , a_k} = 0$$ for $$1 < s_{i, j} \le D_0.$$ Therefore, we may assume that $$s_{i, j} = 1$$ or $$s_{i, j} > D_0.$$ If $$i = m$$ or $$j = m$$, then $$s_{i, j} = 1$$ or $$s_{i, j} \ge N^\eta$$, as $$s_{m, j}$$ divides $$d_m$$, which divides q. Thus, $$s_{m, j}$$ would only have factors of size at least $$N^\eta .$$ First, let us consider the case where $$s_{i, j} > D_0$$, and $$i \ne m, j \ne m.$$ The contribution from these terms is bounded by

\begin{aligned}&(y_{\max }^{(m, q)})^2 \left( \sum _{\begin{array}{c} (u, W) = 1 \\ u < R \end{array}} \frac{1}{g(u)}\right) ^{k-1}\left( \sum _{s \ge 1} \frac{1}{g(s)^2} \right) ^{k^2-3k+1} \left( \sum _{s_{i, j} > D_0} \frac{1}{g(s_{i, j})^2} \right) \left( \sum _{t \mid q} \frac{1}{g(t)}\right) ^{2k-2}\\&\quad \ll \frac{(y_{\max }^{(m, q)})^2 \phi (W)^{k-1}(\log R)^{k-1}}{W^{k-1}D_0}. \end{aligned}

Here we have used the fact that q has $$2^{r-1}$$ factors, and thus

\begin{aligned} \sum _{t \mid q} \frac{1}{g(t)} \le 2^{r-1}. \end{aligned}

The contribution from the terms with $$s_{i, j} > 1$$, where $$i = m$$ or $$j = m$$, is bounded by

\begin{aligned}&(y_{\max }^{(m, q)})^2 \left( \sum _{\begin{array}{c} (u, W) = 1 \\ u < R \end{array}} \frac{1}{g(u)}\right) ^{k-1}\left( \sum _{s \ge 1} \frac{1}{g(s)^2} \right) ^{k^2-3k+2} \left( \sum _{t \mid q} \frac{1}{g(t)}\right) ^{2k-3} \left( \sum _{\begin{array}{c} s_{i, j} \mid q \\ s_{i, j} > 1 \end{array}} \frac{1}{g(s_{i, j})} \right) \\&\quad \ll \frac{(y_{\max }^{(m, q)})^2 \phi (W)^{k-1}(\log R)^{k-1}}{W^{k-1}N^\eta }. \end{aligned}

We have additionally used the fact that

\begin{aligned} \left( \sum _{\begin{array}{c} s_{i, j} \mid q \\ s_{i, j} > 1 \end{array}} \frac{1}{g(s_{i, j})} \right) \le \frac{2^{r-1}}{N^\eta - 2}, \end{aligned}

as all prime factors of q are at least $$N^\eta .$$ The first error term dominates. By simplifying the main term, where $$s_{i, j} = 1$$ for all ij, we see that $$\square$$

In order to relate $$S_2^{(m)}$$ to $$S_1$$, we now express the $$y^{(m, q)}$$ variables in terms of the y variables.

### Lemma 5.2

If $$r_m \mid q$$, then

\begin{aligned} y_{r_1, \ldots , r_k}^{(m, q)} = \sum _{r_m \mid a_m} \frac{y_{r_1, \ldots , r_{m-1}, a_m, r_{m+1}, \ldots , r_k}}{\phi (a_m)}\mu ((a_m, q))\phi ((a_m, q)) + O\left( \frac{y_{\max }\phi (W)\log R}{WD_0} \right) . \end{aligned}

In particular, for $$r_m = 1$$, the previous expression can be written as

\begin{aligned} y_{r_1, \ldots , r_k}^{(m, q)} = \sum _{d \mid q} \mu (d)d \sum _{d \mid a_m} \frac{y_{r_1, r_{m-1}, a_m, r_{m+1}, \ldots , r_k}}{\phi (a_m)} + O\left( \frac{y_{\max }\phi (W)\log R}{WD_0} \right) . \end{aligned}

### Proof

As stated in [8, Equation 5.8], we have the inversion formula $$\lambda _{d_1,\ldots ,d_k}$$ in terms of the variables $$y_{r_1,\ldots ,r_k}$$:

\begin{aligned} \lambda _{d_1, \ldots , d_k} = \prod _{i = 1}^m \mu (d_i)d_i \sum _{\begin{array}{c} r_1, \ldots , r_k \\ d_i \mid r_i \end{array}} \frac{y_{r_1, \ldots , r_k}}{\prod _{i = 1}^m \phi (r_i)}. \end{aligned}

Substituting this expression into (5.1) gives us

\begin{aligned} y_{r_1, \ldots , r_k}^{(m, q)} = \prod _{i \ne m} \mu (r_i)g(r_i) \sum _{\begin{array}{c} r_i \mid d_i \\ d_m \mid q \end{array}} \frac{\prod _{i = 1}^m\mu (d_i)d_i}{\prod _{i \ne m} \phi (d_i)} \sum _{d_i \mid a_i} \frac{y_{a_1, \ldots , a_k}}{\prod _{i = 1}^m \phi (a_i)}. \end{aligned}

We now swap the order of summation between the d and a variables to give

\begin{aligned} y_{r_1, \ldots , r_k}^{(m, q)} = \prod _{i \ne m} \mu (r_i)g(r_i) \sum _{r_i \mid a_i}\frac{y_{a_1, \ldots , a_k}}{\prod _{i = 1}^m \phi (a_i)} \left( \prod _{i \ne m} \sum _{\begin{array}{c} d_i \mid a_i \\ r_i \mid d_i \end{array}} \frac{\mu (d_i)d_i}{\phi (d_i)}\right) \left( \sum _{\begin{array}{c} d_m \mid (a_m, q) \\ r_m \mid d_m \end{array}} \mu (d_i)d_i\right) .\end{aligned}

We can explicitly compute the innermost sum: for $$i \ne m$$, we have

\begin{aligned} \sum _{\begin{array}{c} d_i \mid a_i \\ r_i \mid d_i \end{array}} \frac{\mu (d_i)d_i}{\phi (d_i)} = \frac{\mu (a_i)r_i}{\phi (a_i)}, \end{aligned}

and for $$i = m$$, we have

\begin{aligned} \sum _{\begin{array}{c} d_m \mid (a_m, q) \\ r_m \mid d_m \end{array}} \mu (d_m)d_m = \mu ((a_m, q))\phi ((a_m, q))\frac{r_m}{\phi (r_m)}. \end{aligned}

Substituting these into the previous expression gives us

\begin{aligned} y_{r_1, \ldots , r_k}^{(m, q)}&= \frac{r_m}{\phi (r_m)}\prod _{i \ne m}\mu (r_i)g(r_i)\sum _{r_i \mid a_i} \frac{y_{a_1, \ldots , a_k}}{\prod _{i=1}^m \phi (a_i)} \left( \prod _{i \ne m} \frac{\mu (a_i)r_i}{\phi (a_i)}\right) \mu ((a_m, q))\phi ((a_m, q)) \\&= \frac{r_m}{\phi (r_m)}\prod _{i \ne m} \mu (r_i)g(r_i)r_i \sum _{r_i \mid a_i} \frac{y_{a_1, \ldots , a_k}}{\phi (a_m)}\mu ((a_m, q))\phi ((a_m, q)) \prod _{i \ne m} \frac{\mu (a_i)}{\phi (a_i)^2} \end{aligned}

We now claim that for $$i \ne m$$, the contribution from the terms with $$a_i \ne r_i$$ is small. Note that we must have $$a_i > D_0r_i$$, as $$y_{a_1, \ldots , a_k}$$ is only supported when $$(a_i, W) > 1.$$ Suppose that $$a_j > D_0r_j.$$ The contribution from these terms is

\begin{aligned}&\ll \frac{y_{\max }r_m}{\phi (r_m)} \prod _{i \ne m} g(r_i)r_i \left( \sum _{\begin{array}{c} r_j \mid a_j \\ a_j > D_0r_j \end{array}} \frac{1}{\phi (a_i)^2} \right) \prod _{\begin{array}{c} i \ne m, j \end{array}} \left( \sum _{r_i \mid a_i} \frac{1}{\phi (a_i)^2} \right) \sum _{\begin{array}{c} r_m \mid a_m \\ (a_m, W) = 1 \\ a_m< R \end{array}} \frac{\phi ((a_m, q))}{\phi (a_m)} \\&\ll \frac{y_{\max }r_m}{D_0\phi (r_m)} \prod _{i \ne m} \left( \frac{g(r_i)r_i}{\phi (r_i)^2}\right) \left( \sum _{d \mid q}\sum _{\begin{array}{c} d \mid a_m \\ (a_m, W) = 1 \\ a_m < R \end{array}} \frac{\phi (d)}{\phi (a_m)}\right) \\&\ll \frac{y_{\max }r_m}{D_0\phi (r_m)} \sum _{d \mid q} \frac{\phi (W) \log R}{W} \ll \frac{y_{\max } \phi (W) \log R}{WD_0}. \end{aligned}

The last inequality holds because q has at most $$2^r$$ factors and $$r_m \mid q$$, and thus

\begin{aligned} 1 \le \frac{r_m}{\phi (r_m)} \le \Big (\frac{N^\eta }{N^\eta -1}\Big )^r = 1 + O(N^{-\eta }), \end{aligned}

Therefore,

\begin{aligned} y_{r_1, \ldots , r_k}^{(m, q)}&= \frac{r_m}{\phi (r_m)}\prod _{i \ne m} \frac{g(r_i)r_i}{\phi (r_i)^2} \sum _{r_m \mid a_m} \frac{y_{r_1, \ldots , r_{m-1}, a_m, r_{m+1}, \ldots , r_k}}{\phi (a_m)}\mu ((a_m, q))\phi ((a_m, q)) \\&\quad + O\left( \frac{y_{\max }\phi (W) \log R}{WD_0} \right) . \end{aligned}

We conclude that

\begin{aligned}&\frac{r_m}{\phi (r_m)}\prod _{i \ne m} \frac{g(r_i)r_i}{\phi (r_i)^2} \sum _{r_m \mid a_m} \frac{y_{r_1, \ldots , r_{m-1}, a_m, r_{m+1}, \ldots , r_k}}{\phi (a_m)}\mu ((a_m, q))\phi ((a_m, q))\\&\quad = \prod _{i \ne m} \frac{g(r_i)r_i}{\phi (r_i)^2} \sum _{r_m \mid a_m} \frac{y_{r_1, \ldots , r_{m-1}, a_m, r_{m+1}, \ldots , r_k}}{\phi (a_m)}\mu ((a_m, q))\phi ((a_m, q)) + O\left( \frac{y_{\max }\phi (W) \log R}{WN^\eta } \right) , \end{aligned}

where the bounding is done analogously as above. To finish the proof, note that $$g(\ell )\ell /\phi (\ell )^2 = 1 + O(\ell ^{-2}).$$ This gives that

\begin{aligned} \prod _{i \ne m} \frac{g(r_i)r_i}{\phi (r_i)^2} = 1 + O(D_0^{-1}). \end{aligned}

Thus, our final expression is

\begin{aligned} y_{r_1, \ldots , r_k}^{(m, q)} = \sum _{r_m \mid a_m} \frac{y_{r_1, \ldots , r_{m-1}, a_m, r_{m+1}, \ldots , r_k}}{\phi (a_m)} \mu ((a_m, q))\phi ((a_m, q)) + O\left( \frac{y_{\max } \phi (W)\log R}{WD_0}\right) , \end{aligned}

which completes the proof. $$\square$$

## Smooth choice of y

When $$\mu ^2(W\prod _{i = 1}^k r_i) = 0$$, we have $$y_{r_1, \ldots , r_k} = 0$$. Otherwise, we will set

\begin{aligned} y_{r_1, \ldots , r_k} = F\left( \frac{\log r_1}{\log R}, \ldots , \frac{\log r_k}{\log R}\right) \end{aligned}

for some smooth function F to be chosen in Section 7. Note that this implies that $$y_{\max } \le F_{\max }$$. Additionally, by Lemma 5.2, we can show that

\begin{aligned} y_{r_1, \ldots , r_k}^{(m, q)}&\ll y_{\max } \sum _{r_m \mid a_m} \frac{\phi ((a_m, q))}{\phi (a_m)} \nonumber \\&\ll y_{\max } \sum _{d \mid q} \sum _{\begin{array}{c} d \mid a_m \\ (a_m, W) = 1 \\ a_m < R \end{array}} \frac{\phi (d)}{\phi (a_m)} \nonumber \\&\ll \frac{y_{\max }\phi (W)\log R}{W} \ll \frac{F_{\max }\phi (W)\log R}{W}, \end{aligned}
(6.1)

where the bounding is done as in Lemma 5.2.

We will use the following lemma to estimate the sum $$S_2^{(m)}$$ by an integral.

### Lemma 6.1

Let $$A_1, A_2, L > 0$$, and let $$\gamma$$ be a multiplicative function satisfying

\begin{aligned} 0 \le \frac{\gamma (\ell )}{\ell } \le 1-A_1, \end{aligned}
\begin{aligned} -L \le \sum _{w \le \ell \le z} \frac{\gamma (\ell )\log \ell }{\ell } - \log \frac{z}{w} \le A_2 \end{aligned}

for all $$2 \le w \le z.$$ Let h be the totally multiplicative function defined on the primes by $$h(\ell ) = \gamma (\ell )/(\ell -\gamma (\ell )).$$ Let G be a smooth function from $$[0, 1] \rightarrow \mathbb {R}$$, and let $$G_{\max } = \max _{t \in [0, 1]} |G(t)|+|G'(t)|.$$ Then for any positive integer n,

\begin{aligned} \sum _{j < R/n} \mu ^2(j)h(j)G\left( \frac{\log jn}{\log R} \right)&= \mathfrak {S} \log \frac{R}{n} \int _0^1 G\left( \frac{\log (R/n)}{\log R} \left( \frac{\log n}{\log (R/n)} + x\right) \right) dx\\&\quad + O(\mathfrak {S}LG_{\max }), \end{aligned}

where the implied constant does not depend on G or L, and

\begin{aligned} \mathfrak {S} := \prod _\ell \left( 1 - \frac{\gamma (\ell )}{\ell } \right) ^{-1} \left( 1 - \frac{1}{\ell } \right) . \end{aligned}

### Proof

This is stated in [12, Lemma 3.5] as a direct consequence of [6, Lemma 4]. $$\square$$

Our main claim of this section is expressed in the following lemma.

### Lemma 6.2

We have (6.2)

where

\begin{aligned} G^{(m)}_d(\mathbf {t_i}) := F\left( t_1, \ldots , t_{m-1}, \frac{\log (R/d)}{\log R} \left( \frac{\log d}{\log R/d}+t_m\right) , t_{m+1}, \ldots , t_k\right) \end{aligned}

and

\begin{aligned} F_{\max } := \sup _{(x_1, \ldots , x_k) \in [0, 1]^k} |F(x_1, \ldots , x_k)| + \sum _{i = 1}^k \left| \frac{\partial F}{\partial x_i}(x_1, \ldots , x_k) \right| . \end{aligned}

Before proving Lemma 6.2, we first prove the following claim, which expresses the $$y^{(m, q)}$$ variables in terms of the function F.

### Lemma 6.3

If $$r_m = 1$$, and $$y_{r_1, \ldots , r_k}^{(m, q)} \ne 0$$, then

\begin{aligned} y_{r_1, \ldots , r_k}^{(m, q)} = \frac{\phi (W)}{W} \prod _{i \ne m} \frac{\phi (r_i)}{r_i}\sum _{d \mid q} \mu (d) \log \frac{R}{d} \int _0^1 H_d(t_m) dt_m + O\left( \frac{F_{\max }\phi (W)\log R}{WD_0} \right) , \end{aligned}

where

\begin{aligned}&H_d(t_m) = F\left( \frac{\log r_1}{\log R}, \ldots , \frac{\log r_{m-1}}{\log R}, \frac{\log (R/d)}{\log R} \left( \frac{\log d}{\log R/d}+t_m\right) , \frac{\log r_{m+1}}{\log R}, \ldots , \frac{\log r_k}{\log R} \right) . \end{aligned}

### Proof

We apply Lemma 6.1 to the expression for $$y_{r_1, \ldots , r_k}^{(m, q)}$$ described at the end of Lemma 5.2. By Lemma 5.2, for $$r_m = 1$$, we can write

\begin{aligned}&y_{r_1, \ldots , r_k}^{(m, q)} = \sum _{d \mid q} \mu (d)d \sum _{d \mid a_m} \frac{y_{r_1, \ldots , r_{m-1}, a_m, r_{m+1}, \ldots , r_k}}{\phi (a_m)} + O\left( \frac{y_{\max }\phi (W)\log R}{WD_0} \right) \\&\\&\quad = \sum _{d \mid q} \frac{\mu (d)d}{\phi (d)} \sum _{\begin{array}{c} a_m' < R/d \\ (a_m', dW\prod _{i\ne m} r_i) = 1 \end{array}} F\left( \frac{\log r_1}{\log R}, \ldots , \frac{\log r_{m-1}}{\log R}, \frac{\log (a_m' \cdot d)}{\log R}, \frac{\log r_{m+1}}{\log R}, \ldots , \frac{\log a_k}{\log R} \right) \\&\\&\qquad \cdot \frac{\mu (a_m')^2}{\phi (a_m')} + O\left( \frac{y_{\max }\phi (W)\log R}{WD_0}\right) . \end{aligned}

We choose $$\gamma$$ on the primes in the following way:

\begin{aligned} \gamma (\ell ) = {\left\{ \begin{array}{ll} 0 \quad \text { if } \ell \mid dW\prod _{i \ne m}r_i \\ 1 \quad \text { otherwise}\\ \end{array}\right. }. \end{aligned}

Using the notation in Lemma 6.1, we can use the same argument as  and choose

\begin{aligned} L&\ll 1+ \sum _{\ell \mid Wd\prod _{i \ne m} r_i} \frac{\log \ell }{\ell } + \left( \log {z/w}-\sum _{w \le \ell \le z} \frac{\log \ell }{\ell } \right) \\&\ll 1 + \sum _{\ell < \log R} \frac{\log \ell }{\ell } + \sum _{\begin{array}{c} \ell > \log R \\ \ell \mid Wd\prod _{i\ne m} r_i \end{array}} \frac{\log \log R}{\log R} \ll \log \log N \end{aligned}

where $$A_1$$ and $$A_2$$ are fixed constants.

Note that because $$y_{r_1, \ldots , r_k}^{(m, q)}$$ is supported, $$(r_i, r_j) = 1$$ and $$(r_i, W) = 1.$$ If $$(d, W) > 1$$ or $$(d, r_i) > 1$$ for some $$i \ne m$$, then clearly $$y_{r_1, r_{m-1}, a_m, r_{m+1}, \ldots , r_k} = 0$$, so we can ignore these terms. Therefore,

\begin{aligned} \mathfrak {S} = \frac{\phi \left( dW\prod _{i\ne m} r_i\right) }{dW \prod _{i\ne m} r_i} = \frac{\phi (d)\phi (W)\prod _{i\ne m} \phi (r_i)}{dW\prod _{i\ne m} r_i}. \end{aligned}

Directly substituting this into Lemma 6.1 yields

\begin{aligned} y_{r_1, \ldots , r_k}^{(m, q)}&= \frac{\phi (W)}{W} \prod _{i \ne m} \frac{\phi (r_i)}{r_i}\sum _{d \mid q} \mu (d) \log \frac{R}{d} \int _0^1 H_d(t_m) dt_m \\&\quad + \sum _{d \mid q} \frac{d}{\phi (d)} O\left( \frac{F_{\max }\log \log N\phi (d)\phi (W) \prod _{i\ne m} \phi (r_i)}{dW\prod _{i\ne m} r_i} \right) \\&\quad + O\left( \frac{F_{\max }\phi (W)\log R}{WD_0} \right) . \end{aligned}

The second error term dominates, which completes the proof. $$\square$$

We are now ready to prove Lemma 6.2.

### Proof

For simplicity, define

\begin{aligned} \mathcal {G}^{(q)}_{r_1, \ldots , r_{m-1}, r_{m+1}, \ldots , r_k} = \sum _{d \mid q} \mu (d) \log \frac{R}{d} \int _0^1 H_d(t_m) dt_m, \end{aligned}

where $$H_d$$ is defined as in Lemma 6.3. Note that

\begin{aligned} \sup _{(r_1, \ldots , r_{m-1}, r_{m+1}, \ldots , r_k) \in \{1, 2, \ldots , R\}^{k-1}} \mathcal {G}^{(q)}_{r_1, \ldots , r_{m-1}, r_{m+1}, \ldots , r_k} \ll F_{\max } \log R. \end{aligned}

Now, note that by Lemma 6.3, for $$r_m = 1$$ and $$y_{r_1, \ldots , r_k}^{(m, q)} \ne 0$$, we have

\begin{aligned} (y_{r_1, \ldots , r_k}^{(m, q)})^2 = \frac{\phi (W)^2 \prod _{i \ne m} \phi (r_i)^2}{W^2 \prod _{i \ne m} r_i^2} (\mathcal {G}^{(q)}_{r_1, \ldots , r_{m-1}, r_{m+1}, \dots , r_k})^2 + O\left( \frac{F_{\max }^2\phi (W)^2(\log R)^2}{W^2D_0} \right) . \end{aligned}

Therefore, we can write (6.3)

plus an error term. This error is

\begin{aligned} \ll \frac{F_{\max }^2\mathcal {T}_N\phi (B)\phi (W)(\log R)^2}{W^2D_0} \left( \sum _{\begin{array}{c} r < R \\ (r, W) = 1 \end{array}} \frac{1}{g(r)} \right) ^{k-1} \ll \frac{F_{\max }^2\mathcal {T}_N\phi (B)\phi (W)^k (\log R)^{k+1}}{W^{k+1}D_0}, \end{aligned}

which is negligible. Looking at the main term of $$S_2^{(m)}$$ in (6.3), we will now eliminate the condition that $$(r_i, r_j) = 1$$ from the sum, at the cost of a small error. Note that if $$(r_i, r_j) > 1$$, then $$(r_i, r_j) > D_0.$$ Therefore, by summing over all primes p greater than $$D_0$$, we observe that the contribution from terms with $$(r_i, r_j) > 1$$ is

\begin{aligned}&\ll \frac{F_{\max }^2\mathcal {T}_N\phi (B)\phi (W)(\log R)^2}{W^2}&\left( \sum _{p > D_0} \frac{\phi (p)^4}{g(p)^2p^4} \right) \left( \sum _{\begin{array}{c} r < R \\ (r, W) = 1 \end{array}} \frac{\phi (r)^2}{g(r)r^2} \right) ^{k-1} \\&\ll \frac{F_{\max }^2\mathcal {T}_N\phi (B)\phi (W)^k (\log R)^{k+1}}{W^{k+1}D_0}, \end{aligned}

which is also negligible. Therefore,

\begin{aligned} S_2^{(m)}&= \frac{\phi (B)\phi (W)}{W^2} \sum _{\begin{array}{c} r_i, i \ne m \\ (r_i, W) = 1 \end{array}} \prod _{i \ne m} \left( \frac{\phi (r_i)^2\mu (r_i)^2}{g(r_i)r_i^2} \right) \sum _{q} \left( \mathcal {G}^{(q)}_{r_1, \ldots , r_{m-1}, r_{m+1}, \dots , r_k}\right) ^2 \nonumber \\&\quad + O\left( \frac{F_{\max }^2\phi (B)\phi (W)^k (\log R)^{k+1}}{W^{k+1}D_0}\right) . \end{aligned}
(6.4)

Now, consider $$\gamma$$ defined on the primes in the following way: This was chosen so that $$h(\ell ) = 0$$ if $$\ell \mid W$$, and $$h(\ell ) = \frac{\phi (\ell )^2}{g(\ell )\ell ^2}$$ otherwise. As we want to apply Lemma 6.1, we can choose

\begin{aligned} L \ll 1 + \prod _{\ell \mid W} \frac{\log \ell }{\ell } \ll \log D_0. \end{aligned}

Note that

\begin{aligned} \mathfrak {S}&= \prod _\ell \left( 1 - \frac{\gamma (\ell )}{\ell } \right) ^{-1} \left( 1 - \frac{1}{\ell } \right) \\&= \frac{\phi (W)}{W} \prod _{\ell \not \mid W} \left( 1 - \frac{\gamma (\ell )}{\ell } \right) ^{-1} \left( 1 - \frac{1}{\ell } \right) = \frac{\phi (W)}{W} \prod _{\ell \not \mid W} \left( 1 - O\left( \ell ^{-2}\right) \right) \\&= \frac{\phi (W)}{W}\left( 1 - O\left( D_0^{-1}\right) \right) . \end{aligned}

Applying Lemma 6.1 $$k-1$$ times and substituting in the definition of $$\mathcal {G}^{(q)}_{r_1, \ldots , r_{m-1}, r_{m+1}, \ldots , r_k}$$ and $$H_d(t_m)$$, we have that where the first error term comes from Lemma 6.1 and the second comes from earlier. The first error term is negligible, which completes the proof. $$\square$$

As each q in $$\sum ^{\dagger }$$ only has prime factors that are at least $$N^\eta$$, we know that every divisor $$d > 1$$ of q is at least $$N^\eta .$$ Therefore, if F is chosen to be supported on $$x_i \le \frac{\log N^{\eta }}{\log R}$$, then all terms with $$d > 1$$ in (6.2) vanish. Since $$\frac{\log N^{\eta }}{\log R} \ge \frac{2\eta }{\theta }$$, we observe that imposing F to be supported on

\begin{aligned} \left\{ (x_1,\ldots , x_k) \in [0,1]^k :x_i \le \frac{2\eta }{\theta }\right\} \end{aligned}
(6.5)

accomplishes this goal. Given this discussion, we have the following corollary.

### Corollary 6.4

If F is supported on (6.5), then

\begin{aligned} S_2^{(m)} = (1 + o(1))\frac{\mathcal {T}_N\phi (B)\phi (W)^k(\log R)^{k + 1}}{W^{k + 1}}J_k^{(m)}(F). \end{aligned}

## Smooth choice of F

We now choose a constant $$\eta$$ and a function F to give a large lower bound for (2.8).

### Lemma 7.1

Define

\begin{aligned} I_k(F) = \int _0^1 \int _0^1 \ldots \int _0^1 F(t_1, \ldots , t_k)^2 dt_1 \ldots dt_k \end{aligned}

and

\begin{aligned} J_k^{(m)}(F) = \int _0^1 \int _0^1 \ldots \int _0^1 \left( \int _0^1 F(t_1, \ldots , t_k) dt_m \right) ^2 dt_1 \ldots dt_{m-1} dt_{m+1} \ldots dt_k. \end{aligned}

Let $$A >0$$,

\begin{aligned} T = \frac{e^A-1}{A}, \text { and }\sigma = \frac{1}{A^2}\left( A-1+e^{-A}\right) . \end{aligned}
(7.1)

If $$1 - \frac{T}{k} - \sigma > 0$$, then there exists a smooth symmetric function $$F: [0,1]^k \rightarrow \mathbb R$$ supported on $$\{(x_1, \ldots , x_k) :x_i \le T/k \}$$ such that

\begin{aligned} \frac{\sum _{m=1}^k J_k^{(m)}(F)}{I_k(F)} \ge A\left( 1 - \frac{Ae^A}{k(1 - A/(e^A-1) - e^A/k)^2} \right) . \end{aligned}

### Proof

This is proved in [8, Section 7] for

\begin{aligned} F(x_1,\ldots ,x_k):= {\left\{ \begin{array}{ll} \prod _{i=1}^k g(kx_i) &{} \text{ if } \sum _{i=1}^k x_i \le 1, \\ 0 &{} \text{ otherwise }, \end{array}\right. } \end{aligned}

where

\begin{aligned} g(t):= {\left\{ \begin{array}{ll} \frac{1}{1+At} &{} \text{ if } 0 \le t \le T, \\ 0 &{} \text{ otherwise }. \end{array}\right. } \end{aligned}

$$\square$$

The function F defined above is supported on $$\{(x_1, \ldots , x_k) :x_i \le T/k \}$$. Since we need F to be supported on (6.5) in order to apply Corollary 6.4, we let

\begin{aligned} \eta = \frac{T\theta }{2k}, \end{aligned}

Setting $$y_{r_1,\ldots ,r_k}$$ equal to $$F\left( \frac{\log r_1}{\log R},\ldots ,\frac{\log r_k}{\log R}\right)$$ for the function F given in Lemma 6.2, we have

\begin{aligned} S_2^{(m)} = (1+o(1))\frac{\mathcal {T}_N\phi (B)\phi (W)^k (\log R)^{k+1}J_k^{(m)}(F)}{W^{k+1}}, \end{aligned}

Also, recall from (2.5) that

\begin{aligned} S_1 = (1+o(1)) \frac{NB \phi (W)^k (\log R)^k I_k(F)}{W^{k+1}}. \end{aligned}

We now prove the following lower bound on $$\mathcal {T}_N$$ stated in Proposition 2.3.

### Lemma 7.2

For $$0< \eta < \frac{1}{2(r-1)}$$, we have

\begin{aligned} \mathcal {T}_N \ge (1+o(1))\frac{\delta ^r N}{(\log N)(r-1)!}\left( \log \frac{1}{2(r-1)\eta } \right) ^{r-1}. \end{aligned}

### Proof

We have

\begin{aligned} \mathcal {T}_N \ge (1+o(1))\sum _{\begin{array}{c} q = p_1\ldots p_{r-1} \\ N^\eta \le p_i \le N^{\frac{1}{2(r-1)}} \\ p_1< \cdots < p_{r-1} \end{array}} \frac{\delta N}{\log (N/q)} \frac{1}{q}, \end{aligned}

where the $$1+o(1)$$ factor comes from 1.4. Simplifying the above expression, we have that $$\mathcal {T}_N$$ is at least

\begin{aligned}&(1+o(1)) \frac{\delta N}{\log N} \sum _{\begin{array}{c} q = p_1\ldots p_{r-1} \\ N^\eta \le p_i \le N^\frac{1}{2(r-1)} \\ p_1< \ldots < p_{r-1} \end{array}} \frac{1}{q} = (1+o(1))\frac{\delta N}{(\log N) (r-1)!} \left( \sum _{\begin{array}{c} N^\eta \le p \le N^\frac{1}{2(r-1)} \\ p \in \mathcal {P} \end{array}} \frac{1}{p} \right) ^{r-1} + E_{rep }, \end{aligned}

where $$E_{rep }$$ denotes the contribution from repeated primes. This contribution is

\begin{aligned} \ll \frac{\delta N}{\log N} \left( \sum _{N^\eta \le p \le N^\frac{1}{2(r-1)}} \frac{1}{p^2} \right) \left( \sum _{N^\eta \le p \le N^\frac{1}{2(r-1)}} \frac{1}{p} \right) ^{\min (0,r-3)} \ll \frac{N (\log N)^r}{N^\eta }, \end{aligned}

which is negligible.

Let $$\varepsilon = \frac{1}{\log N}$$, and split the interval $$[N^\eta , N^\frac{1}{2(r-1)}]$$ into intervals $$[(1+\varepsilon )^jN^\eta , (1+\varepsilon )^{j+1} N^\eta ]$$ for all

\begin{aligned} 0 \le j \le \left( \log \left( \frac{N^\frac{1}{2(r-1)}}{N^\eta }\right) / \log (1 + \varepsilon )-1\right) . \end{aligned}

By 1.4, we have

\begin{aligned} \sum _{\begin{array}{c} (1+\varepsilon )^jN^\eta \le p \le (1+\varepsilon )^{j+1}N^\eta \\ p \in \mathcal {P} \end{array}} \frac{1}{p}&\ge (1+o(1)) \frac{\delta \left( (1+\varepsilon )^{j+1} N^\eta - (1+\varepsilon )^j N^\eta \right) }{(1+\varepsilon )^{j+1} N^\eta \log ((1+\varepsilon )^{j+1} N^\eta )} \\&= (1+o(1))\frac{\delta \varepsilon }{(1+\varepsilon )\log ((1+\varepsilon )^{j+1}N^\eta )} \\&= (1+o(1))\frac{\delta \varepsilon }{\log \left( (1+\varepsilon )^{j+1}N^\eta \right) }. \end{aligned}

Finally, a direct computation shows that

\begin{aligned} \sum _{0 \le j \le \log \left( N^\frac{1}{2(r-1)}/N^\eta \right) / \log (1 + \varepsilon ) -1} \frac{\delta \varepsilon }{\log ((1+\varepsilon )^{j+1}N^\eta )} = (1+o(1))\delta \log \left( \frac{1}{2(r-1)\eta }\right) . \end{aligned}

Overall, we have

\begin{aligned} \mathcal {T}_N \ge (1+o(1))\frac{\delta ^r N}{(\log N)(r-1)!}\left( \log \frac{1}{2(r-1)\eta } \right) ^{r-1}. \end{aligned}

$$\square$$

We assume from now on that $$k \ge e^r$$, and choose $$A = \frac{\log k}{r}$$. Using the notation of (7.1), one can check that $$1 - \frac{T}{k} - \sigma > 0$$, so it follows by Lemma 7.1 that

\begin{aligned} \frac{\sum _{m=1}^k J_k^{(m)}(F)}{I_k(F)} \ge A\left( 1 - \frac{Ae^A}{k(1 - A/(e^A-1) - e^A/k)^2} \right) \ge \frac{\log k}{r} - 1, \end{aligned}
(7.2)

since $$k \ge e^r$$. Also, since $$\eta = \frac{T\theta }{2k}$$, we have

\begin{aligned} \log \frac{1}{2(r-1)\eta } \ge \log \frac{\frac{1}{r} (\log k) k^\frac{r-1}{r}}{(r-1) \theta } \ge \log \frac{k^\frac{r-1}{r}}{(r-1)\theta }, \end{aligned}
(7.3)

where we have again used the fact that $$k \ge e^r$$.

We have shown in Proposition 2.5 that in order to complete the proof of Theorem 2.1, it suffices to show that for some k, we have

\begin{aligned} \frac{\theta \phi (B)\delta ^r \sum _{m=1}^k J^{(m)}_k(F)}{2B (r-1)! \cdot I_k(F)} \left( \log \frac{1}{2(r-1)\eta } \right) ^{r-1} - \rho > 0. \end{aligned}

By (7.2) and (7.3), the above inequality follows from

\begin{aligned} \frac{\log k/e^r}{r} \left( \log \frac{k^\frac{r-1}{r}}{(r-1)\theta } \right) ^{r-1} > \frac{2B\rho (r-1)!}{\phi (B) \delta ^r \theta }. \end{aligned}
(7.4)

Since $$e^r \ge \left( \left( r-1\right) \theta \right) ^\frac{r}{r-1}$$ for $$r \ge 2$$ and $$\theta \le 1$$, it is easy to check that (7.4) holds for

\begin{aligned} k > \exp \left( r+\frac{r}{\delta }\left( \frac{2B\rho (r-1)!}{\phi (B)\theta (r-1)^{r-1}}\right) ^\frac{1}{r}\right) . \end{aligned}
(7.5)

By our discussion in Subsection 2.3, this is sufficient to prove Theorem 2.1.

## An example

In this section, we compute a bound for C(m) such that there are infinitely many m-tuples of $$E_2$$ numbers $$d_1 \le \cdots \le d_m$$ such that the following hold:

1. (1)

The class group $${\text {Cl}}\left( \mathbb Q(\sqrt{-d_i})\right)$$ has an element of order 4 for all $$1 \le i \le m$$.

2. (2)

$$d_m-d_1< C(m)$$.

We take $$\mathcal {P} = \{p \in \mathbb {P}: p \equiv 1 \pmod 8\}$$. Then, the set $$\mathcal {P}$$ has density $$\delta = \frac{1}{4}$$, satisfies a Siegel-Walfisz condition with $$B = 2$$, and has a level of distribution $$\theta$$ for any $$\theta < \frac{1}{2}$$. By (7.5), we have that (7.4) holds for $$\rho = m-1$$ and $$k > \exp (2 + 16\sqrt{2(m-1)})$$. Setting $$k = \lceil \exp (2 + 16\sqrt{2(m-1)}) \rceil$$, we can choose C(m) to be the diameter of any admissible set of size k by Theorem 2.1. We choose the admissible set to consist of the elements $$n + h_1, n+h_2, \dots , n+h_k$$, where $$h_i$$ is the i-th smallest prime greater than k. Using the bounds provided in  as well as $$k > \exp (18)$$, we have that there are at most $$\frac{k}{\log k} + \frac{k}{(\log k)^2}$$ primes less than k, and that the $$\lfloor k + \frac{k}{\log k} + \frac{k}{(\log k)^2} \rfloor$$-th prime is at most

\begin{aligned} k\left( 1 + \frac{1}{\log k} + \frac{1}{(\log k)^2}\right) (\log k + \log \log k - 0.9061) \end{aligned}

Thus, we may choose

\begin{aligned} C(m) = k\left( 1 + \frac{1}{\log k} + \frac{1}{(\log k)^2}\right) (\log k + \log \log k - 0.9061) - k \end{aligned}

where $$k = \lceil \exp (2 + 16\sqrt{2(m-1)}) \rceil$$.

## References

1. 1.

Bombieri, E., Friedlander, J.B., Iwaniec, H.: Primes in arithmetic progressions to large moduli. Acta Math. 156(3–4), 203–251 (1986)

2. 2.

Chen, J.R.: On the representation of a larger even integer as the sum of a prime and the product of at most two primes. Sci. Sin. 16, 157–176 (1973)

3. 3.

Chung, P.N., Li, S.: Bounded gaps between products of special primes. Mathematics 2(1), 37–52 (2014)

4. 4.

Dusart, P.: The kth prime is greater than $$k({\rm ln}\, k+ {\rm ln \, ln} k-1)$$ for $$k\ge 2$$. Math. Comp. 68(225), 411–415 (1999)

5. 5.

Goldston, D.A., Graham, S.W., Pintz, J., Yildirim, C.Y.: Small gaps between primes or almost primes. Trans. Amer. Math. Soc. 361(10), 5285–5330 (2009)

6. 6.

Goldston, D.A., Graham, S.W., Pintz, J., Yıldırım, C.Y.: Small gaps between products of two primes. Proc. Lond. Math. Soc. 2013(2), 477–480 (2013)

7. 7.

Goldston, D.A., Pintz, J.: Primes in tuples. I. Ann. of Math. 170(2), 819–862 (2009)

8. 8.

Maynard, J.: Small gaps between primes. Ann. of Math. (2) 181(1), 383–413 (2015)

9. 9.

Motohashi, Y.: An induction principle for the generalization of Bombieri’s prime number theorem. Proc. Japan Acad. 52(6), 273–275 (1976)

10. 10.

Murty, M. R., Murty, V. K.: A variant of the Bombieri-Vinogradov theorem. Number theory (Montreal, Que., 1985). 7, 243–272 (1987)

11. 11.

Ono, K.: Twists of elliptic curves. Compos. Math. 106(3), 349–360 (1997)

12. 12.

Sono, K.: Small gaps between the set of products of at most two primes. arXiv e-prints, (May 2016). https://arxiv.org/abs/1605.02920

13. 13.

Soundararajan, K.: Divisibility of class numbers of imaginary quadratic fields. J. Lond. Math. Soc. 61(3), 681–690 (2000)

14. 14.

Thorne, F.: Bounded gaps between products of primes with applications to ideal class groups and elliptic curves. Int. Math. Res. Not. IMRN, no. 5, Art. ID rnm 156, 41 (2008)

15. 15.

Thorner, J.: Bounded gaps between primes in Chebotarev sets. Res. Math. Sci 1(4), 16 (2014)

16. 16.

Zhang, Y.: Bounded gaps between primes. Ann. Math. 179(3), 1121–1174 (2014)

## Acknowledgements

This research was supervised by Ken Ono at the Emory University Mathematics REU and was supported by the National Science Foundation (Grant Number DMS-1557960). We would like to thank Ken Ono and Jesse Thorner for offering their advice and guidance and for providing many helpful discussions and valuable suggestions on the paper. We would also like to thank the anonymous referees for their helpful comments and suggestions.

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Author information

Authors

### Corresponding author

Correspondence to Zhuo Qun Song.