[Math] If no repetitions are allowed, how many 9-digit numbers can be formed from the digits 1, 2, 3, …, 9? How many of these are divisible by 4

combinatoricspermutations

If no repetitions are allowed, how many 9-digit numbers can be formed from the digits 1, 2, 3, …, 9? How many of these are divisible by 4 ?

My Attempt:

the first part is obviously 9!

Now the 2nd part is the tricky one. I saw a similar question where the person who answered sums up all the numbers, in which the sum = 45, but I don't quite understand what to do next. Even if the unit digit is 2,4 or 8, there's no guarantee that it's divisible by 4

Best Answer

A number $n$ is divisible by $4$ if and only if $n\mod 100$ is divisible by $4$ (the last two digits).

You can find other divisibility rules here: http://www.softschools.com/math/topics/divisibility_rules_2_4_8_5_10/

Now notice that $12, 16, 24, 28, 32, 36, 48, 52, 56, 64, 68, 72, 76, 84, 92, 96$ are the only possible two digit combinations that can be made which are divisible by $4$. Thus our answer comes out to be $16\cdot7!$