Combinatorics. How many 5 digit numbers that don't divide by 5?

57 Views Asked by At

Good evening everyone. I'm trying to solve this math problem. How many 5 digit numbers can we create using only these numbers $(0; 3; 6; 7; 8)$. Created numbers cannot be divided by $5$ and the given numbers (the ones that we use to create the 5 digit number) can't repeat.

I know that correct answer is $72$, but I'm not sure how to get it. Maybe someone could help me with that? Thank you in advance

2

There are 2 best solutions below

1
On BEST ANSWER

There are $4$ ways to select the first digit (it cant be $0$).

After this there are $3$ ways to select the last digit (it cant be $0$ either).

After this there are $3!$ ways to select the numbers in the middle.

So the answer is $4\times 3\times 6=72$


Alternative solution:

Place the digit $0$ in any of $3$ positions and the rest in $4!$ ways.

0
On

The number of ways to arrange $5$ digits total is $5! = 120$

We need to consider 2 other cases to meet the criteria for the question

Considering $0$ as the first digit: the number of ways to arrange $4$ digits total is $4!=24$

Considering $0$ as the last digit: the number of ways to arrange $4$ digits total is $4!=24$

We take the total number of combinations and subtract that combinations that are not allowed, so the total then becomes: $5! - 4! - 4! = 120 - 24 - 24 = 72$