The sum $\sum_{n=1}^{\infty} 1/n^{s}$ is convergent for all real $s>1$ and diverges for all real $s \le 1$. The same holds for the sum $\sum_{p \ prime} 1/p^{s}$. Thus, for the functions $f(n)= 1/n^s, s \in \mathbb{R}$ the sum $\sum_{n=1}^{\infty}f(n)$ shows the same convergence behaviour as the sum $\sum_{p \ prime}f(p)$.
The same holds, if I'm not mistaken, for the functions $f(n)= 1/(n (\ln n)^s), s \in \mathbb{R}$ (both for $n \in \mathbb{N}$ and for primes convergence iff $s>1$).
Question: Is there a real monotonic function $f$ such that $\sum_{n=1}^{\infty}f(n)$ diverges whereas sum $\sum_{p \ prime}f(p)$ converges? (The monotony requirement is for preventing 'artificial' solutions that single out the primes (as e.g. $f(n) = 2^n$ if $n$ is prime; $f(n)=n$ if $n$ is not prime)).