# Hardy–Ramanujan theorem

In mathematics, the Hardy–Ramanujan theorem, proved by Hardy & Ramanujan (1917), states that the normal order of the number ω(n) of distinct prime factors of a number n is log(log(n)). Roughly speaking, this means that most numbers have about this number of distinct prime factors. A more precise version states that for any real-valued function ψ(n) that tends to infinity as n tends to infinity

$|\omega(n)-\log(\log(n))|<\psi(n)\sqrt{\log(\log(n))}$

$|\omega(n)-\log(\log(n))|<{(\log(\log(n)))}^{\frac12 +\varepsilon}$
$\sum_{n \le x} | \omega(n) - \log\log n|^2 \ll x \log\log x \ .$