I want to know a tighter bound for the growth rate of $f(n)$ when $n\to\infty $, where $$ f(n)=\sum_{i=1}^n\sum_{j=i}^n\sum_{k=j}^n [\mathrm{lcm}(i,j)\le n][\mathrm{lcm}(j,k)\le n][\mathrm{lcm}(i,k)\le n] $$
A trivial upper bound is $O(n\sqrt{n}\log^3 n)$,for that the numbers of pair $[\mathrm{lcm}(i,j)\le n]$ is $\Theta(n\ln^2n)$,and the number of triple rings of undirected simple graphs is $O(|E|^{1.5})$。
A trivial lower bound is $\Omega(n\sqrt{n})$,because the triples $i\le j\le k\le \sqrt{n}$ all satisfies the given equation.
However, due to the analysis of the function when $n\leq 10^6$, I guess that the upper bound is not tight, and the real growth rate might be around $\Theta(n\sqrt n)$.
A better upper bound would be $O(n\sqrt{n}\log^{2.25}n)$。
Assume $1\le B\le \sqrt{n}$,then the number of triples that satisfy $k\le \dfrac{n}{B}$ is $O\left (\left (\dfrac{n}{B}\right )^3\right )$ 。
For $k> \dfrac{n}{B}$, we have:
$$ \begin{eqnarray} g(n) & = & \sum_{k=\left\lceil\frac{n}{B}\right\rceil}^n\sum_{j=1}^k\sum_{i=1}^j [\mathrm{lcm}(i,j)\le n][\mathrm{lcm}(j,k)\le n][\mathrm{lcm}(i,k)\le n] \\ & \le & \sum_{k=\left\lceil\frac{n}{B}\right\rceil}^n\left (\sum_{j=1}^k [\mathrm{lcm}(j,k)\le n]\right ) \left (\sum_{i=1}^k [\mathrm{lcm}(i,k)\le n]\right ) \\ & \le & \sum_{k=\left\lceil\frac{n}{B}\right \rceil}^n\left (\sum_{j=1}^n [\mathrm{lcm}(j,k)\le n]\right )^2 \\ & \le & \sum_{k=\left\lceil\frac{n}{B}\right \rceil}^n\left (\sum_{d|k} \sum_{j=1}^{\lfloor\frac{n}{d}\rfloor} \left [dj\frac{k}{d}\le n\right ] \right )^2 \\ & \le & \sum_{k=\left\lceil\frac{n}{B}\right \rceil}^n\left (\sigma_0(k)\left \lfloor\frac{n}{k}\right \rfloor \right )^2 \\ & = & O\left (\sum_{k=\left \lceil\frac{n}{B}\right \rceil}^n\left (\sigma_0(k)\frac{n}{k}\right )^2\right ) \\ & = & O\left (\sum_{i=1}^B\sum_{k=\left \lfloor\frac{n}{i+1}\right \rfloor+1}^{\left \lfloor\frac{n}{i}\right \rfloor}\left (\sigma_0(k)i\right )^2\right ) \\ & = & O\left (\sum_{i=1}^B\sum_{k=1}^{\left \lfloor\frac{n}{i}\right \rfloor}\sigma_0^2(k)i\right ) \\ & = & O\left (\sum_{i=1}^Bi\frac{n}{i}\log^3\frac{n}{i}\right ) \\ & = & O(nB\log^3n) \\ \end{eqnarray} $$
And we can see that when $B=\Theta\left (\dfrac{\sqrt{n}}{\log^{0.75}n}\right )$, the minimum of two sums is $O(n\sqrt{n}\log^{2.25}n)$.
So my question is, is there a tighter upper/lower bound?
UPD: It has been solved by @Eric Naslund with an elegant transformation(I appreciate it very much). I am now curious about how to solve it with Dirichlet series, as @reuns said in the comments.
In this answer I'll prove that:
In principle it is possible to proceed from equation $(1)$ below and obtain an exact asymptotic for $f(n)$.
Proof. To better understand the triple sum, lets examine the summands, and attempt to rearrange the order of summation. For a given triple $i,j,k$, let $r=(i,j,k)$ denote the greatest common divisor among $i,j,k$. Let $\alpha,\beta,\gamma$ denote the leftover pairwise greatest common divisors: $$\alpha=\left(\frac{i}{r},\frac{j}{r}\right),\ \ \ \beta=\left(\frac{j}{r},\frac{k}{r}\right),\ \ \ \gamma=\left(\frac{k}{r},\frac{i}{r}\right).$$ Then $\alpha,\beta,\gamma$ will be pairwise relatively prime, and we may write $$i=r\alpha\gamma i',\ \ \ j=r\alpha\beta j',\ \ \ k=r\beta\gamma k'$$ where $i',j',k'$ are pairwise relatively prime. This will be a valid triple so long as each of $i'j'$, $j'k'$, and $k'i'$ are each at most $\frac{n}{r\alpha\beta\gamma}$. This is because $$\text{lcm}(i,j)=r\alpha\beta\gamma i'j'\leq n.$$ Thus rearranging the sum, we have that $$f(n)=\sum_{r\leq n}\sum_{\substack{\alpha,\beta,\gamma\leq\frac{n}{r}\\ \alpha,\beta,\gamma\text{ pairwise}\\ \text{relatively prime} } }\sum_{\substack{ij,jk,ki\leq\frac{n}{r\alpha\beta\gamma}\\ i,j,k\text{ pairwise}\\ \text{relatively prime}} }1\ \ \ \ \ \ \ \ \ \ (1)$$ It follows that we may upper bound $f(n)$ by $$f(n)\leq \sum_{r\leq n}\sum_{\alpha,\beta,\gamma\leq\frac{n}{r}}\sum_{ij,jk,ki\leq\frac{n}{r\alpha\beta\gamma}}1.\ \ \ \ \ \ \ \ \ \ (2)$$ Let's proceed by bounding the inner sum $$\sum_{ij,jk,ki\leq x}1.$$ If $i>\sqrt{x}$, then we must have both $j,k\leq\sqrt{x}$ since $ij\leq x$ and $ik\leq x$. By symmetry it follows that $$\sum_{ij,jk,ki\leq x}1 =\sum_{i,j,k\leq\sqrt{x}}1+3\sum_{\sqrt{x}<i<x}\sum_{j,k\leq\frac{x}{i}}1$$ $$=\left[\sqrt{x}\right]^{3}+3\sum_{\sqrt{x}<i<x}\left[\frac{x}{i}\right]^{2}$$ where $\left[x\right]$ denotes the floor of $x$. Since $[x]=x-\{x\}\leq x$, the above is at most $$x^{\frac{3}{2}}+3x^{2}\sum_{\sqrt{x}<i\leq x}\frac{1}{i^{2}}.$$ For $x<2$, the rightmost sum is $0$. For $x\geq2$, by considering the area under the curve $1/y^{2}$, the sum over $i$ can be bounded by the integral $$\int_{\sqrt{x}-1}^{x-1}\frac{1}{y^{2}}dy=\frac{1}{\sqrt{x}-1}-\frac{1}{x-1}=\frac{1}{\sqrt{x}}\cdot\left(\frac{x}{x-1}\right)\leq\frac{2}{\sqrt{x}}.$$ Hence $$\sum_{ij,jk,ki\leq x}1\leq8x^{\frac{3}{2}}.$$ It follows that $$f(n)\leq\sum_{r\leq n}\sum_{\alpha,\beta,\gamma\leq\frac{n}{r}}8\frac{n^{\frac{3}{2}}}{r^{\frac{3}{2}}\alpha^{\frac{3}{2}}\beta^{\frac{3}{2}}\gamma^{\frac{3}{2}}}$$ $$\leq8n^{\frac{3}{2}}\sum_{r}\frac{1}{r^{\frac{3}{2}}}\sum_{\alpha,\beta,\gamma}\frac{1}{\alpha^{\frac{3}{2}}\beta^{\frac{3}{2}}\gamma^{\frac{3}{2}}}$$ $$\leq8n^{\frac{3}{2}}\zeta\left(\frac{3}{2}\right)^{4}.$$