The rational approximation below is taken in lowest terms, , with , and . This is necessary for denominator-sensitive exponential sum estimates and for the final Ramanujan sum to equal . If , the defining sum over is empty and ; hence we may assume .
Set , so , and write the given Vaughan identity term as the Type II sum
Use a dyadic decomposition into , , retaining . Empty blocks may be discarded; every remaining block has , , and there are blocks. Denote a block by . The Cauchy-Schwarz inequality gives
By the allowed divisor-square summatory bound, the first factor is . Expand the second factor. The diagonal contributes , using . For a pair , the allowed form the interval
Thus the exponential geometric sum bound applies to this interval even though the original block has a hyperbolic cutoff. For each difference , there are ordered pairs, giving an upper bound
for the expanded second factor, with an absolute constant accommodating integer endpoints. The supplied reciprocal fractional-part sum near a rational, with and , bounds the last sum by
One may also derive this directly from the separated reciprocal-distance sum by splitting into blocks of length at most ; the approximation error between two block points is at most , and the rational rotations are separated by .
Combining the estimates yields
Since and , both . Taking square roots proves
Summing the dyadic blocks establishes the rational-phase Type II estimate and, in particular, the requested bound with an explicit logarithmic power:
The Siegel–Walfisz theorem states that for fixed , uniformly for and ,
The constant is allowed to be ineffective. Apply this with to the reduced residue classes. Their contribution to the prime exponential sum is
since there are at most residue classes. To evaluate the Ramanujan sum, the Möbius divisor-sum identity gives . Then the finite geometric series gives
When , only remains, giving . The omitted nonunits contribute only prime powers with . For each such prime, the sum of their Von Mangoldt function weights is at most , so their total is at most , absorbed by the stated error. This proves the major-arc value of the prime exponential sum:
The original PDF does not state coprimality in this last request. Without it the asserted main term is genuinely false: makes and hence , whereas . For an arbitrary numerator the correct main term is , with given by the divisor formula above. Reducing the fraction before applying the boxed result is the equivalent repair.