How many 7-digit numbers with distinct digits can be made that are divisible by 3?

178 Views Asked by At

How many 7-digit numbers with distinct digits can be made that are divisible by 3? First of all, I counted all the ways to insert 7 of 10 digits in a number making the number divisible by 3. Digits that can be left: a)012, 015, 018, 024, 027, 036, 039, 045, 048, 057, 069, 078 12 ways ; b)123, 126, 129, 135, 138, 147, 156, 159, 168, 189 10 ways; c)234, 237, 246, 249, 258, 267, 279 7 ways; 345, 348, 357, 369, 378 5 ways; 456, 459, 468, 489 4 ways; 567, 579 2 ways; 678 1 way; 789 1 way.

In case a), all the remaining 7 digits are no 0, so I counted: 7! x 12 = 60480 numbers In all the other cases (30), from 7! I subtracted the cases in which the number begin with 0 (6! cases). So, 30 x (7! - 6!) = 30 x (5040 - 720) = 4320 x 30 = 129600 numbers. In total I counted 190080 numbers with distinct digits that are divisible by 3. Is this process correct?

This problem is the number 23 of "Guts February 2000 HMMT". It doesn't specify if the leftmost digit is permitted to be 0; I supposed that a number can't begin with a "0". The reason I wrote this problem on this forum is that the answer posted in the "answer sheet " of that competition is 224640. I tried hard, also considering "0" as the leftmost digit, but I hadn't been able to find this number. I wanted to verify with other people if it could be a mistake in the answer sheet.

I thank in advance those who want to solve this problem.

1

There are 1 best solutions below

0
On

Your answer seems to be correct.

The number of such numbers with $0$ as one of its digits is equal to the number of ways to choose 3 non-zero digits with sum divisible by 3. This is equal to the number of ways where all leave the same remainder mod 3, plus when all 3 are different mod 3. This is equal to $3+3^3=30$. For each of these, there are $6 \times 6!$ ways.

When $0$ is not one of the digits, we need to count the number of pairs of non-zero digits whose sum is a multiple of 3. This is equal to $3^2 +{3\choose2}=12$, the first term being when they are congruent to 1, 2 mod 3 and the second term being for all numbers to be multiples of 3. For each such set, there are $7!$ ways to arrange the digits.

This gives the answer: $30\times6\times6!+12\times7!=129600+60480=190080$