An eight digit number divisible by 9 is to be formed using digits from 0 to 9 without repeating the digits. The number of ways in which this can be done is:
Solutions · 1
Official solution
Sum of digits 0--9 is 45. For an 8-digit number divisible by 9, we must exclude 2 digits whose sum is a multiple of 9 removed from 45 leaving a multiple of 9: excluded pair sum ≡0(mod9): pairs (0,9),(1,8),(2,7),(3,6),(4,5) --- 5 valid pairs.
For each pair excluded, arrange the remaining 8 digits (first digit nonzero): if the pair includes 0, first digit has 8 non-zero choices among the remaining 8 digits used, giving 8×7!; if the pair doesn't include 0, first digit has 7 choices (excluding 0), giving 7×7!.
One pair (0,9) includes 0: contributes 8×7!. The other four pairs don't include 0: each contributes 7×7!.
\[\text{Total} = 8(7!) + 4\times7(7!) = (8+28)(7!) = 36(7!)\]