The prime omega function $\omega(n)$ counts the number of distinct prime factors of a natural number $n$, and can be defined as $\omega(n)=\sum_{p \mid n}1$. Let $S(N)=\sum_{n=1}^{N}n\omega(n)$. Let $\pi(n)$ denote the number of primes up to $n$.
$$\eqalign{S(N) &=\dfrac{1}{2}\sum_{\scriptstyle p{\text{ prime}} \atop \scriptstyle p\leq N} p\left(\left\lfloor\dfrac{N}{p}\right\rfloor ^2+\left\lfloor\dfrac{N}{p}\right\rfloor\right)\cr &\approx \dfrac{N\pi(N)}{2}+\dfrac{N^2}{2}\sum_{\scriptstyle p{\text{ prime}} \atop \scriptstyle p\leq N} \dfrac{1}{p}\cr &\approx \dfrac{N\pi(N)}{2}+\dfrac{N^2}{2}\left[\log \log (N)+M+o(1)\right],\cr}$$ where $M$ is the Meissel–Mertens constant.
The error term of this approximation is quite large. Is it possible to find a better approximation for this sum?