MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Continuing the curiosity of my last couple questions: Is it the case that for every set of primes $F$, the asymptotic density of the integers coprime to all of $F$ is $\displaystyle \prod_{p \in F} (1 - 1/p)$?

(The case of finite $F$ is obvious. Furthermore, as the product is an upper bound on the density, this holds whenever the product goes to zero; in particular, by the divergence of the harmonic series, this holds for all co-finite $F$. But that leaves a lot of ground untouched. Ideally, there'd be some way to extend the reasoning from the finite case to the general case, but it's not clear to me how to do so given the general lack of countable additivity of density.)

share|cite|improve this question
up vote 11 down vote accepted

GH from MO is answering a more difficult question where one asks for uniform estimates for the number of integers up to $x$ not divisible by primes in a set $F$ (which may also depend on $x$). This is delicate, and the answer is indeed no.

The problem, as I understand it, keeps $F$ fixed, and asks for the density as $x\to \infty$. This is easier, and the answer is in fact yes. As the OP observes, if the set $F$ is finite the result is true; and also if $\prod_{p\in F} (1-1/p)=0$ then the result is true (take the restriction of $F$ to primes below some point $N$, and note that the density of the numbers coprime to $F_N$ is an upper bound for what we want; and then take $N\to \infty$).

Now consider a set $F$ with $\prod_{p\in F}(1-1/p) >0$. Therefore if $G$ denotes the primes not in $F$ then $\prod_{p\in G} (1-1/p)=0$. Put $\mu_F(n)$ to be a multiplicative function defined by $\mu_F(p)=-1$ if $p\in F$ and $\mu_F(p) =0$ otherwise; put $\mu_F(p^k)=0$ for all prime powers with $k\ge 2$. So this is a small generalization of the Mobius function. Then $$ \sum_{\substack{{n\le x} \\ {(n,F)=1}} } 1 = \sum_{n\le x} \sum_{d|n} \mu_F(d) = \sum_{d\le x} \mu_F(d) \Big(\frac xd +O(1)\Big). $$ By assumption $\sum_{p\in F} 1/p <\infty$ and so the Euler product $\prod_{p\in F}(1-1/p)$ converges absolutely (to a non-zero real number) and equivalently the sum $\sum_{n=1}^{\infty} \mu_F(n)/n$ converges. Thus the main term above equals $$ x\sum_{d=1}^{\infty} \frac{\mu_F(d)}d + o(x)= x \prod_{p\in F}\Big(1-\frac{1}{p}\Big) + o(x). $$ As for the remainder term, since $\mu_F(d) =0$ unless $d$ is divisible only by primes in $F$, the remainder term is at most the number of integers up to $x$ that are coprime to all elements in $G$; but we know that the density of such integers tends to zero for large $x$. That completes the proof.

More generally, Erdos asked whether for any real valued multiplicative function $f$ with $-1\le f(n)\le 1$ for all $n$ we have $$ \lim_{x\to \infty} \frac{1}{x} \sum_{n\le x} f(n) = \prod_{p} \Big(1+\frac{f(p)}{p} + \frac{f(p^2)}{p^2}+\ldots \Big) \Big(1-\frac 1p\Big). $$ Your question is a special easy case of this problem; Erdos's problem also includes the prime number theorem as the special case when $f(n)=\mu(n)$. Erdos's problem was fully solved by Wirsing, who showed that the limit does equal the expected Euler product. The extension to complex valued multiplicative functions was made by Gabor Halasz (another GH, not from MO!).

share|cite|improve this answer
Thanks for clarifying, and for the nice answer as well! – GH from MO Jun 22 '14 at 22:10
Too bad you couldn't work in a reference to Hardy, another GH not from MO. – Gerry Myerson Jun 22 '14 at 23:39

The answer in general is "no". The question when the answer is "yes" was recently studied in depth by Granville-Koukoulopoulos-Matomaki ( The introduction of this paper explains the state-of-the art in this problem.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.