Maths Olympiad Prep

Library / /175 of 183

, 2018

Number theory Difficulty 4.8 AIME Find the answer Canada

The number 20182018 is used to create six-digit positive integers. These six-digit integers must contain the digits 20182018 together and in this order. For example, 720186720\,186 is allowed, but 209318209\,318 and 210893210\,893 are not. How many of these six-digit integers are divisible by 9?

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 2+0+1+8=112+0+1+8=11.

Let the remaining two digits be aa and bb so that the six-digit positive integer is ab2018ab2018 or ba2018ba2018 or a2018ba2018b or b2018ab2018a or 2018ab2018ab or 2018ba2018ba.

When the digits aa and bb are added to 11, the sum must be divisible by 9.

That is, the sum a+b+11a+b+11 must be divisible by 9.

The smallest that each of aa and bb can be is 0, and so the smallest that the sum a+b+11a+b+11 can be is 0+0+11=110+0+11=11.

The largest that each of aa and bb can be is 9, and so the largest that the sum a+b+11a+b+11 can be is 9+9+11=299+9+11=29.

The only integers between 11 and 29 that are divisible by 9 are 18 and 27.

Therefore, either a+b=1811=7a+b=18-11=7 or a+b=2711=16a+b=27-11=16.

If a+b=7a+b=7, then the digits aa and bb are 0 and 7 or 1 and 6 or 2 and 5 or 3 and 4, in some order.

If aa and bb are 1 and 6, then the possible six-digit integers are 162018,612018,120186,620181,162\,018, 612\,018, 120\,186, 620\,181,

201816,201\,816, and 201861201\,861.

In this case, there are 6 possible six-digit positive integers.

Similarly, if aa and bb are 2 and 5, then there are 6 possible six-digit integers.

Likewise, if aa and bb are 3 and 4, then there are 6 possible six-digit integers.

If aa and bb are 0 and 7, then the possible six-digit integers are 702018,720180,201870702\,018, 720\,180, 201\,870, and 201807201\,807, 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 aa and bb is 7, there are 6+6+6+4=226+6+6+4=22 possible six-digit integers.

Finally, we consider the case for which the sum of the digits aa and bb is 16.

If a+b=16a+b=16, then the digits aa and bb are 7 and 9, or 8 and 8.

If aa and bb are 7 and 9, then there are again 6 possible six-digit integers (792018,972018,792\,018, 972\,018,

7201869,920187,201879,720\,1869, 920\, 187, 201\,879, and 201897201\,897).

If aa and bb are 8 and 8, then there are 3 possible six-digit integers: 882018,820188,882\,018, 820\,188, and 201888201\,888.

Therefore, for the case in which the sum of aa and bb is 16, there are 6+3=96+3=9 possible six-digit integers, and so there are 22+9=3122+9=31 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.

Want a route through all this instead of an archive? The track puts 2,444 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: CEMC, University of Waterloo, licensed CC-BY-NC-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.