Let \( P^-(n)\) denote the smallest prime factor of a natural integer \(n>1\) . Furthermore let \(\mu \) and \(\omega \) denote respectively the Möbius function and the number of distinct prime factors function. We show that, given any set \({\mathcal {P}}\) of prime numbers with a natural density, we have \(\sum _{P^-(n)\in {\mathcal {P}}}\mu (n)\omega (n)/n=0\) and provide a effective estimate for the rate of convergence. This extends a recent result of Alladi and Johnson, who considered the case when \({\mathcal {P}}\) is an arithmetic progression.