Combinatorics – Number of Ordered Triplets with Given LCM

combinationscombinatoricspermutations

What is the number of ordered triplets $(x, y, z)$ such that the LCM of $x, y$ and $z$ is $2^33^3$ where $x, y,z\in \Bbb N$?

What I tried :

At least one of $x, y$ and $z$ should have factor $2^3$ and at least one should have factor $3^3$. I then tried to figure out the possible combinations but couldn't get the correct answer.

Best Answer

We use Inclusion/Exclusion.

First we find the number of (positive) triples in which each entry divides $2^33^3$. At each of $x$, $y$, $z$ we have $(4)(4)$ choices, for a total of $16^3$.

We want to subtract the number of such triples in which each entry divides $2^23^3$. There are $12^3$ such triples. There are also $12^3$ such triples in which each element divides $2^33^2$.

But we have subtracted once too many times the $9^3$ triples in which each entry divides $2^23^2$.

So the total is $16^3-2\cdot 12^3+9^3$.