# Number of couples of integers with a given lcm

How to find the number $P$ of integers $(n,m)$ such that $\operatorname{lcm}(n,m) = k$? Only $k$ is given.

I only find the number of $n$ such that $\operatorname{lcm}(n,k) = k$.

Can anyone help me solve this problem?

Thanks.

• Are you asking to find the number P of pairs $(n,m)$ such that $k=lcm(n,m)$ for a given $k$? – Giovanni De Gaetano Apr 30 '12 at 13:37
• One could do worse than to write the decomposition of k as a product of powers of primes and to wonder what the decompositions of the integers n and m can be. – Did Apr 30 '12 at 13:40
• @GiovanniDeGaetano yes I'm asking that. – Elmi Ahmadov Apr 30 '12 at 13:41
• @Didier: I would call that a good hint and answer – Ross Millikan Apr 30 '12 at 13:54
• @Ross Thanks. Done. – Did Apr 30 '12 at 14:04

One can consider the decomposition $k=\prod\limits_pp^{v_p(k)}$ of $k$ as a product of powers of distinct primes and wonder what the decompositions $n=\prod\limits_pp^{v_p(n)}$ and $m=\prod\limits_pp^{v_p(m)}$ of $n$ and $m$ can be.
The hypothesis that $k=\operatorname{lcm}(n,m)$ translates in terms of each triplet $(v_p(k),v_p(n),v_p(m))$ as $v_p(k)=\underline{\qquad\qquad}$. Hence, for a given value of $v_p(k)$, there are exactly $\underline{\qquad\qquad}$ couples $(v_p(n),v_p(m))$ available.
Taking into account every prime factor $p$ of $k$, one gets $P=\prod\limits_p\underline{\qquad\qquad}$.