How many positive integers between and (inclusive) have a multiple whose digits are all ? (That is, a multiple of the form ).
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
First note that any multiple of an even number will be even and thus cannot end in 9 and that any multiple of a multiple of 5 will end in 5 or 0 and cannot end in 9 either.
Now take any number N such that ( N , 1 0 ) = 1 and consider the numbers { 1 0 0 , 1 0 1 , … 1 0 N − 1 } . Since ( N , 1 0 ) = 1 then clearly none of these numbers is a multiple of N (For N > 1 but this case is trivial).
Since there are N − 1 possible non-zero remainders mod N (namely 1 , 2 , … , N − 1 ) and we have N numbers, then two of the numbers must leave the same remainder mod N . Say 1 0 i ≡ 1 0 j mod N , for j > i .
Then N ∣ 1 0 j − 1 0 i ⟹ N ∣ 1 0 i ⋅ ( 1 0 j − i − 1 )
But since ( N , 1 0 ) = 1 then N has no common factor with 1 0 i . Hence N ∣ 1 0 j − i − 1 , a number of the form 9 9 9 … 9
So any N such that ( N , 1 0 ) = 1 has a multiple whose digits are all 9 (we have also found that the smallest such multiple has at most N − 1 digits).
Finally there are 1 0 0 − 2 1 0 0 − 5 1 0 0 + 1 0 1 0 0 = 4 0 such integers between 1 and 1 0 0 .