How many 8 digit numbers are there, such that they are divisible by 9 and all of the digits are distinct?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Each 8 digit number will be made of 4 pairs that sum to 9. Since no 8 distinct single digit numbers can add to 45 or 27.
Let the digit pairs below be denoted by a distinct letter
0 9 = A
1 8 = B
2 7 = C
3 6 = D
4 5 = E
Each combination of the letters with A will have 8 ! − 7 ! = 7 ⋅ 7 ! possible combinations, this is because we can not have 0 be the first digit of the 8 digit number.
Now, we have the pairs A B C D , A B C E , A B D E , A C D E , B C D E
Thus totaling the combinations we have
4 ⋅ ( 7 ⋅ 7 ! ) + 8 ⋅ 7 ! = 3 6 ⋅ 7 !
By the divisibility by 9 criterion, a number is divisible by 9 if and only if ANY number obtained by whatever permutation of its digit is divisible by 9.
We must use 8 different digits so we must eliminate 2 from these digits
1 2 3 4 5 6 7 8 9 0
The sum of these 10 digit is 45, we must eliminate two digit in a way that the remaining sum is still divisible by 9, but the sum of two of these digit is always at least 1 and at most 17 so the sum MUST be 9.
the possibilities are only 5.
eliminating 9 and 0 ---> 12345678 and any permutation of this for a total of 8! choices
eliminating 8 and 1 ----> 23456790 now we must exclude all the permutations of this number that begins with 0 (since the number would have 7 digit) so we have 7x7! choices
Similarly the other possibilities eliminating 7 and 2 -----> 13456890 eliminating 6 and 3 -----> 12457890 eliminating 5 and 4 -----> 12367890
each gives 7x7! choices
So the total of legit possibilities is 8! + 4x7x7! = 7!(8 + 28) = 36x7!
How can we make a number with distinct digits? The easiest to think about this, is if we don't take an 8-digit number, but a 10-digit number. For example, 0123456789. Is this number divisible by 9? One property we can use is to add all the digits together, and see if we recognize the number to be a number divisible by 9. In this case, 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45, which you might recognize as a number divisible by 9. If not, then sum the digits of the sum again: 4 + 5 = 9.
There's another thing I want you to notice; you can sum each digit with another digit to get 9. So with 0123456789, you can pair 0 with 9 (0 + 9 = 9), 1 with 8 (1 + 8 = 9), 2 with 7 (2 + 7 = 9), etc.
But we have a 10-digit number, and we actually want an 8-digit number. How might we do this? Well, we need to remove 2 digits, while keeping the sum of the remaining 8 digits divisible by 9. This only happens when you remove a pair, for if you remove two digits that do not add up to 9, the remaining 8 digits won't be divisible by 9 anymore.
For example, we can remove 1 and 9 from 0123456789, leaving us with 02345678. Summing will give us 0 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 35, which is not divisible by 9. On the other hand, if we remove 0 and 9, we are left with 12345678, which contains pairs of digits that add up to 9, and lo and behold, summing the digits of 12345678 will give you an answer divisible by 9! (that's an exclamation, not a factorial).
The question now is, how many pairs of digits can you remove whilst still ending up with an 8-digit number whose sum of the digits is divisible by 9, and what then is the set of digits you'll end up with?
Remove 0 and 9, and you are left with 12345678 Remove 1 and 8, and you are left with 02345679 ... Remove 4 and 5, and you are left with 01236789
Okay, so you found the number of distinct 8-digit numbers whose sum of the digits is divisible by 9. For each of those, you can permutate the digits, it won't change the fact that the sum of its digits is divisible by 9. There is just one caveat though; be careful of having a 0 in your set of digits. Remember, the 8-digit number can't start with a 0. So if you remove 0 and 9, yeah, go ahead, 8!. If you remove any other pair though, it won't be 8!.
Problem Loading...
Note Loading...
Set Loading...
Denote the 8 digit number to be a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 where a i are single digit non negative integer for 2 ≤ i ≤ 8 and a 1 = 1 , 2 , 3 , … , 9
By divisibility rule, the sum of digits is a multiple of 9 . The list of possible values of k = 1 ∑ 8 a k is { 0 , 9 , 1 8 , 2 7 , 3 6 , 4 5 }
Noting the restriction of distinct integers: 0 + 1 + 2 + … + 9 = 4 5
Since there's 8 numbers, and we're only taking out two numbers from the sum, so the two numbers removed must of sum ( 4 5 − 3 6 = 9 ) , ( 4 5 − 2 7 = 1 8 ) , ( 4 5 − 1 8 = 2 7 ) , ( 4 5 − 9 = 3 6 ) . But the maximum sum of two single digit numbers is 8 + 9 = 1 7 , therefore the sum of the two removed number can only be 9 .
Which means we are taking out two numbers from the set { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } such that their sum is 9 . So the numbers can be ( 0 , 9 ) , ( 1 , 8 ) , ( 2 , 7 ) , ( 3 , 6 ) , ( 4 , 5 ) .
Case 1 ( 0 , 9 ) removed : there's 8 ! permutation for the remaining 8 numbers.
Case 2 ( 1 , 8 ) removed : since a 1 = 0 , then there's 7 × 7 ! permutation.
Other cases ( 2 , 7 ) , ( 3 , 6 ) , ( 4 , 5 ) are similar to case 2.
Hence the total permutation is 8 ! + 7 × 7 ! × 4 = 8 × 7 ! + 2 8 × 7 ! = 3 6 × 7 !