About the sum $ s_n:=\sum_{k=1}^{n} \text{lcm}(k,n) $

119 Views Asked by At

I'm currently studying the following sum: $$ s_n:=\sum_{k=1}^{n} \text{lcm}(k,n) $$ I manipulated it as follows: $$\begin{align} s_n&=\sum_{k=1}^{n} \text{lcm}(k,n)\\ &=\sum_{d|n}{\sum_{(k,n)=d,\space 1≤k≤n}\frac{kn}{d}}\\ &=n\sum_{d|n}{\sum_{\left(k,\frac{n}{d}\right)=1,\space 1≤k≤\frac{n}{d}}k}\\ &=n\sum_{d|n}\frac{n}{2d}\varphi\left(\frac{n}{d}\right)\\ &=\frac{n}{2}\sum_{d|n}d\varphi(d) \end{align} $$ I don't now if the can be broken down further. Is it possible to obtain a closed form expression? Or at least an asymptote? Any help is highly appreciated.