AbstractFor a set of primes {\mathcal{P}}, let {\Psi(x;\mathcal{P})} be the number of positive integers {n\leq x} all of whose prime factors lie in {\mathcal{P}}. In this paper we classify the sets of primes {\mathcal{P}} such that {\Psi(x;\mathcal{P})} is within a constant factor of its expected value. This task was recently initiated by Granville, Koukoulopoulos and Matomäki [A. Granville, D. Koukoulopoulos and K. Matomäki,
When the sieve works,
Duke Math. J. 164 2015, 10, 1935–1969] and their main conjecture is proved in this paper. In particular, our main theorem implies that, if not too many large primes are sieved out in the sense that\sum_{\begin{subarray}{c}p\in\mathcal{P}\\
x^{1/v}<p\leq x^{1/u}\end{subarray}}\frac{1}{p}\geq\frac{1+\varepsilon}{u},for some {\varepsilon>0} and {v\geq u\geq 1}, then\Psi(x;\mathcal{P})\gg_{\varepsilon,v}x\prod_{\begin{subarray}{c}p\leq x\\
p\notin\mathcal{P}\end{subarray}}\bigg{(}1-\frac{1}{p}\bigg{)}.