From this question, what I can understand so far is that the number of pairs with equal lcm $d$ is
$$\prod_i(2e_i+1)$$
where $d=\prod_i p_i^{e_i}$; $p_i$ a prime number. If I ignore the order of the elements in each pair, the number becomes $$\frac{1+\prod_i(2e_i+1)}{2}. \quad (1)$$
I see that the product is odd, and dividing by 2 would give a noninteger number.
Question Why the product is summed by one in the numerator of (1)? Why not $-1$?
There are three types of pairs $(a,b)$ counted by $\prod$:
If you consider the first two types to be the same, the count is $$\frac{\prod-1}{2} + 1 = \frac{1+\prod}{2}$$