Let $f(n)=\sum\limits\_{d \mid n}\frac{\log d}{d}.$ 


It is not hard to see that $f(n)\ll(\log\log n)^2$. Is there any reference for this inequality?


**EDT 1:** A possible answer is [Analysis of the subtractive algorithm for greatest common divisors](http://www.pnas.org/content/pnas/72/12/4720.full.pdf) by Knuth D. E., Yao A. C. (Proc. Nat. Acad. Sci. USA
Vol. 72, No. 12, pp. 4720-4722).


**EDT 2:** Earlier this bound was proved by Ingham in [Some Asymptotic Formulae in the Theory of Numbers](https://londmathsoc.onlinelibrary.wiley.com/doi/pdf/10.1112/jlms/s1-2.3.202) (Journal of the London Mathematical Society, 
V. 1-2, Issue 3, 1927, pp. 202-208).



Reference for inequality for $\sum\limits_{d \mid n}\frac{\log d}{d}.$
Let $n=p\_1^{r\_1}\cdots p\_k^{r\_k}$ be a prime factorization of $n$. We need to estimate 
$$
\sum\_{\substack{{e\_1\leq r\_1}\\{\cdots}\\{e\_k\leq r\_k}}}\frac{e\_1\log p\_1+\cdots +e\_k \log p\_k}{p\_1^{e\_1}\cdots p\_k^{e\_k}}
$$
We break these up and consider 
$$
\sum\_{\substack{{e\_1\leq r\_1}\\{\cdots}\\{e\_k\leq r\_k}}}\frac{e\_1\log p\_1}{p\_1^{e\_1}\cdots p\_k^{e\_k}}
$$
$$
\leq\left(1-\frac 1{p\_2}\right)^{-1}\cdots \left(1-\frac 1{p\_k}\right)^{-1}\sum\_{e\_1\leq r\_1}\frac{e\_1\log p\_1}{p\_1^{e\_1}}
$$
$$
\leq\left(1-\frac 1{p\_2}\right)^{-1}\cdots \left(1-\frac 1{p\_k}\right)^{-1}\left(1-\frac1{p\_1}\right)^{-2}\frac{\log p\_1}{p\_1}
$$
$$
=\left(1-\frac1{p\_1}\right)^{-1}\left(1-\frac 1{p\_2}\right)^{-1}\cdots \left(1-\frac 1{p\_k}\right)^{-1}\frac{\log p\_1}{p\_1-1}
$$
Then the original sum is bounded by
$$
\ll\left(1-\frac1{p\_1}\right)^{-1}\left(1-\frac 1{p\_2}\right)^{-1}\cdots \left(1-\frac 1{p\_k}\right)^{-1}\sum\_{i\leq k} \frac{\log p\_i}{p\_i-1}
$$
$$
\ll \exp\left(\sum\_{i\leq k} \left(\frac1{p\_i}+O(\frac1{p\_i^2}) \right)\right)\sum\_{i\leq k} \frac{\log p\_i}{p\_i-1}
$$
$$
\ll \exp\left(\sum\_{i\leq k}\frac1{p\_i}\right)\sum\_{i\leq k} \frac{\log p\_i}{p\_i-1} \ \ \ (\*)
$$
Here, implied constants in $\ll$ are absolute. 


Using the primorial $n=\prod\_{p\leq k}p$, the Prime Number Theorem, and partial summation, we obtain
$$
\sum\_{d|n}\frac{\log d}d \ll (\log k)^2 \ll (\log\log n)^2.
$$


In fact, the primorials are the smallest numbers that makes the sum (\*) largest. Therefore, the stated bound holds for all $n$. 


