Each D'(p) is bounded below by a positive constant and uniformly bounded above, i.e., there exists c>0 such that D'(p)\ge c for all p (its “order is equal to the order of 1”).
In particular, when x is prime, C_{H,x}=0 if and only if there exists a prime p\in[x-H,x), i.e., the gap between x and the preceding prime is \le H. Such primes are called bad primes, while the others are good primes.
Define C_1 as the all‑1 sequence: C_{1,x}=1 for all x.
The total weight is
S(N,C)=\sum_{n\le N} F(n)\,w(n).
Let
\Delta = S(N,C_H)-S(N,C_1).
4. Expressing \Delta
For C_1: every prime satisfies F_1(p)=1; for a composite x, since there exists a prime factor y with F_1(y)=1, we have F_1(x)=0. Hence
S(N,C_1)=\sum_{p\le N} w(p).
For C_H: let G=\{p\le N: C_{H,p}=1\} (good primes) and B=\{p\le N: C_{H,p}=0\} (bad primes). Then
If p\in G, then F_H(p)=1; if p\in B, then F_H(p)=0.
For a composite x, F_H(x)=1 if and only if all prime factors of x belong to B (because if any prime factor y\in G, then F_H(y)=1 forces F_H(x)=0; if all prime factors are in B, they satisfy F_H=0, so F_H(x)=1).
Therefore
S(N,C_H)=\sum_{p\in G} w(p)+\sum_{\substack{x\le N,\;x\notin\mathbb{P}\\ \text{all prime factors}\in B}} w(x).
Notice that for any prime p (including those in B), the sum in condition (1) is exactly \sum_{x\in A_p} w(x), because F_H(x)=1 is equivalent to “all prime factors are in B”, and the condition that the smallest prime factor is p defines A_p. Thus from (1), setting
\varepsilon_p = w(p)-\sum_{x\in A_p} w(x),
we obtain
-D(p) < \varepsilon_p < D'(p).
\tag{4}
Equation (3) then becomes
\Delta = -\sum_{p\in B} \varepsilon_p.
\tag{5}
7. Comparing Orders
From (4), each \varepsilon_p is bounded above by D'(p) (positive and bounded below by a positive constant) and bounded below by -D(p) (which may be small). Since \sum_{p\le N} D(p)=o(N) and |B|\le\pi(N)=O(N/\log N), the crucial point is that \sum_{p\in B} D(p)=o(N); this contribution is negligible compared to |B| (which could be as large as \pi(N)). On the other hand, D'(p) is of order 1, i.e., there exists c>0 such that D'(p)\ge c for all p, and D'(p)=O(1).
If we can choose an admissible weight function w such that \varepsilon_p has the same sign and comparable magnitude as D'(p) (for instance, by construction making \varepsilon_p close to the positive value D'(p)), then \sum_{p\in B}\varepsilon_p is of the same order as \sum_{p\in B} D'(p), and consequently |\Delta| is of the same order as \sum_{p\in B} D'(p). Since each D'(p) has a positive constant lower bound, \sum_{p\in B} D'(p) is of the same order as |B| (the number of bad primes).
Thus, under the assumption that an admissible weight function exists with \varepsilon_p\asymp D'(p) (i.e., \varepsilon_p is positive and has a positive lower bound), we have
|\Delta| \asymp |B|.
\tag{6}
8. Equivalence
Denote B(N,H)=\#\{p\le N: p \text{ has a gap} \le H \text{ to the previous prime}\}. By (6), |\Delta| and B(N,H) are of the same order. Therefore:
If bounded prime gaps hold, i.e., there exists some H such that B(N,H)\to\infty as N\to\infty, then |\Delta|\to\infty, i.e., \Delta is unbounded.
Conversely, if for some H the quantity \Delta is unbounded as N\to\infty, then B(N,H)\to\infty, meaning there are infinitely many primes with gap \le H, i.e., bounded prime gaps exist.
Hence the bounded prime gap problem is equivalent to the existence of a constant H such that \Delta=S(N,C_H)-S(N,C_1) is unbounded as N\to\infty.
9. Remarks
The argument relies on the existence of an admissible weight function w and error terms D(p),D'(p) satisfying (1), together with a construction that ensures \varepsilon_p is of the same order as D'(p) (e.g., \varepsilon_p = D'(p)). In practice, such weight functions can be constructed using sieve methods from analytic number theory (e.g., the Selberg sieve or the Goldston–Yıldırım approach), where D'(p) is typically of order 1 and D(p) can be treated as an error term. Consequently, this equivalence provides a new perspective on the bounded prime gap problem: it suffices to analyze the growth of \Delta.