Let $\mathcal{P}$ be a set of prime numbers of relative density $\kappa \in (0, 1)$, which means that
$$\#\left(\mathcal{P} \cap [1, x]\right) = \kappa \,\pi(x) + E(x) \quad (x \to \infty)$$
for a "suitable" error term $E(x)$ (of course, $E(x) = o(\pi(x))$).


Let $\mathcal{S}$ be the set of natural numbers having no prime factor in $\mathcal{P}$.


**Question:** Do we have an asymptotic formula for $\#\left(\mathcal{S} \cap [1, x]\right)$ ?


For $\kappa \in (0, 1/2)$, Corollary 1.2 of [1] gives that
$$\#\left(\mathcal{S} \cap [1, x]\right) \sim C(\mathcal{P}) \frac{x}{(\log x)^\kappa} \quad (x \to +\infty)$$
where $C(\mathcal{P})$ is a positive constant depending on $\mathcal{P}$.
I guess that something similar holds in the whole range $\kappa \in (0, 1)$, but I could not find such a result. Thank you for any help.


**P.S.** Although I am interested in general set of primes $\mathcal{P}$ of relative density $\kappa$, results concerning *sufficiently general* $\mathcal{P}$ of relative density $\kappa$ are welcome. For example, in light of Daniel Loughran's comment, sets like those of Chebotarev density theorem $$\mathcal{P} = \{p \text{ unramified in $K$}, \mathrm{Frob}\_p \subseteq C\} ,$$
where $K$ is a finite Galois extension of $\mathbb{Q}$ and $C$ is a conjugacy class of its Galois group, are certainly interesting.


*P.S.* This is very related to question: [Natural density of set of numbers not divisible by any prime in an infinite subset](https://mathoverflow.net/q/369092/160943) , as pointed out by user Hhhhhhhhhhh.


[1] Iwaniec and Kowalski, *Analytic Number Theory* (2004)



Numbers without prime factors in a set of positive relative density
You basically ask about the sum
$$ \sum\_{n \le x} \alpha(n)$$
where $\alpha$ is a completely multiplicative function with $\alpha(p) = \mathbf{1}\_{p \notin \mathcal{P}}$.


This is addressed by Wirsing in his famous paper ``Das asymptotische Verhalten von Summen über multiplikative Funktionen'' (Math. Ann. 143 (1961), 75–102). The only requirement on $E$ is $E(x)=o(\pi(x))$, and it gives the asymptotic result
$$\tag{$\star$} \sum\_{n \le x} \alpha(n) \sim\frac{ e^{-\gamma (1-\kappa)}}{\Gamma(1-\kappa)} \frac{x}{\log x} \prod\_{p \le x,\, p \notin \mathcal{P}}(1-1/p)^{-1},$$
where $\gamma$ is the Euler-Mascheroni constant (appearing also in Mertens' theorem).


Remark 1: Suppose $\sum\_{p \le x, p \in \mathcal{P}} 1/p = \kappa\sum\_{p \le x} 1/p +C + o(1)$, which holds if $E(x)$ is small enough, say $O(x/\log^{1+\varepsilon} x)$ (by partial summation). Then
$$C(\mathcal{P}) :=\frac{ 1}{\Gamma(1-\kappa)} \prod\_{p \notin \mathcal{P}}(1-1/p)^{-1} \prod\_{p}(1-1/p)^{1-\kappa}$$
converges and the last result may be simplified as
$$C(\mathcal{P})\frac{x}{(\log x)^{\kappa}},$$
by Mertens. This should recover the result from Iwaniec and Kowalski.


Remark 2: In Wirsing's sequel to his own paper, ``Das asymptotische Verhalten von Summen über multiplikative Funktionen. II'' (Acta Math. Acad. Sci. Hungar. 18 (1967), 411–467) he relaxes the condition on $\mathcal{P}$ even further, requiring less than positive relative density, while still retaining $(\star)$.


