How can we show that the number of pairs (where $(a, b)$ is the same as $(b, a)$) with $LCM(a, b) = n$ is equal to:
$\frac{(2e_1+1)(2e_2+1)...(2e_k+1)+1}{2}$
Where
$n=p_1^{e_1}\cdot p_2^{e_2}\cdot ...\cdot p_k^{e_k}, p_i\space prime\space \forall 1\leq i\leq k$
I managed to guess this formula for a programming problem I was working on, but I'd be interested in a deduction or proof.