# Independence between the number of prime factors of $n$ and $n+2$

I am interested in having an upper bound for the cardinality of

$\#\left\{n\leq x\,:\quad\omega(n)=k, \omega(n+2)=\ell\right\}$ for $k,\ell\geq 1$,

where $\omega(n)=\sum_{p\vert n}1$ counts the number of (distinct) prime factors of the integer $n$.
I would actually like a sharp upper bound (up to a constant) for $k=\ell=\log\log x$. I thought this was known, but I can't find anything in the literature. For $k\ll\sqrt{\log\log x}$ and $\ell\ll\log\log x$ I can have a good upper bound, but I can't reach $k=\ell=\log\log x$.

Does anyone has a reference or an idea please ?

Thank you very much !

• Do you really mean $=\log\log x$ there? The double logarithm is almost always a non-integer, so $\omega(n)$ won't take such value. – Wojowu Feb 26 '16 at 12:47
• Hello, thank you for your interest. I actually mean $\lfloor \log\log x\rfloor$. I wrote this because around this integer, $\pi_k(x)\sim\pi_{k+1}(x)$ so we don't really care where $k$ is plus or minus 1. – elie520 Feb 26 '16 at 12:57
• For each prime $p$ we consider a two-dimensional vector $\xi_p(n)=({\mathbf 1}_{p|n},{\mathbf 1}_{p|n+2})$. Then $(w(n),w(n+2))=\sum_p \xi_p(n)$. Next, if we choose $n\leqslant x$ at random, $\xi_p$ is a random vector with known distribution, and they almost do not correlate. It suggests that their sum satisfies some sort of CLT, as in Erdos-Kac theorem. – Fedor Petrov Feb 26 '16 at 18:41
• well, the fact they do not correlate mutually is too weak, but we may compute all moments with high acccuracy, it is already enough for CLT – Fedor Petrov Feb 26 '16 at 19:41
• Thank you. We indeed have "Erdos-Kac"-like theorems for (f(n),g(n+2)) for f, g additive (or maybe strongly additive), but they do not allow, to my knowledge, to recover the local laws. – elie520 Feb 26 '16 at 20:11