[Math] How many ordered triples (a, b, c) exist if a, b, and c are positive digits and their product is divisible by 20

combinationscombinatoricspermutations

Edit #1: Remember that a, b, and c are positive digits, so their values are between 1 & 9, inclusive

I was thinking casework for this problem, but I got stuck on the last part. I can't figure out whether there are four cases or three.

$20 = 2^2 * 5$, so you need two 2's and a 5.

Case 1: One five, either a four or an eight, and an odd number that is not five

Case 2: Two fives and either a four or an eight


Here's where I get confused. I'm not sure whether it should be:

Case 3: One five and two even numbers

or:

Case 3: One five and two even numbers that are different

Case 4: One five and two even numbers that are the same


Here are the calculations that I have done so far:

Case 1: $2* 4 * 3!$, as the five is fixed, you can choose between the 4 & 8, and four choices for the odd number that is not five. The $3!$ accounts for the various permutations of the three that are chosen.

Case 2: $2 * 3$. The fives are fixed, you choose between the 4 & 8, and there are three different ways to arrange them after you choose your numbers.

Edit #2: I also think that the answer is $102$. I 'cheated' (used Python and wrote a script) to figure that part out, but I want to figure out the answer with math, not programming.

Thank you in advance!

Best Answer

We can have two $5$ and one from $\{4,8\}$; gives $2\cdot3=6$ triples.

We can have one $5$ and two from $\{2,4,6,8\}$. We can chose two different ones in ${4\choose2}=6$ ways, and this gives $6\cdot3!=36$ triples of three different digits. When we choose the same even number two times we obtain $4\cdot3=12$ more triples.

We can have one $5$, one from $\{4,8\}$ and one from $\{1,3,7,9\}$. This gives $2\cdot4\cdot3!=48$ triples.

In all there appear $6+36+12+48=102$ admissible triples.