Step 1: Setup. Let A={n(n+2):n≤x}, P={p:p prime}, z=x1/2. An element n survives the sieve (i.e., (n(n+2),P(z))=1) only if both n and n+2 have no prime factor below z, hence both are prime (or 1).
Step 2: Brun's combinatorial sieve. Truncate the Mobius inclusion-exclusion at level 2r (even, for an upper bound):
S(A,z)≤∑d∣P(z)Ω(d)≤2rμ(d)∣Ad∣
where Ad={n≤x:d∣n(n+2)}.
Step 3: Counting ∣Ad∣. For squarefree d with d∣n(n+2): the number of residues nmodd with d∣n(n+2) is ω(d)=∏p∣dω(p) where ω(p)=2 for p>2 (since n≡0 or n≡−2modp) and ω(2)=1. So ∣Ad∣=dω(d)x+rd with ∣rd∣≤ω(d)≤2Ω(d).
Step 4: Main term estimate. The main term gives:
S≤x∑d∣P(z)Ω(d)≤2rdμ(d)ω(d)+∑d∣P(z)Ω(d)≤2r2Ω(d)
Choosing r=cloglogx (Brun's choice), the main term is ≪x∏2<p<z(1−2/p)≪(logz)2x≪(logx)2x times factors of (loglogx)O(1) from the truncation.
The remainder sum is bounded by ∑d≤D2Ω(d)≤D⋅(logD)O(1) with D=z2r=xc′loglogx, which is o(x/(logx)2) for appropriate c.
Step 5: Conclusion. π2(x)≤S(A,z)≪(logx)2x(loglogx)2. The sum ∑p≤x,p+2 prime1/p is then bounded by partial summation: ∑1/p≤∫2xtdπ2(t)≪∫t(logt)2(loglogt)2dt<∞. □