# Sum of the inverses of numbers with $n$ divisors.

Let $d(n)$ be the number of divisors of a natural number $n$. Define $S(n)$ as the sum $$\sum_{d(k)=n}\frac1k$$

We know that $S(1)=1$, $S(2)$ diverges because is the sum of the inverses of the primes and $$S(3)=\sum_{d(k)=3}\frac1k<\sum_{j=1}^\infty\frac1{j^2}$$ so $S(3)$ converges.

It is known for what values of $n$ does $S(n)$ converge?

EDIT:

If $n$ is odd, then, since only perfect squares has an odd number of divisors, $$S(n)<\sum_{j=1}\frac1{j^2}$$

I suspect that the sum diverges if $n$ is even.

It converges iff $n$ is odd. If $d(k)$ is odd, then $k$ is a square, and the sum is $<\sum1/r^2$.
If $n=2m$, take any number $s$ with $d(s)=m$. Then for all but finitely many primes $p$, $d(ps)=n$. So we get the sum $\ge \sum_{p>p_0}1/(ps)$ which diverges.
• A curious corollary: $$\sum_{n\text{ odd}}\sum_{d(k)=n}\frac1k=\frac{\pi^2}6$$ – ajotatxe Jul 29 '17 at 18:28