# Number of integers less than $N$ with $k$ prime divisors

I recently asked an unsuccessful string of questions regarding $\#\{n<N, \omega(n)=k\}$, where $\omega(n)$ is the number of distinct prime divisors of $n$. Is there some exact form of this that relies only on the usual number-theoretic functions ($\pi(x), \zeta(x), v(x), \phi(x), \mu(x)$, and others)? I am not interested in asymptotically or approximately equal functions, or in bounds involving big- or little-o. I'd like to use the equation alongside other number-theoretic functions.

I've been trying something along the lines of

$$\sum_{n=1}^N \lfloor \cos^{-1} \bigl( {\frac{k}{\omega(n)}-\lfloor \frac{k}{\omega(n)} \rfloor} \bigr)\rfloor,$$ but obviously that's not very helpful with all the floors.

• Can you express $\sum_{n \le N, \omega(n) = 2} 1$ from $\pi(x)$ ? What do you obtain for $k =3$ ? – reuns Dec 9 '17 at 23:24
• Just a note: the usual name of your $w$ function is $\omega$.en.wikipedia.org/wiki/… – Matthew Conroy Dec 10 '17 at 4:55
• @MatthewConroy Thanks, I've edited. – Linus Rastegar Dec 10 '17 at 15:44
• allo... $\sum_{n \le x, \omega(n) =2} 1 = \frac{1}{2}\sum_{p^k \le x} \sum_{q^m \le x/p} 1 - \sum_{p^{k} \le x, k \ge 2} 1$ $= \frac{1}{2}\sum_{p^k \le x} \Pi(x/p) - (\Pi(x)-\pi(x))$ $= \frac{1}{2}\frac{d}{dx}\int_1^x \Pi(y) \Pi(x/y)\frac{dy}{y}-(\Pi(x)-\pi(x))$ where $\Pi(x) =\sum_{p^k \le x} 1 = \sum_k \pi(x^{1/k})$. What do you get for $\sum_{n \le x, \omega(n) =3} 1$ ? – reuns Dec 10 '17 at 20:08
• For $\omega(n)=3$ it will be $\frac{1}{6}\frac{d}{dx}\int_1^x \int_1^y \Pi(z)\Pi(y/z)\frac{dz}{z} \Pi(x/y)\frac{dy}{y}$ plus some small terms to remove the few doublons $p^k q^l r^m$ with $p,q,r$ non distinct. Important : note how it is similar to $\zeta(s) = \sum_{k=0}^\infty \frac{1}{k!} (\log \zeta(s))^k$ where $\log \zeta(s)$ is not very different to $\sum_p p^{-s}$ thus $(\log \zeta(s))^k$ is not very different to $\sum_{p_1,p_2,\ldots,p_k} (p_1 \ldots p_k)^{-s}$. itself not very different to $\sum_{n=1,\omega(n)=k}^\infty n^{-s}$. – reuns Dec 10 '17 at 21:31