On number of ordered pairs with given lcm and an interesting sequence of fractions For a positive integer $n,$ let $f(n)$ denote the number of ordered pairs with lcm $n$. Since the total number of ordered pairs from the set $\{1,2,\ldots,n\}$ is $n^2$ it seems interesting to to see how the sequence $\left\langle \frac{f(n)}{n^2} \right\rangle$ behaves. I did some simulations and it seems the sequence should converge to zero but I am not analytically sure. Can somebody kindly help me out?
 A: First, for any prime $p$ the ordered pairs are $(1,p), (p,1), (p,p)$, so we have $f(p)=3, \frac{f(p)}{p^2}=\frac {3}{p^2}$ which goes to $0$ for large $p$, so $0$ is an accumulation point.  To show it is the limit, we need to show the highest values also go to $0$.
Consider $f(n)$ for $n$ the power of a prime, $n=p^k$.  We have $f(n)=2k+1$ because one of the elements of the ordered pair must be $p^k$ while the other can be any power of $p$ from $0$ to $k$.  Now note that your function $f(n)$ is multiplicative.  If $n=ab$ with $a,b$ coprime, $f(n)=f(a)\cdot f(b)$.  If the prime factorization of $n$ is $n=p^aq^br^c$ we have $f(n)=(2a+1)(2b+1)(2c+1)$ because you can distribute the powers of each prime independently.  You need $a,b,c$ powers of each prime in one of the two factors, then $0$ to the maximum in the other.
The $n$ that are maxima so far of $f(n)$ will be similar to the highly composite numbers but will have more large primes and less factors of $2$ because adding a new prime triples the number of pairs instead of only doubling the number of factors.  For example $30$ is a new maximum of $f(n)$ with $27$ pairs, while it only has $8$ factors which is no more than $24$ has.
A rough way to see that $\frac {f(n)}{n^2}$ converges to $0$ is to consider the primorials, the products of the first $k$ primes.  These have $3^k$ ordered pairs, which is a lot, but they are not the smallest numbers with that many ordered pairs-you want more small factors than that.  The primorials are roughly $k^k$, so we are asking about $\frac {3^k}{k^{2k}}$, which goes to zero.  I am sure that the same thing will happen with the maxima of $f(n)$ but don't know how to demonstrate it.
