Theorem (Sieve of Erastothenes – Legendre). Assuming that:

  • A⊆[1,x]∩ℕ

  • 2≤z≤x

  • Assume the Sieve Hypothesis

Then S(A,P,z)=|A|∏p≤2p∈P(1−g(p))+O(x12( log ⁡x)122− log ⁡x4 log ⁡z(∑d≤xd|P(z)|Rd|2)12+|A|e log ⁡x log ⁡z∏p≤zp∈P(1+g(p))e)