# A formula of Ramanujan over square-free numbers

I read in the following paper of Toth (https://arxiv.org/pdf/1608.00795.pdf) that Ramanujan had obtained the following formula, proved by Wilson in 1922:

$$\displaystyle \sum_{n \leq X} \frac{1}{d(n)} = X\sum_{j=1}^N \frac{A_j}{(\log X)^{j-1/2}} + O \left(\frac{x}{(\log X)^{N+1/2}}\right),$$

where $A_j$ are explicitly computable constants with

$$\displaystyle A_1 = \frac{1}{\sqrt{\pi}} \prod_p \left( \left(1 - \frac{1}{p}\right)^{1/2} p \log\left(1 + \frac{1}{p-1}\right)\right),$$ which converges conditionally.

Can one derive from this the sum

$$\displaystyle \sum_{\substack{n \leq X \\ n \text{ squarefree}}} \frac{1}{d(n)} = \sum_{n \leq X} \frac{\mu^2(n)}{2^{\omega(n)}}?$$

• I think you can get a bad upper bound using en.wikipedia.org/wiki/Selberg_sieve. Also that formula looks like it was taken from some divergent euler maclaurin expansion. My guess is he simplified some complicated sum in terms of a power series (the weights $A_j$ each come from a Dirichlet series' while the "nice" logarithm terms come from the Euler Maclaurin expansion), similar to how you get those wacky weights for the gram series here: mathworld.wolfram.com/GramSeries.html When you try and evaluate a similar double summation. – Ethan Nov 2 '17 at 21:40
• This is a straightforward application of the Selberg–Delange method (see for example Tenenbaum's book), especially in the form you've rewritten it. – Greg Martin Nov 2 '17 at 21:54
• @GregMartin This seems to work, thanks! – Stanley Yao Xiao Nov 2 '17 at 23:01
• @GregMartin Is it using Mellin inversion and expressing $\int_{(\sigma)} \frac{(s-1)^{-1/2}}{s} x^s ds$ in term of $x \log^a x$ ? And I'm not so sure of what to do with the higher order terms $(s-1)^{k/2}$ coming from $\sum_{n=1}^\infty \frac{n^{-s}}{2^{\omega(n)}} \mu(n)^2 n^{-s} = \sum_{k =-1}^\infty c_k (s-1)^{k/2}$ around $s=1$ – reuns Nov 3 '17 at 0:30