Estimating the sum $\sum_{1\leq x,y\leq n} \frac{x}{ \mathrm{lcm}(x,y)}$ I am looking for approximations, or a closed form, if available, for  the sum
$$S(n,a,b)=\sum_{1\leq x,y,\leq n}  \frac{x^a}{\mathrm{lcm}(x,y)^{b}},$$ 
where $\mathrm{lcm}(x,y)$ is the least common multiple of integers $x,y$ and $a,b$ are positive quantities. I am in particular interested in $a=b=1.$ For this case numerical evidence suggests
$$
S(n,1,1)=O( n \log n)
$$
may hold. In particular, I am wondering whether by using the technique in the answer to this question here, one might obtain (as $n \rightarrow \infty$), by letting $a,b\downarrow 1,$ an estimate in terms of zeta functions. In that question the upper bound
$$
S(n,0,b)\leq\frac{\zeta(b)^3}{\zeta(2b)},\quad b>1
$$
is derived by letting $n\rightarrow \infty.$
Any pointers,comments welcome.
 A: The original sum can be written as
$$T(\alpha,\beta,\gamma,n)=\sum_{x,y\le n}x^\alpha y^\beta(x,y)^\gamma,$$
where $(x,y)=\mathrm{gcd}(x,y)$. One can find asymptotic formula for this sum using standart approach. Let $d=(x,y)$. Then
$$T(\alpha,\beta,\gamma,n)=\sum_{d\le n}d^\gamma\sum_{{x,y\le n\atop (x,y)=d}}x^\alpha y^\beta=\sum_{d\le n}d^{\alpha+\beta+\gamma}\sum_{{x,y\le n/d\atop (x,y)=1}}x^\alpha y^\beta.$$
The condition $(x,y)=1$ can be removed using Möbius function:
$$T(\alpha,\beta,\gamma,n)=\sum_{d\le n}d^{\alpha+\beta+\gamma}\sum_{\delta\le n/d}\mu(\delta)\sum_{{x,y\le n/d\atop \delta\mid(x,y)}}x^\alpha y^\beta=\sum_{d\le n}d^{\alpha+\beta+\gamma}\sum_{\delta\le n/d}\mu(\delta)\delta^{\alpha+\beta}\sum_{x,y\le n/(d\delta)}x^\alpha y^\beta.$$
The last sum (for $\alpha,\beta>-1$) is $\sim\frac{n^{\alpha+\beta+2}}{(\alpha+1)(\beta+1)(d\delta)^{\alpha+\beta+2}},$ so (for $\gamma>1$)
$$T(\alpha,\beta,\gamma,n)\sim \frac{n^{\alpha+\beta+\gamma+1}}{\zeta(2)(\alpha+1)(\beta+1)}.$$
The special case $\gamma=1$,  $\alpha=0$, $\beta=−1$ is more tricky. We can write the given sum as
$$T(n)=\sum_{x,y\le n}\frac{(x,y)}{y}=T_1(n)+T_2(n),$$
where for some $U>1$
$$T_1(n)=\sum_{{x,y\le n \atop (x,y)\le U}}\frac{(x,y)}{y},\quad T_2(n)=\sum_{{x,y\le n \atop (x,y)> U}}\frac{(x,y)}{y}.$$ The second sum will be in the error term ($y=dy_1$, $x=dx_1$):
$$T_2(n)=\sum_{d> U}d\sum_{{x,y\le n \atop (x,y)=d}}\frac{1}{y}\ll \sum_{d> U}\sum_{x_1,y_1\le n/d }\frac{1}{y_1}\ll \sum_{d> U}\frac{n}{d}\log\frac{n}{d}\ll n\log^2 \frac{n}{U}.$$
Here it is clear that for $U=n\log^{-2}n$ we get error term $O(R(n))$ with $R(n)=n\log^2\log n.$
The first sum gives main term:
$$T_1(n)=\sum_{y\le n}\frac{1}{y}\sum_{{d\le U \atop d\mid y}}d\sum_{{x\le n \atop (x,y)=d}}1=\sum_{y\le n}\frac{1}{y}\sum_{{d\le U \atop d\mid y}}d\sum_{{x_1\le n/d \atop (x_1,y/d)=1}}1.$$ The last sum is known:
$$\sum_{{x_1\le n/d \atop (x_1,y/d)=1}}1=\frac{\varphi(y/d)}{y/d}\frac nd+O(\tau(y/d)).$$
Hence
$$T_1(n)=n\sum_{y\le n}\frac{1}{y}\sum_{{d\le U \atop d\mid y}}\frac{\varphi(y/d)}{y/d}+O(R_1(n)),$$
where
$$R_1(n)=\sum_{d\le U}d\sum_{{y\le n \atop d\mid y}}\frac{\tau(y/d)}{y}=\sum_{d\le U}\sum_{y_1\le n/d }\frac{\tau(y_1)}{y_1}\ll U\log^2n\ll R(n).$$
So $$T_1(n)=n\sum_{d\le U}\frac{1}{d}\sum_{y_1\le n/d}\frac{\varphi(y_1)}{y_1^2}+O(R(n))=n\sum_{d\le U}\frac{1}{d}\left(\frac{1}{\zeta(2)}\left(\log (n/d)+\gamma-\frac{\zeta'(2)}{\zeta(2)}\right)+O\left(\frac{\log n}{n/d}\right)\right)+O(R(n))=\frac{n}{\zeta(2)}\sum_{d\le U}\frac{1}{d}\left(\log (n/d)+\gamma-\frac{\zeta'(2)}{\zeta(2)}\right)+O(R(n))=\frac{n}{\zeta(2)}\left(\left(\log n+\gamma-\frac{\zeta'(2)}{\zeta(2)}\right)\left(\log U+\gamma+O(1/U)\right)-\sum_{d\le U}\frac{\log d}{d}\right)+O(R(n)).$$
We also  know that
$$\sum_{d\le U}\frac{\log d}{d}=\frac{\log^2 U}{2}+\gamma_1+O(U^{-1}\log U).$$
Collecting all together we'll have
$$T(n)=\frac{n}{\zeta(2)}\left(\frac{\log^2n}{2}+\log n\left(2\gamma-\frac{\zeta'(2)}{\zeta(2)}\right)\right)+O(n\log^2\log n).$$
A: Partial answer: elementary arithmetic transformations show that
$$S(n,1,1)=\sum_{1\le y\le n}\dfrac{1}{y}\sum_{d\mid y}\phi(d)\lfloor n/d\rfloor$$
which allows for much faster computation since it is essentially a single sum.
I didn't push the analysis further, but my guess is that $S(n,1,1)$ is
asymptotic to $Cn\log(n)^2$ (with a log squared), perhaps with $C=3/\pi^2=1/(2\zeta(2))$.
Complete answer: I was really lazy. From the expression above, it is immediate to show that $$S(n,1,1)=\sum_{1\le d\le n}\dfrac{\phi(d)}{d}\log(n/d)+O(n\log(n))\;,$$
and the main term is indeed asymptotic to $Cn\log(n)^2$ with $C=3/\pi^2$
if I am not mistaken.
