How many 7-digit positive integers are made up of the digits 0 and 1 only, and are divisible by 6?
, 2019
Pick one
Solution
Let be a 7-digit positive integer made up of the digits 0 and 1 only, and that is divisible by 6.
The leftmost digit of cannot be 0, so must be 1.
Since is divisible by 6, then is even, which means that the rightmost digit of cannot be 1, and so must be 0.
Therefore, has the form for some digits each equal to 0 or 1.
is divisible by 6 exactly when it is divisible by 2 and by 3.
Since the ones digit of is 0, then it is divisible by 2.
is divisible by 3 exactly when the sum of its digits is divisible by 3.
The sum of the digits of is .
Since each of is 0 or 1, then .
Thus, is divisible by 3 exactly when is equal to 3 or to 6.
That is, is divisible by 3 exactly when either 2 of are 1s or all 5 of are 1s.
There are 10 ways for 2 of these to be 1s.
These correspond to the pairs .
There is 1 way for all 5 of to be 1s.
Thus, there are such 7-digit integers.