Sum of greatest common divisors As usually, let $\gcd(a,b)$ be the greatest common divisor of integer numbers $a$ and $b$.
What is the asymptotics of
$$\frac{1}{n^2} \sum_{i=1}^{i=n} \sum_{j=1}^{j=n} \gcd(i,j)$$
as $n \to \infty?$

Of the lattice points $[1,n] \times [1,n], 1-\frac 1{p^2}$ have no factor $p$ in the $\gcd, \frac 1{p^2}-\frac 1{p^4}$ have a factor $p$ in the $\gcd\frac 1{p^4}-\frac 1{p^6}$, have a factor $p^2$ in the $\gcd, \frac 1{p^6}-\frac 1{p^8}$ have a factor $p^3$ in the $\gcd$ and so on.  That means that a prime $p$ contributes a factor $(1-\frac 1{p^2}+p(\frac 1{p^2}-\frac 1{p^4})+p^2({p^4}-\frac 1{p^6})+\dots$ or $\sum_{i=0}^\infty(p^{-i}-p^{-i-2})=\sum_{i=0}^\infty p^{-i}(1-p^{-2})=\frac {1-p^{-2}}{1-p^{-1}}=1+\frac 1p$.  I don't know how to justify the use of the fact that $\gcd$ is multiplicative to turn this into $$\lim_{m \to \infty}\prod_{p \text {prime}}^m(1+\frac 1p)$$ to get the asymptotics, but it seems like it should work by taking, say $m=\sqrt n$ and letting $n \to \infty$ 
