# In how many ways can five-digit numbers be formed by using digits $0,2,4,6,8$ such that the numbers are divisible by $8$?

In how many ways can five-digit numbers be formed by using digits $0,2,4,6,8$ such that the numbers are divisible by $8$?

Assume the case in which repetition is not allowed

Our Approach:

Case1: When repetition is not allowed.

We start to make pairs of combinations such that they are divisible by $8$ and left over number can be selected in the following ways also.

Is there any other approach (without making cases as it can be too long) through which I can solve this problem?

• The approach by cases isn't really that long, for instance the only possible last digits are $0,4,8$ and the only possible last two digits combinations are $08, 24, 40, 48, 64, 80$, of which all have exactly the same possible statement that the remaining digits can be in any combination. With repeated digits, the only additions to the possible-last digits list are $00, 88$. – abiessu Aug 27 '15 at 17:17
• Are leading zeros allowed ? – Peter Aug 27 '15 at 17:18
• @Peter Leading zeros means A number that starts with 0? – justin takro Aug 27 '15 at 17:19
• Yes, this is what I mean. – Peter Aug 27 '15 at 17:20
• No,How could that be a 5 digit number then? – justin takro Aug 27 '15 at 17:21

Hint : Since all the digits have to be even, any possible number is divisible by $8$, if and only if the last two digits form a number divisible by $8$.
• Consider, that $200$ is divisibel by $8$, so here two digits are sufficient. – Peter Aug 27 '15 at 17:23
• I mean, two digits are sufficient to check the divisibility because $200$ is divisible by $8$. For example $20648$ is divisible by $8$ because $48$ is divisible by $8$. – Peter Aug 27 '15 at 17:53