# Number of prime factors and density

Let $$\mathbb{N}$$ denote the set of positive integers. For $$n\in\mathbb{N}$$ let $$\mathbf{P}_n$$ be the set of all positive integers $$k$$ such that there are at most $$n$$ different prime numbers that divide $$k$$. For $$A\subseteq \mathbb{N}$$ set $$\mu^{+}(A)= \lim \sup_{m\to\infty}\frac{|A \cap\{1,\ldots,m\}|}{m+1}.$$

What (if any) is the smallest $$n\in\mathbb{N}$$ such that $$\mu^+(\mathbf{P}_n) > 0$$?

• There seems to be a problem with your names for the variables. Right now the quantity you are asking for is $\mu(P_n) = \limsup_{n \rightarrow \infty} (P_n \cap \{1, \cdots, n\})/(n+1)$, which doesn’t make sense. If you are asking for $\mu(P_m)$ for some fixed $m$, then the answer is no; see for example Montgomery and Vaughan’s multiplicative number theory. – Stanley Yao Xiao Aug 21 '19 at 11:33
• @StanleyYaoXiao I think, it is not forbidden to use the same letter in different definitions. – Fedor Petrov Aug 21 '19 at 12:10
• @FedorPetrov yes but the way the question is phrased, there's a difference whether one sets $A = P_n$ or $A = P_m$. The former is not parsable, the latter is a well-studied problem. – Stanley Yao Xiao Aug 21 '19 at 12:21
• @StanleyYaoXiao imagine that you already know what is the upper density (that is indeed the case probably). Then it does not matter which letter was used in the definition when you learnt it, right? – Fedor Petrov Aug 21 '19 at 12:35
• OK sorry if I created confusion, will try to mend my post. – Dominic van der Zypen Aug 21 '19 at 12:48

Let $$E$$ be the set of positive integers $$k$$ such that $$k$$ has $$o(\log\log(k))$$ distinct prime factors. Then the Hardy-Ramanujan Theorem implies that $$\mu^+(E)=0$$. For any $$n\geq 1$$, $$\mathbf{P}_n\backslash E$$ is finite, and so $$\mu^+(\mathbf{P}_n)=0$$.
• Pure curiosity : for a fixed $k$, how does the cardinal of those integers in $P_k \cap [n]$ grows as a function of $n$ (sublinear, but more precisely?) – Olivier Aug 21 '19 at 13:23
• @Olivier I'm not sure. There are results on so-called "$B$-smooth" numbers, where $B$ is a fixed set of primes. Specifically, $k$ is called $B$-smooth if all prime factors of $k$ are in $B$ (so the $B$-smooth numbers are a subset of $P_{|B|}$). There are good estimates for the analogous function of $n$ when $P_k$ is replaced by the set of $B$-smooth numbers. See en.wikipedia.org/wiki/Smooth_number#Distribution. Perhaps some combination of this and the prime number theorem would produce an answer to your question. – Gabe Conant Aug 21 '19 at 13:30
• @Olivier The number of n\leq X with k prime factors is $\sim \frac{(1+\log\log{X})^{k-1}}{(k-1)!} \frac{X}{\log{X}}$ in a quite wide range of $k$. I can’t say I know the state of the art, but the paper of Hildebrand and Tenenbaum in the Duke Math Journal is one possible reference. These sorts of asymptotics go back to Selberg, Sathe, Ramanujan... (Selberg gets the above asymptotic with $k\leq C\log\log{X}$ with error term depending on $C$ (which can be chosen arbitrarily), and things get uglier for larger $k$.) – alpoge Aug 21 '19 at 14:12
• @FedorPetrov You're right, that was sloppy. I should have used something precise like $\log\log\log (n)$ instead of $o(\log \log (n))$. – Gabe Conant Aug 21 '19 at 14:15