<s>[INST] Find all solutions to $xyz=1,000,000;$ $x,y,z \in \mathbb Z$ I had previously solved $xy=1,000,000;$ $x,y \in \mathbb Z$, I believe: 1,000,000 has 49 factors so there are 49 pairs since $x$ and $y$ could be both positive or both negative.
Please would you help me find as efficient and systematic a way as possible.
EDIT: since there are many solutions, finding how many there are would be fine. However, unfortunately, (1,1,1000000) is considered distinct from (1000000,1,1).
Thank you
 [/INST] If $x$, $y$, and $z$ are positive integers with $xyz=2^6\cdot5^6$, then $x=2^a\cdot5^{a'}$, $y=2^b\cdot5^{b'}$, and $z=2^c\cdot5^{c'}$ with $0\le a,a',b,b',c,c'$ and $a+b+c=a'+b'+c'=6$.  There are $1+2+3+4+5+6+7=28$ non-negative solutions to $a+b+c=6$, and likewise for $a'+b'+c'=6$, so there is a total of $28\cdot28$ positive triples with product $1{,}000{,}000$.  Each of these triples can be modified in three different ways to give a triple with two negative signs, so the total number of integer solutions to $xyz=1{,}000{,}000$ is $4\cdot28\cdot28=3136$.
To explain the $1+2+3+4+5+6+7$, if $a=6$, then there's only $1$ choice for $b$ and $c$, namely $b=c=0$, while if $a=5$, there are $2$ choices, down to $a=0$, for which there are $7$ solutions to $b+c=6$.
</s>