# On a weighted sum in a lemma for sieve methods

I'm reading James Maynard's paper "Small gaps between primes". Lemma 6.1 (p.14) in this paper confused me. This lemma was taken from Goldston-Graham-Pintz-Yildirim's paper "Small gaps between products of two primes". In GGPY's paper, this lemma is referred to as lemma 4.

The point what I'm confused is the discontinuity of weighting function G. If we follow GGPY's proof of this lemma, I think Riemann-Stieltjes(?) integrals in their proof need not always exist because of discontinuity of G. If this was not problem, in the integration by parts at the last of this proof, we have perhaps some more terms arising from discontinuity of G. My question is following one related to this.

I think we need the total variation or the number of discontinuities of G as a factor in the error term of

$$\sum_{d<z}\mu(d)^2g(d)G\left(\frac{\log d}{\log z}\right)\\ =\mathfrak{S}\frac{\log^\kappa z}{\Gamma(\kappa)} \int_0^1G(x)x^{\kappa-1}dx+O_{A_1,A_2,\kappa}\left(\mathfrak{S}LG_{\max}(\log z)^{\kappa-1}\right).$$

Do we need this factor or not?

Certainly, this is not influence on Maynard's proof because G has only one discontinuity for application.

-