The number is used to create six-digit positive integers. These six-digit integers must contain the digits together and in this order. For example, is allowed, but and are not. How many of these six-digit integers are divisible by 9?
, 2018
Pick one
Solution
For a positive integer to be divisible by 9, the sum of its digits must be divisible by 9.
In this problem, we want to count the number of six-digit positive integers containing 2018 and divisible by 9.
Thus, we must find the remaining two digits, which together with 2018, form a six-digit positive integer that is divisible by 9.
The digits 2018 have a sum of .
Let the remaining two digits be and so that the six-digit positive integer is or or or or or .
When the digits and are added to 11, the sum must be divisible by 9.
That is, the sum must be divisible by 9.
The smallest that each of and can be is 0, and so the smallest that the sum can be is .
The largest that each of and can be is 9, and so the largest that the sum can be is .
The only integers between 11 and 29 that are divisible by 9 are 18 and 27.
Therefore, either or .
If , then the digits and are 0 and 7 or 1 and 6 or 2 and 5 or 3 and 4, in some order.
If and are 1 and 6, then the possible six-digit integers are
and .
In this case, there are 6 possible six-digit positive integers.
Similarly, if and are 2 and 5, then there are 6 possible six-digit integers.
Likewise, if and are 3 and 4, then there are 6 possible six-digit integers.
If and are 0 and 7, then the possible six-digit integers are , and , since the integer cannot begin with the digit 0.
In this case, there are 4 possible six-digit positive integers.
Therefore, for the case in which the sum of and is 7, there are possible six-digit integers.
Finally, we consider the case for which the sum of the digits and is 16.
If , then the digits and are 7 and 9, or 8 and 8.
If and are 7 and 9, then there are again 6 possible six-digit integers (
and ).
If and are 8 and 8, then there are 3 possible six-digit integers: and .
Therefore, for the case in which the sum of and is 16, there are possible six-digit integers, and so there are six-digit positive integers in total.
We note that all of these 31 six-digit positive integers are different from one another, and that they are the only six-digit positive integers satisfying the given conditions.
Therefore, there are 31 six-digit positive integers that are divisible by 9 and that contain the digits 2018 together and in this order.