Please help me to find the asymptotics for the sum described above:
$$\sum\limits_{n\leq x} d(n)\log n.$$
This is a problem in analytic number theory.
Please help me to find the asymptotics for the sum described above:
$$\sum\limits_{n\leq x} d(n)\log n.$$
This is a problem in analytic number theory.
By the Dirichlet's hyperbola method we have: $$ \sum_{n\leq x}d(n) = x\log x+(2\gamma-1)x+O(\sqrt{x})$$ hence Abel's summation formula gives:
$$\sum_{n\leq x}d(n)\log n = x\log^2 x+(2\gamma-1)x\log x-\int_{1}^{x}\left(\log u+(2\gamma-1)\right)\,du+O(\sqrt{x}\log x) $$ that simplifies to: $$\sum_{n\leq x}d(n)\log n = x\log^2 x+(2\gamma-2)x\log x+O(x).$$
First note that: $$2\sum_{d\mid n}\log(d)=\sum_{d\mid n}\log(d)+\sum_{d\mid n}\log(\frac{n}{d})=\sum_{d\mid n}\log(n)=d(n)\log(n)$$ Then by the Dirichlet hyperbola method: $$\sum_{n\leq x}d(n)\log(n)=-2\lfloor{\sqrt{x}}\rfloor\log(\lfloor{\sqrt{x}}\rfloor!)+2\sum_{n\leq \sqrt{x}}\log(n)\lfloor{\frac{x}{n}}\rfloor+\log(\lfloor{\frac{x}{n}}\rfloor!)$$ $$=O(\sqrt{x}\log(x))+2x-x\log(x)+2\sum_{n\leq \sqrt{x}}\frac{x}{n}\log(n)+ \frac{x}{n}\log(\frac{x}{n})-\frac{x}{n}$$ $$=O(\sqrt{x}\log(x))+2x-x\log(x)+2x(\log(x)-1)\sum_{n\leq \sqrt{x}} \frac{1}{n}$$ $$=O(\sqrt{x}\log(x))+2x-x\log(x)+2x(\log(x)-1)\big(\frac{\log(x)}{2}+\gamma+O(\frac{1}{\sqrt{x}})\big)$$ Thus we have: $$\sum_{n\leq x}d(n)\log(n)=x\log(x)^2-2(1-\gamma)x\log(x)+2(1-\gamma)x+O(\sqrt{x}\log(x))$$
If you already know the asymptotics of the divisor sum
$\sum_{n\le x} d(n)=x\log x+(2\gamma-1)x+O(\sqrt x)$
then you only need partial summation to include the weight $\log n$.
The divisor sum asymptotics is a classical application of Dirichlet's hyperbola method.
Indeed,
$\sum_{n\le x}d(n)=\sum_{mn\le x}1=\sum_{m\le\sqrt x}[\frac{x}{m}]+\sum_{n\le\sqrt x}[\frac{x}{n}]-[\sqrt x]^2$.
The first two terms on the RHS are the same; they are
$x\sum_{n\le \sqrt x}\frac{1}{x}+O(\sqrt x)=x(\log\sqrt x+\gamma+O(1/\sqrt x))$
and the third term is simply $x+O(\sqrt x)$.