The [prime number theorem](https://en.wikipedia.org/wiki/Prime_number_theorem) says on average we can find $\frac n{\log n}$ primes of magnitude $n$.


[Erdos-Kac law](https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Kac_theorem) state a typical number of magnitude $n$ has $\log\log n$ primes.


Somehow the fact $e^{\log\log n}=\log n$ seems to make both facts related. 


How related are these two facts in number theory?




---


Let me put it in this way.


Suppose we somehow naturally choose a subset of natural numbers where Erdos-Kac law applies but with average factors as $f(\log\log n)$ for some $f(x)=o(x)$ then how many primes of magnitude $n$ can we expect in this subset? Say for instance $f(\log\log n)=(\log\log n)^\alpha$ or $f(\log\log n)=(\log\log\log n)^{1/\alpha}$ where $0<\alpha\ll1$ holds?


I think such sets should typically have $\frac{n}{2^{f(\log\log n)}}\gg\frac{n}{\log n}$ primes.



Does the Prime Number Theorem have anything to do with Erdos-Kac law or vice versa?
Yes. The number of prime factors of a number is distributed roughly like a Poisson process of expectation $\log \log n$, so the probability of exactly one prime factor is roughly $e^{- \log \log n} = 1/\log n$.


Remember that natural numbers of size roughly $n$ correspond, in the number field / function field dictionary, to polynomials of degree roughly $\log n$, whose prime factorizations are controlled by the permutation of Frobenius acting on the roots, a random permutation of $\log n$ letters, where primes correspond to cycles. You can check that the distribution of the number of cycles of a random permutation is close to a Poisson process because, e.g., writing permutations in standard cycle form, the chance of stopping a cycle after a given number of letters is determined only by number of previous letters and not the previous cycles, so the number of cycles is a sum of many independent random variables.


However this will not rigorously establish facts about numbers.


For your second question, I think you will find it very hard to find a natural set of numbers where the average number of prime factors changes, without doing something very drastic to the distribution. In general, one finds that the distribution of the number of prime factors is very insensitive to almost all conditions you can place on a number (e.g. congruence conditions), other than conditions stated directly in terms of the prime factorization.


Of course for a condition stated in terms of the prime factorization, there is no reason to expect that the number of prime factors and the probability of being prime should move in tandem.


