The following question is from my number theory assignment and I am unable to completely solve the problem. I have been following Dekonick and Luca.
Let $\tau(n)=\sum_{d\mid n} 1$ be the divisor function. Using $\sum_{n\leq x} \tau(n) =x(\log x+C) +O(x^{1/2})$, show that $\sum_{n>Y} \frac{\tau(n) }{n^2} =\frac{ \log Y+C+2}{Y} +O(1/Y^{3/2})$.
Attempt: I wrote $\sum_{n>Y} \frac{\tau(n)}{n^2}= -\sum_{n\leq Y}\frac{\tau(n)}{n^2} + \sum_{n\geq 1} \frac{\tau(n) }{n^2}$.
I calculated $\sum_{n\leq Y}\frac{\tau(n)}{n^2}= 2C+2 -\frac{2C+1 +\log Y }{Y}+ O(\frac{1}{Y^{3/2}})$. Hope I am right!
But I am unable to think which result to use to compute $\sum_{n\geq 1} \frac{\tau(n) }{n^2}$.
Can you please help with that?
Let $S(x)=\sum_{n\leq x} \tau(n) =x(\log x+C) +O(x^{1/2})$ and let $M>Y$. Summation by parts gives:
$$\sum_{n=Y}^{M} \frac{\tau(n) }{n^2}=\frac{S(M)}{M^2}-\frac{S(Y)}{Y^2}+\int_Y^M\frac{2S(x)dx}{x^3}.$$
But using the formula for $S(x)$ we have that
$$\int_Y^M\frac{2S(x)dx}{x^3}=\int_Y^M\frac{2(\log x+C)dx}{x^2}+O(Y^{-3/2}).$$
and integrating by parts the first term we get
$$\int_Y^M\frac{2(\log x+C)dx}{x^2}=\frac{2\log Y+2C+2}{Y}+O\!\left(\frac{\log M}{M}\right),$$
while $$\frac{S(M)}{M^2}=O\!\left(\frac{\log M}{M}\right),\qquad -\frac{S(Y)}{Y^2}=-\frac{\log Y+C}{Y}+O(Y^{-3/2}).$$
Putting the above together and letting $M \to +\infty$ the result follows.