The LCM of three positive integers $X, Y$ and $Z$ is $119^2$. Find the number of ordered triplets $(X, Y, Z)$.
My question is similar to: What is the number of ordered triplets $(x, y, z)$ such that the LCM of $x, y$ and $z$ is … ,
but I am not able to understand both of the approaches provided there.
My attempt:
$119^2 = 7^2 * 17^2$ has total of $9$ factors
Case 1: When $119^2$ is one of the numbers.
Rest of the $2$ numbers have to be a factor of $119^2$
Case 1(a) :- $119^2 , a, b\Rightarrow\binom{8}{2}*3!=168$
Case 1(b) :- $119^2 , a, a\Rightarrow\binom{8}{1}*\frac{3!}{2!}=24=24$
Case 1(c) :- $119^2 , 119^2, a\Rightarrow\binom{8}{1}*\frac{3!}{2!}=24$
Case 1(d) :- $119^2 , 119^2, 119^2\Rightarrow 1$ way
Case 1(a), 1(b) are made using only one $119^2$, that's why I am choosing other factors from 8 options.
CASE 1 : $217$
Case 2:- When $119^2$ is not present in any number
Case 2(a):- $7^2$, $17^2$, $($a factor other than $7^2$, $17^2) \Rightarrow \binom{6}{1}* 3!=36$
Case 2(a):- $7^2$, $17^2$, $(7^2$ or $17^2) \Rightarrow \binom{2}{1}* \frac{3!}{2!}=6$
CASE 2 : $42$
I am getting a total of $217+42=259$ ways, but the answer is given as $361$ ways.
What all ways am I missing?
Best Answer
My Calculation :
Consider $7^2$ :
When $X$ or $Y$ or $Z$ have $7^2$ , then LCM will have $7^2$ , Else LCM will not have $7^2$.
Number of ways to include (or not include) $7^0,7^1,7^2$ will be $3 \times 3 \times 3 = 27$ , while number of ways to include $7^0,7^1$ (& not include $7^2$) is $2 \times 2 \times 2 = 8$ , Hence the ways we want are $27 - 8 = 19$
Consider $17^2$ :
When $X$ or $Y$ or $Z$ have $17^2$ , then LCM will have $17^2$ , Else LCM will not have $17^2$.
Number of ways to include (or not include) $17^0,17^1,17^2$ will be $3 \times 3 \times 3 = 27$ , while number of ways to include $17^0,17^1$ (& not include $17^2$) is $2 \times 2 \times 2 = 8$ , Hence the ways we want are $27 - 8 = 19$
Total ways will be $19 \times 19 = 361$
Analysing OP Calculation :
Case 1 is Correct , though 1A & 1B can be combined like this :
$119^2,x,y$ where $x$ & $y$ have 8 ways , while we can order that in $3$ ways : $8 \times 8 \times 3 = 64 \times 3 = 192$
That matches OP way $168 + 24 = 192$
Case 2 is not Correct.
It is counting $7^2 , 17^2 , x$
It is missing Eg:
$7^2 \times 17 , 17^2 , x$
$7^2 , 17^2 \times 7 , x$
$7^2 \times 17 , 17^2 \times 7 , x$
UPDATE [ DUE TO OP QUERY ] :
Let $A=7^0,B=7^1,C=7^2$.
We can make the numbers $X,Y,Z$ by including these numbers 3 times to $X,Y,Z$ like this : "AAA or AAB or AAC or ABA or CAB or CBA , ETC"
With that , how many ways ? $3 \times 3 \times 3 = 27$ ways.
In that , we always want C to be there , otherwise LCM will not have $C=7^2$.
Hence , we count ways where C is not there & remove those unwanted ways.
"AAA , AAB , ABA , ABB , BAA , BAB , BBA , BBB"
Without C , how many ways we have ? $2 \times 2 \times 2 = 8$ ways.
Hence , wanted ways are $27 - 8 = 19$ with $7$
Likewise , wanted ways are $27 - 8 = 19$ with $17$
Total ways are $19 \times 19 = 361$
This is Correct Method !