Step 1: Upper bound by squaring. For any real weights λdâ with λ1â=1 and λdâ=0 for d>D: (âdâŁn,dâŁP(z)âλdâ)2â„1 when (n,P(z))=1 and λ1â=1. Therefore:
S(A,z)â€âaâAâ(âdâŁ(a,P(z))dâ€Dââλdâ)2=âd1â,d2ââ€Dâλd1ââλd2âââŁA[d1â,d2â]ââŁ
Step 2: Separate main term and error. Substituting âŁAeââŁ=eÏ(e)âX+reâ with e=[d1â,d2â]:
Sâ€Xâd1â,d2ââλd1ââλd2ââ[d1â,d2â]Ï([d1â,d2â])â+âd1â,d2âââŁÎ»d1ââλd2âââŁâŁr[d1â,d2â]ââŁ
Step 3: Optimize the quadratic form. The main term is a quadratic form Q(λ)=âd1â,d2ââλd1ââλd2ââh(d1â,d2â) where h(d1â,d2â)=Ï([d1â,d2â])/[d1â,d2â]. Using the multiplicativity of Ï and Mobius factoring, this diagonalizes: Q=âeâŁP(z)âg(e)1â(âeâŁdâλdâ)2 where g(d)=âpâŁdâÏ(p)pâÏ(p)â.
Subject to λ1â=1, the minimum of Q (by Lagrange multipliers) is 1/G(z) where G(z)=âdâ€D,dâŁP(z)âÎŒ2(d)/g(d).
Step 4: Evaluate G(z). By multiplicativity and the Mertens-type estimate: G(z)=âp<zâ(1+pâÏ(p)Ï(p)â)â
(1+O(Dâc))â(logz)Îș where Îș is the sieve dimension. The error O(eâs/2) comes from the truncation dâ€D=zs.
Step 5: Conclusion. Sâ€X/G(z)(1+O(eâs/2))+R where R is the remainder depending on the individual error terms rdâ. âĄ