Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|cite|improve this question
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}$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.