Let p<q be the largest prime factors of n and n+1, in either order. For X3/4+η≤H≤X, the number of n∈(X,X+H] with q/p≤1+d is Oη(dHlog(2+dX)/(logX)2), uniformly for 0<d≤1. Imposing ∣n/(pq)−1∣≤w≤1/2 gives Oη(wdH/(logX)2). For fixed window widths both estimates hold down to H=X2/3+η. At H=X, matching lower bounds give the order of the first count whenever dX≥(logX)1+δ for fixed δ>0.
Introduction
Write P+(n) for the largest prime factor of n>1. The largest prime factors p<q of n,n+1 are distinct since n and n+1 are coprime. Let Nσ(X,H,d) count the integers X<n≤X+H with q≤(1+d)p, where σ=+1 if p=P+(n) and σ=−1 otherwise. Let Bσ(X,H,d,w) count those that also satisfy ∣n/(pq)−1∣≤w. We take 0<H≤X, 0<d≤1, 0<w≤1/2, and put L=logX, Y=dX, and r=H/X.
For s,v>0 define
RX(s,v)=min{s,X−1/6v1/3,X−1/3v−1/3}.
Theorem 1.1. For each fixed η>0, uniformly in both orientations,
Nσ(X,H,d)≪ηL2dHlog(2+Y)if r≥XηRX(d,d).(1)
For H=X the bound is absolute. For sufficiently large X the count is zero if (X+H)d2≤2.
If H=X and 1<Y≤2, one also has
Nσ(X,X,d)≪log2(2+(Y−1)X)1+(Y−1)X.(2)
Theorem 1.2. For each fixed η>0, uniformly in both orientations,
Bσ(X,H,d,w)≪ηL2wdHif r≥XηRX(min(d,w),dw).(3)
For H=X the bound is absolute. For sufficiently large X the count is zero if
wd(1+d)(1−w)X+H<1−X3.
The last two terms in RX(s,v) cross at v=X−1/4. Their minimum is at most X−1/4, giving the uniform threshold H≥X3/4+η. For fixed positive widths the last term gives H≥X2/3+η after decreasing η in the estimates.
Theorem 1.3. For each fixed c>0, uniformly for cL≤Y≤X,
Nσ(X,X,d)≫cL2dXlog(2+Y/L).(4)
also with the strict endpoint q<(1+d)p. Hence the order is dXlogY/L2 when Y≥L1+δ for fixed $\delta>0.
Erdős and Pomerance [2] used complementary cofactors to study the separation of the largest prime factors of consecutive integers. For fixed ratio windows about 1, Kim [6] obtained a lower bound, and Yang [9, Theorem 1.7 and Remark 1.8] proved a lower bound of order X/logX and proposed the matching upper bound. We obtain that order in each orientation. Our upper bound uses reciprocal congruences modulo differences of prime factors or cofactors. A change to product coordinates separates the stationary phases, allowing the spectral large sieve on unit intervals.
Sieve estimates
For j≥1, write Wj(v)=(v/φ(v))j for positive integers v. For V≥1 we use
Indeed Wj(v)=∑ℓ∣vgj(ℓ) with gj multiplicative, supported on squarefree integers and 0≤gj(ℓ)≪jℓ−1 for primes ℓ. The sum ∑ℓgj(ℓ)/ℓ converges. For the last bound, a divisor ℓ is coprime to h and imposes one residue on k. The terms K/ℓ give Oj(K), and the errors sum to Oj((log(2hK))Oj(1))=Oj(K) by the Euler product over ℓ≤2hK and Mertens’ estimates.
We record the uniform version of Selberg’s upper sieve used below. For ν∈{1,2,3} and D≥1, retain primes ℓ>2ν with ℓ∤D. Let 0<g(ℓ)≤ν/ℓ with g(ℓ)=ν/ℓ+Oν(ℓ−2), and extend g multiplicatively on squarefree products of the retained primes. There are weights λj, supported on those products j≤z, such that
To see this, put A(j)=∏ℓ∣j(1/g(ℓ)−1) and G(z)=∑j1/A(j), summing over the support. The quadratic form equals ∑jA(j)(∑j∣kλkg(k))2. Choose the inner sum to be μ(j)/(G(z)A(j)). Inversion gives λ1=1 and ∣λj∣≤1/(g(j)A(j))≤2ω(j)≤j. This choice gives the value 1/G(z). In the Euler product for ∑j1/A(j) over retained primes up to zcν, the weighted mean of logj is ∑ℓ≤zcνg(ℓ)logℓ with the sum restricted to retained primes. This is at most 21logz for small fixed cν>0, by ∑ℓ≤x(logℓ)/ℓ≪log(2x). At least half the mass lies at j≤z. The product is ≫ν(logz)ν/Wν(D), by (1−g(ℓ))−1=(1−1/ℓ)−ν(1+Oν(ℓ−2)) and Mertens’ estimates. This proves (6).
Lemma 2.1. For ν≤3 integral affine forms with nonzero slopes and pairwise nonzero determinants, let D be the absolute product of the slopes and determinants. Among integers in an interval of length T≥2, the number on which all forms are prime and exceed T1/20 is
≪νlogν(2T)TWν(D).
Proof. For a retained prime there are exactly ν distinct roots of the product of the forms. With z=T1/20, the squared sum of the weights λj over j dividing that product majorizes the prime-tuple indicator. Expansion gives the main term T/G(z) and error ≪∑i,j≤z∣λiλj∣≪z6. This error is absorbed by the claimed bound. Bounded T is covered by trivial counting. □
In particular, for P≥2 and 0<d≤1, applying Lemma 2.1 to p, p+h and summing over 1≤h≤2dP gives
#{P≤p<2P,p<q≤(1+d)p:p,q prime}≪log2(2P)dP2.(7)
Lemma 2.2. Let m≥1, (c,m)=1, and
F(x,y)=χ((x−x0)/U)ψ((y−f(x))/V),
where χ,ψ are fixed smooth nonnegative functions of compact support. On an interval containing the support in x, suppose either f is constant and D=0, or
∣f′′(x)∣≍DV/U2,∣f′′′(x)∣≪DV/U3.
For each residue pair modulo t with (t,m)=1, the F-weighted count on xy≡c(modm) in that pair is
(mt)2φ(m)∬F+Oε(mε[m(1+D+m1+DU)+mV]).(8)
At primes ℓ∤m, ℓ>2ν, let a fraction g(ℓ)=ν/ℓ+Oν(ℓ−2) of residue pairs is forbidden, with 0<g(ℓ)≤ν/ℓ. The count avoiding those pairs for ℓ≤z is
≪εm(logz)2UVWν(m)+z8Em,
where Em is the error bound in (8) with its implied constant. Proof. Put M=mt and use Poisson summation on the two residue coordinates. The zero mode gives the stated integral, and each other mode k,l has coefficient M−2F(k/M,l/M) times a Kloosterman sum modulo m, with both indices multiplied by units and with a factor of modulus one. Write S(k,l;m)=∑umodm∗e((ku+luˉ)/m), where e(t)=e2πit and the star restricts to units. We use the Weil–Estermann bound τ(m)m(k,l,m) and the Ramanujan bound ∣S(k,0;m)∣≤(k,m)[3, 5].
Integration in y gives Vψ(Vl/M). For the x-integral, let B=DV∣l∣/M and scale x by U. The derivative of the f-term ranges over an interval of length O(B), and the second derivative has size ≍B for B>0. Frequencies within distance O(1+B) of the derivative range contribute O(U/1+B) each by the second-derivative bound. Outside this interval, two integrations by parts give quadratic decay in the frequency distance. Summing over g∣k gives
C(gM1+B+1+BU).
For B=0 the same bound follows by Fourier decay. For l=0, summing V∣ψ(Vl/M)∣(1+B)±1/2 over g∣l gives O((M/g)(1+D)±1/2). For the plus sign use (1+Dv)1/2≤(1+D)1/2(1+v)1/2, and for the minus sign compare the decreasing majorant (1+v)1/2(1+Dv)−1/2 with its integral. After division by M2, the total is
C(g21+D+Mg1+DU).
Use (k,l,m)≤∑g∣(k,l,m)g and sum over g∣m. For l=0, summing the cutoff transform over the nonzero multiples of g costs O(M/g); expanding the Ramanujan bound over divisors gives O(τ(m)V/M). These estimates prove (8).
For the sieve, expand the square of the weights in (6). For t=[i,j] the simultaneous forbidden conditions give t2g(t) residue pairs. Their main terms sum to φ(m)(∬F)g(t)/m2, and their errors cost at most t2Em. Since ∑i,j≤z∣λiλj∣[i,j]2≤z8, the stated bound follows. □
We use dimension two for the prime values
P1=(xy−c)/m,P2=((x+m)y−c)/m,c=±1.(9)
For ℓ∤m their zero sets modulo ℓ are disjoint and each has ℓ−1 points. Thus g(ℓ)=2(ℓ−1)/ℓ2. The same holds with x,y interchanged.
Determinant and progression estimates
Put e=(1−σ)/2 and write n+e=ap, n+1−e=bq. With h=q−p and k=a−b,
bh−kp=σ,n=hkp(p+h)+hσp−e.(10)
For p>2, the gap h is even, so bh−σ>0, k≥1, and (h,k)=1. Since 0<t=h/p≤d and q=2p, (10) gives
hk<nt2=hk+(hk+σ)t−et2≤3hk.(11)
Here hk≥2 makes the lower inequality strict in both orientations. In particular hk<(X+H)d2. The case p=2 requires q=3 and d≥1/2, so the exclusion in Theorem 1.1 follows for large X. Also 2/d≤p≪dX for p>2, by h≤dp and 1≤k≪dX/p. There are therefore O(log(2+Y)) admissible dyads for p.
If H=X and 1<Y≤2, then hk<4, hence h=2 and k=1. By (10), n≥p2/2, so the prime pair p,p+2 has p in [2/d,2X]. Apply Lemma 2.1 on an interval of length 2+O((Y−1)X) to obtain (2).
Progressions in the two counts
On a dyad p≍P, write A=X/P and take a gap dyad h≍d0P. Then k≍d0A by (10). At fixed h,k, the congruence kp≡−σ(modh) puts p in one class modulo h, and n′(p)≍A in (10). The progression parameter lies in an interval of length O(r/d0). If d0≤rX−ε, enlarge the interval to length ≍r/d0, which is ≫Xε and O(P). Lemma 2.1 applies to p,p+h, with weight W2(h). Summing over h,k gives
≪εL2rAh≍d0P∑W2(h)≪εL2rd0X.(12)
When r≥Xηd, choose ε<η so this covers all gap dyads, since d0≪d. In this range p>2 for large X. Summing geometrically over d0 and then over P proves the progression case of (1).
For the product band, p∈[X/3,2X], and
pqn=hk+{1/(hq),−1/(hp),σ=+1,σ=−1.(13)
As k=h, this gives 1−1/p≤wh and ∣k−h∣≪wh. The inequality
h≤d(1+d)(1−w)X+H
follows from h=tn/((1+t)(n/(pq))) and the monotonicity of t/1+t. This proves the exclusion in Theorem 1.2.
The integers b−p and k−h satisfy (b−p)h−(k−h)p=σ, so they have the same sign τ and neither is zero. Put u0=∣b−p∣, j=∣k−h∣, and c=τσ. Then
u0h−jp=c,q=p+h,n+1−e=(p+τu0)q.(14)
Since 1≤u0≤wp+1/q, we have u0≪wX. In dyads h≍d0X, u0≍w0X, one has j≍d0w0X. If d0≤rX−ε, use the h,k progression above with P≍X and only O(d0w0X) choices for k=h+τj. If w0≤rX−ε, fix u0,j,τ instead. Now u0q−(u0+j)p=c puts p in one class modulo u0, and n′(p)≪X in (14). Enlarge the parameter interval to length ≍r/w0, between Xε and O(X). The prime forms have slopes u0, u0+j and determinant of absolute value one. The weights W2(u0)W2(u0+j) sum to O(w0X) at fixed j, by Cauchy–Schwarz and (5). In both cases the sum of the weights cancels the reciprocal gap scale from the progression length. Thus the band dyad contributes
≪εL2rd0w0X(min(d0,w0)≤rX−ε).(15)
If r≥Xηmin(d,w), all gap dyads satisfy this condition for ε<η. Summing over d0,w0 proves the progression case of (3).
The outer prime-factor ranges
Take a dyad P≤p<2P, and assume H≥X2/3. For X1/10<P≤H, each prime pair gives at most 1+H/(pq)≪H/P2 integers by the Chinese remainder theorem. Equation (7) gives O(dH/L2) in the dyad.
For 2≤P≤X1/10 every prime factor of a is at most 2P. Multiply its prime factors, with multiplicity, until their product v is in [X1/10,2PX1/10]. This is possible since a≥X/(2P). Set ξ=1/(2log(2P)) and define gξ multiplicatively by gξ(ℓj)=ℓjξ−ℓ(j−1)ξ for primes ℓ≤2P, and zero for other prime powers. Then
The last estimate follows from ℓξ−1≪ξlogℓ and ∑ℓ≤2P(logℓ)/ℓ≪log(2P). For a fixed pair p,q and an eligible j, the conditions pj∣n+e and q∣n+e+σ give at most O(H/(pqj)) integers since pqj≪X2/5. If q∣j the conditions are incompatible. Using (7), the dyad contributes
≪log2(2P)dHexp(−20log(2P)L)≪L2dH.
At the opposite end, put A=X/P and suppose A≤HX−ε. Then a,b≍A, and 1≤k≤2bh/p≪dA by (10). For fixed a,b, (a,b)=1 and ap+σ=bq gives two affine forms for p,q with slopes b,a and determinant of absolute value one. Their parameter interval has length H/(ab)≍H/A2≫X2ε, and the prime values are ≫P. Lemma 2.1 gives Oε(HW2(a)W2(b)/(A2L2)). At each k the sum of W2(a)W2(a−k) over the relevant a≍A is O(A) by Cauchy–Schwarz and (5). Summing over k≪dA gives Oη(dH/L2) in the dyad.
A sieve for product constraints
For m=MK, x=X1Ku, and y=X2Kv, take the nonnegative weight
Fm(x,y)=χ(K,u,v)Ψ(rK2Q1(u)Q2(v)−1).(16)
Here K,u,v lie in fixed compact positive intervals. Each Qi(t) is t or t(t+γi), with bounded γi and with t+γi in a fixed positive compact interval on the support. The smooth cutoffs have uniformly bounded derivatives and are supported where K2Q1(u)Q2(v)≍1. We count xy≡c(modm), c=±1, with either x, x+m or the pair in (9) prime above z=Xc0ε, for
Lemma 4.1. Suppose X−1/3+η≤r≤1, X1,X2,M≤X2, and M/Xi≪1. If M≫1 and Xi/M≪r−1X2ε for i=1,2, the count with weight (16) is
≪εL2rX1X2+XO(ε)rM3/2.(17)
If M≥X1/20 and X1X2≫X3/4, it is also
≪η,εL2rX1X2+XεrX1X2.(18)
Proof. At fixed K, solving K2Q1(u)Q2(v)=1 for v gives a graph with −v′≍1 and v′′≍1, by (logQi)′≍1 and (logQi)′′≍−1. Its derivatives are uniformly bounded on the relevant compact intervals. The weight is majorized by a strip of thickness O(r) in v, so Lemma 2.2 applies with U≍X1, V≍rX2, and D≍1/r. The local densities outside m are 2/ℓ for the affine pair and 2(ℓ−1)/ℓ2 for (9). Summing the main terms by (5) and the errors O(XO(ε)M/r) per modulus proves (17).
For (18), sieve the product of the two prime values. Every squarefree sieve divisor D splits uniquely into D1D2, according to which value is divisible by each prime factor. The assignments are disjoint because a common prime divisor would divide c. Let α≡0(modD1), α≡1(modD2).
For the values (9) the sifted congruence is exactly
y(x+αm)≡c(modmD).
This follows by reducing modulo mD1 and mD2, whose least common multiple is mD. Poisson summation gives S(k,cl;mD) with the phase e(−kα/D), up to a choice of Fourier signs, and weight (mD)−2Fm(k/(mD),l/(mD)).
For x,x+m the restriction is x=Dx′−αm and (m,D)=1. Poisson summation uses x′y≡cD(modm) and the complete sum S(k,clD;m). Lift it using
S(Dk,cl;mD)=cD(l)S(k,clD;m),(m,D)=1.
Here cD(l) is a Ramanujan sum, nonzero for squarefree D. The shift phase depends only on k, the multiplier 1/cD(l) has modulus at most one, and Möbius inversion removes (m,D)=1 at levels Dd0, d0∣D. In this case the weight is D(mD)−2Fm(k/(mD),Dl/(mD)).
For the zero mode put W(m)=m−1∬Fm. Changing v into K2Q1(u)Q2(v) at fixed K,u shows
∫W≪rX1X2,sup∣W∣+∫∣W′∣≪rX1X2/M.
The zero modes average D−1φ(mD)/(mD) or D−11(m,D)=1φ(m)/m against W(m). Both have mean ζ(2)−1∏ℓ∣D(ℓ+1)−1. Expanding φ(n)/n=∑a∣nμ(a)/a gives 1−ℓ−2 at unrestricted primes and (1−1/ℓ)/ℓ at primes dividing D. Partial summation in this expansion costs O(τ(D)L(sup∣W∣+∫∣W′∣)), since each congruence contributes O(τ(D)) to the counting error and the reciprocal divisor sum is O(L). Thus summing the assignments gives g(ℓ)=2/(ℓ+1) in (6). The zero-mode main term is Oε(rX1X2/L2), and the error saves a power since M≥X1/20.
Let k,l be the Fourier numerators at denominator mD, with effective frequencies a1=kX1/(mD), a2=lX2/(mD). Fix B=Xε0 with ε0>0 small. For max(∣a1∣,∣a2∣)≤B away from the origin, M/Xi<1 gives O((DB)2) modes with original indices O(DB). The Weil bound and Fm≪rX1X2 give a relative error M−1/2XO(ε0), including modes on the axes. For the other modes use K2Q1(u)Q2(v)=1+rs. At fixed K,s, −dv/du≍1, so integration by parts in u discards incomparable frequencies. At fixed K,u, ∂v/∂s≪r, which discards ∣a2∣>B/r. In each discarded range repeated integration gives arbitrary power saving after summation. The remaining dyads have ∣a1∣,∣a2∣≍U with B≪U≪B/r.
Apply the inverse Kuznetsov formula at level D, or Dd0 for the lifted affine case [1 Lemma 3]. The Bessel transform uses dm/m. After extracting S(k′,l′;mD)/(mD), the measure is X1X2/(MD)dudvdK, with an extra factor D in the affine case. Changing to Θ=K2Q1(u)Q2(v)=1+rs gives a smooth amplitude of size O(rX1X2/M). The product of the lifted indices has magnitude ∣kl∣ in either case, so the phase and Bessel argument are
The Bessel argument is O(U/X1X2)≪X−1/24+O(ε0).
Expand the inverse kernels using the series of J±2it and I±2it. For real ∣t∣≥1, Stirling’s formula gives coefficients of size O(∣t∣−1/2) after extracting ξ±2it, and the small Bessel argument permits truncation with arbitrary power saving by taking enough terms. At fixed Θ the two spatial phases are
−2πa1u±tlogQ1(u),−2πa2v±tlogQ2(v).
Unless ∣t∣≍U with compatible signs, one derivative is ≫U+∣t∣, giving arbitrary decay by integration by parts. For real ∣t∣≤1, the differences of Bessel series cost at most O(1+∣logξ∣). For imaginary t the powers have polynomial size in X and bounded logarithmic derivatives, so the same argument applies to the Fourier phases. For the holomorphic kernel Jk−1(ξ), integrate by parts when k≤U1/2 and use (Cξ)k−1/Γ(k) otherwise. The ordinary spectral large sieve [1 Lemma 4] bounds the coefficient sums in these discarded ranges.
With compatible signs, (logQi)′=2π∣ai∣/∣t∣ has a unique stationary solution since (logQi)′ decreases from infinity to zero. The phase curvatures have size ≍U, uniformly in γi. Applying stationary phase in each variable [7 Theorem 3] gives a finite expansion with arbitrary power-saving remainder. Each term has amplitude O(rX1X2/(MU3/2)), from two factors U−1/2 of stationary phase and the Bessel coefficient. Its phase separates into exp(iΦ1,k(t))exp(iΦ2,l(t)), with the powers ∣ai∣±it absorbed separately. The normalized amplitudes have bounded derivatives in the scaled indices. The stationary points depend smoothly on ai/U,t/U,γi, stay in compact subsets of the positive domains, and may be evaluated against cutoffs extended by zero. Differentiation of the stationary actions gives bounds O(logX) for their first t-derivatives and Oj(U1−j) for order j≥2.
Expand the amplitudes in Fourier series in the normalized indices, with summable bounds on the suprema of the coefficients over t. On each unit interval at ∣t∣≲U, remove the phase values at its midpoint. The resulting exponentials, with a smooth extension to a bounded interval, have Fourier expansions in t of ℓ1 norm bounded by powers of logX, by the derivative bounds. The separated coefficient vectors have norm product
≪XO(ε0)X1X2MU.
by the frequency spacings in a1,a2. For a nonempty dyad its length suffices for its lattice spacing. The lifted indices are ≪DO(1)U since M/Xi≪1.
At level q, Zhang’s unit-interval large sieve [10 Theorem 2.2.1] bounds the cuspidal and continuous quadratic forms on coefficients supported at size N by ≪ε(qUN)ε(N+qU) times the squared norm. See also Lam [8 Theorem 2.5] for the cuspidal form. In the normalization of [1 Lemma 3], the coefficients in these quadratic forms are ∣n∣ρ(n), with spectral weight 1/cosh(πt). The identity W0,it(4π∣n∣y)=2∣n∣yKit(2π∣n∣y) converts Zhang’s K-Bessel coefficients. Dividing Zhang’s estimate by the hyperbolic volume converts his probability-measure cusp basis to the area-measure basis and cancels the explicit volume multiplying his Eisenstein term. The Gaussian is bounded below on the unit interval. Thus Cauchy–Schwarz costs UXO(ε0+c0ε) times the norm product per unit interval. Summing O(U) intervals with the transform size gives
≪XO(ε0+c0ε)rX1X2U3/2.
The coefficient norms are unchanged for negative indices, by parity for cusp forms and reflection of cusps for Eisenstein series. Summing dyads and sieve terms with small ε0,c0 proves the estimate.
Applying the product sieve
Write ω=d for the full count and ω=dw for the band, and put
S=min{X−1/6ω1/3,X−1/3ω−1/3}.
The progression cases were proved in § 3. The remaining hypothesis is r≥XηS. By the exclusions in Theorems 1.1 and 1.2, a nonempty count has ω≫X−1/2. Hence r≫X−1/3+η, which suffices for Lemma 4.1 with a smaller η. Throughout, ε is sufficiently small in terms of η.
The full ratio window
For p≍P, set A=X/P. § 3 covers P≤H and A≤HX−ε. Equation (12) covers the gap dyads h≍d0P with d0≤rX−ε. In the remaining ranges set R=min(P,A) and R′=X/R. Use the scales
M=d0R,X1=R,X2=d0R′.
For P≤X take (m,x,y)=(h,p,k). The congruence is xy≡−σ(modm) and the prime forms are x,x+m. For P>X take (m,x,y)=(k,b,h). The congruence is xy≡σ(modm) and the primes are (9). In both cases
Xn=K2u(u+d0)v+O(d0X1).
under the substitutions in (16). The two identities giving this model are (10) and n=(b+k)(bh−σ)/k−e. The error is o(r) since d0>rX−ε. Also R≤R′ and R2≥HX−2ε, so the scales meet the hypotheses of Lemma 4.1. Choose its cutoffs to majorize the dyad and the interval for n. Here p,q≥P>H exceed z.
The product band
Use d0,w0,u0,j from (14) and the subsequent gap decomposition. Equation (15) covers min(d0,w0)≤rX−ε. Otherwise take (m,x,y)=(j,u0,h) with
M=d0w0X,X1=w0X,X2=d0X.
The prime forms are (9) with c=τσ. In the model variables, (14) gives p=KXuv−c/j and
Xn=K2u(u+d0)v(v+τw0)+O(d0w0X1).
The error is o(r) since d0,w0>rX−ε and r≫X−1/3+η. The range b≍X gives v+τw0≍1, which is imposed on the support of the majorant. The scale conditions follow from d0,w0>rX−ε.
Summation
Write ω0=d0 or d0w0, so X1X2=ω0X and M≤ω0X. Use (17) when ω0≤X−1/4 and (18) otherwise. In the latter range M≫X1/12−ε, so both size conditions in (18) hold. The error in either case is
≪rXO(ε)min{X3/4,ω03/2,X1/2ω0},
with the terms crossing at ω0=X−1/4. Both the main term and this error sum geometrically over the gap dyads, since halving ω0 multiplies each error term by at most 2−1/2. The main terms total Oη(ωH/L2), per prime-factor dyad for the full count. The total error divided by ωH is O(XO(ε)(S/r)3/2), which saves a power of X. Finally the full count sums over O(log(2+Y)) prime-factor dyads, including the possible dyad with p=2. This proves the upper bounds.
The matching range
We count integers with two prescribed prime divisors and discard those for which a prescribed prime is smaller than the largest prime factor. Yang [9 §5] uses this decomposition for fixed d. Here the range of prime dyads varies with Y.
Let P be a power of two with 4≤X/P≤Yβ, where 0<β≤1/1000 is a small absolute constant. The prime number theorem gives S≫P/L primes in [P,2P). Divide this interval into at most 3/d intervals of length at most dP/2. Cauchy–Schwarz gives at least (dS2/3−S)/2 pairs in a common interval, all with p<q<(1+d)p after ordering. Thus there are ≫dP2/L2 pairs whenever dP≥C0L for a large absolute C0. As pq≤X/4, the congruences p∣n+e, q∣n+1−e give at least X/(2pq) integers X<n≤2X for each pair. The initial count is ≫dX/L2.
In a discarded triple (n,p,q), one cofactor is mρ with ρ a larger prime and m≤M=3X/P2. For each choice of cofactor, the number of such tuples is
≪L3dXlog(2M)+X4/511{d≥X−1/100}.(20)
uniformly in β. For d≥X−1/100, fix m and the prime s on the side without ρ. The other prescribed prime v lies in an interval of length O(dP), and vρ≡±m−1(mods) since s∤m. Sift both coordinates in Lemma 2.2 with f constant, second side 3X/(mP), z=X1/1000, and local density 2/ℓ−1/ℓ2. The main term is O(dX/(mPL2)) per m,s. Summing over m≤M and O(P/L) primes s gives the first term of (20). The total error is
≪PMz8P1/1000(P+1+M)≪X4/5,
since M≤3Y2β≤3Xβ.
For d<X−1/100, fix h=q−p, m, and k=a−b. With s=q if a=mρ, and s=p if b=mρ, (10) gives hmρ=ks+σ and 1≤k≪hM. Since (k,hm)=1, s lies in one class modulo hm. The forms s,s±h,ρ have slopes hm,hm,k and absolute determinants h2m,1,∣σ∓kh∣, all nonzero as h is even. Enlarge the parameter interval to length 2P/(hm)≫1/(dM)≫X9/1000. Lemma 2.1 bounds the contribution by
≪hmL3PW3(h)W3(m)W3(k)W3(∣σ∓kh∣).
The last two weights sum to O(hM) over k≪hM by Cauchy–Schwarz and (5). Summing over m≤M and h≤2dP proves (20).
Since log(2M)≤log6+βL, a sufficiently small β makes the first term of (20) smaller than a fixed fraction of the initial count. The second term is negligible for dX≥X99/100. Each surviving triple specifies the actual largest prime factors and so contributes a distinct integer in its orientation.
When Y/L exceeds a large absolute constant, use the dyads with 4≤X/P≤min{Yβ,Y/(C0L)}. There are ≫βlog(2+Y/L) such dyads and all satisfy dP≥C0L.
For cL≤Y≤C1L with c,C1 fixed, take 4≤X/P<8. Goldston, Pintz and Yıldırım [4], Theorem 1, {(1.3)} give ≫cP/L consecutive prime pairs in this dyad with gap at most λ0logP for a fixed 0<λ0<c/16. They lie in the strict ratio window since dP≥cL/8, and P/L≫C1dP2/L2. Here M=O(1) and d<X−1/100, so (20) discards only O(dX/L3) tuples. This gives (4) in the remaining range.
For fixed 0<d≤1, summing dyadic intervals gives the upper bound of order x/logx up to x, and the final dyadic interval supplies the lower bound. For fixed d>1, the same per-dyad upper proof uses q≍dP, h≪dP, and cofactors of order X/P, and one sums O(logX) prime-factor dyads. The lower bound follows by inclusion. For a fixed descending window 1−ε≤P+(n+1)/P+(n)<1, take d=ε/(1−ε) in the opposite orientation.
Acknowledgment. The author used OpenAI’s GPT-6.2 Astra to formulate the results, develop and review the proofs, and draft the manuscript.
References
[1]V. Blomer and D. Milićević, The second moment of twisted modular L-functions, Geom. Funct. Anal. 25 (2015), 453–516.DOI
[2]P. Erdős and C. Pomerance, On the largest prime factors of n and n + 1, Aequationes Math. 17 (1978), 311–321.
[3]T. Estermann, On Kloosterman’s sum, Mathematika 8 (1961), 83–86.DOI
[4]D. A. Goldston, J. Pintz and C. Y. Yıldırım, Primes in tuples IV: Density of small gaps between consecutive primes, Acta Arith. 160 (2013), 37–53.arxiv.org/abs/1103.5886
[5]H. Iwaniec and E. Kowalski, Analytic Number Theory, Amer. Math. Soc. Colloq. Publ. 53, American Mathematical Society, 2004.
[6]S. Kim, Two remarks on the largest prime factors of n and n + 1, J. Integer Seq. 23 (2020), Article 20.10.1.
[7]E. M. Kiral, I. Petrow and M. P. Young, Oscillatory integrals with uniformity in parameters, J. Théor. Nombres Bordeaux 31 (2019), 145–159.DOI
[8]J. W. C. Lam, A local large sieve inequality for cusp forms, J. Théor. Nombres Bordeaux 26 (2014), 757–787.DOI
[9]Z. Yang, Note on the largest prime factors of consecutive integers, arXiv:2610.23280v1, 2026.arxiv.org/abs/2610.23280
[10]Q. Zhang, Bounds for Hecke eigenforms and their allied L-functions, Ph.D. thesis, The Ohio State University, 2015.