Suppose $S$ is a subset of the primes with natural density $0 < \alpha < 1$ within the primes. If
$$D(X) := \{n \leq X \mid p \not \mid n \text{ for all } p \in S \}$$
(so $D(X)$ is numbers at most $X$ not divisible by any $p \in S$),
then is there a nice form for the asymptotic value of $D(X)$ as a function of $X$?


I'm guessing this might be a standard result in analytic number theory but I unfortunately don't yet know much about the area.




---


At least when $S$ is the inverse image of a union of Frobenius classes of $\text{Gal}(K/\mathbb{Q})$ for some number field $K$ under the Artin map, I have reason to believe that the answer is $\frac{X}{\log^{\alpha} X}$, but I don't know how to prove this either. I'm guessing the result holds in more generality though, hence the more general form of the question above - this specific case below the line reduces to the general question via Chebotarev density.



Natural density of set of numbers not divisible by any prime in an infinite subset
The recent paper


*Matomäki, Kaisa; Shao, Xuancheng*, [**When the sieve works. II**](http://dx.doi.org/10.1515/crelle-2018-0034), [ZBL07207214](https://zbmath.org/?q=an:07207214).


gives a fairly satisfactory answer to this question in the setting of arbitrary $S$. General sieve theory gives the upper bound


$$ |D(X)| \ll X \prod\_{p \in S; p \leq X} (1 - \frac{1}{p})$$


(which also matches what naive probabilistic heuristics would predict) but the matching lower bound


$$ |D(X)| \gg X \prod\_{p \in S; p \leq X} (1 - \frac{1}{p}) \quad (1)$$


is not always true. For instance if $S$ consists of all the primes between $X^{1/v}$ and $X$ for some fixed $v>1$ then the RHS of (1) is about $X/v$ but the LHS is instead $v^{-v+o(v)} X$ (smooth numbers are significantly rarer than naive heuristics would predict). However in this paper (resolving a previous conjecture of Granville, Koukoulopoulos and Matomaki in the reference at the end of this answer) they show (roughly speaking) that the lower bound (1) holds if one has an inequality of the form
$$ \sum\_{X^{1/v} \leq p \leq X^{1/u}: p \not \in S} \frac{1}{p} \geq \frac{1+\varepsilon}{u}$$
for some $v > u > 1$ that are not too large and some $\varepsilon > 0$ (there are examples that show that this condition is close to best possible); here the implied constant in (1) are allowed to depend on $u,v,\varepsilon$ and is basically of the form $v^{-e^{-1/u} v}$. Basically this condition is asserting that $S$ doesn't end up containing the majority of all primes between $X^{1/v}$ and $X^{1/u}$ for some bounded $u,v$, as this can lead to dramatic reductions in the size of $D(X)$.


In the situation where $S$ has natural density $\alpha < 1$ relative to the primes, summation by parts will give an asymptotic $\sum\_{X^{1/v} \leq p \leq X^{1/u}; p \not \in S} \frac{1}{p} = (1-\alpha) \log(v/u) + o(1)$ as $X \to \infty$ keeping $u,v$ fixed, and so by choosing $u,v$ appropriately one can invoke the Matomaki-Shao theorem and obtain the matching lower bound (1) (presumably this can also be established by earlier results than the Matomaki-Shao paper). This already implies that $|D(X)| = X / \log^{\alpha+o(1)} X$ and presumably for your specific set $S$ you may be able to sharpen the $o(1)$ error term here using more quantitative versions of the Chebotarev density theorem.


For arbitrary $S$, one has a logarithmic version


$$ \sum\_{n \in D(X)} \frac{1}{n} \asymp \log X \prod\_{p \in S; p \leq X} (1-\frac{1}{p});$$


see Lemma 2.1 of


*Granville, Andrew; Koukoulopoulos, Dimitris; Matomäki, Kaisa*, [**When the sieve works**](http://dx.doi.org/10.1215/00127094-3120891), Duke Math. J. 164, No. 10, 1935-1969 (2015). [ZBL1326.11055](https://zbmath.org/?q=an:1326.11055).


