For how many positive integers
n
where
1
≤
n
≤
1
0
0
0
does there exist some multiple of
n
which is a sequence of 1s followed by a sequence of 0s in base 10?
Details and Examples
There must be at least one 1 at the beginning of the multiple and it must end in at least one 0
10 is such an n since it itself satisfies the conditions
6 is such an n since 6 × 1 8 5 = 1 1 1 0 which also satisfies the conditions
Image credit: Zebra Photo Gallery
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.
simple and elegant
nice use of pigeonhole principle!
one of the best answer :)
n can be multiplied by some power of 2 or 5, such that the exponents on the 2 and 5 are equal, making it a power of 10. If both exponents were 0, n can be multiplied by 10 to make its multiple end with 0's.
If the first process didn't turn n into a sequence of 1's followed by a sequence of 0's, then the number n 1 has a repeating decimal. If you multiply the part that repeats by n (without its trailing zeros), you get some number of 9's (since it has to equal 1, and 0 . 9 is the only repeating decimal that equals 1)
Ex: 1 4 2 8 5 7 ⋅ 7 = 9 9 9 9 9 9
You can multiply n by the repeating part to get a sequence of 9's followed by a sequence of 0's. Then, you can divide that multiple by 9 to get a sequence of 1's followed by a sequence of 0's.
If n was originally divisible by 3, the dividing by 9 could've made the sequence of 1's followed by 0's not a multiple of n . In these situations, just multiply the number of 1's in front of the 0's by 3 or 9 (27 would be unnecessary since the original multiple was only divided by 9).
Ex: 5 1 1 = 0 . 0 1 9 6 0 7 8 4 3 1 3 7 2 5 4 9 0 1 9 6 0 7 8 4 3 1 3 7 2 5 4 9 5 1 ⋅ 0 1 9 6 0 7 8 4 3 1 3 7 2 5 4 9 0 1 9 6 0 7 8 4 3 1 3 7 2 5 4 9 = 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (32 1's) is not divisible by 51, but 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (96 1's) is.
This process can turn any n into a sequence of 1's followed by a sequence of 0's.
Beautiful thinking ... :)
To begin with we will only consider n which is not divisible by 2 or 5. Then let us consider the sequence a 1 = 1 , a 2 = 1 1 , ... , a n + 1 = i = 0 ∑ n 1 0 i . There are n + 1 terms in this sequence. We have 2 cases to inspect: The first case is that one of the terms in this sequence is a multiple of n . In that case we multiply this term by 10 to achieve a number which is a sequence of 1s followed by a 0 and thus satisfies our condition. In our second case, no single 1 of these terms is divisible by n . There are n possible remainders modulo n but the sequence has n + 1 terms, so by the pigeonhole principle at least 2 terms in the sequence have the same remainder modulo n . So if we subtract the smaller term of such a pair from the larger term we will achieve a multiple of n which is a string of 1s followed by a string of 0s. Therefore if g c d ( n , 1 0 ) = 1 there is a valid multiple of n .
So say now instead that n = 2 b × 5 c × y where g c d ( y , 1 0 ) = 1 . We know that there is a multiple of y which satisfies the conditions, so if we were to multiply this multiple by 1 0 MAX ( b , c ) then this new number would be a string of 1s followed by a string of 0s and be a multiple of n .
Therefore in fact all positive integers (and thus trivially all negative integers) n satisfy the conditions, so the answer is 1 0 0 0
You don't have to look at the case where n is not divisible by 2 or 5.
Consider your numbers a 1 , a 2 , … , a n + 1 . By the Pigeonhole Principle, two of these numbers are congruent modulo n . Subtract them, and you get a number of the form you want, which is divisible by n . This works for any n .
Log in to reply
This is actually the best way to do this in my opinion. Short and simple!
1/9n is rational number. So, it is possible to express 1/9n as repeating decimal. If period for this repeating decimal is p and q digit doesn't repeat, 99....9900...00 (number of 9 = p, number of 0 = q) is divisible by 9n. Therefore, 11...1100...00 is divisible by n.
Let us consider such a number M = 1 1 1 ⋯ 1 0 0 0 ⋯ 0 = 1 0 a + 1 0 a + 1 + ⋯ + 1 0 b = 1 0 a 9 1 0 b − a + 1 − 1 for some 0 ≤ a < b . Now we claim all integers are suitable for some multiple of theirs being a number like M .
Proof: For some n , suppose n = 2 r 5 s P where g cd ( 1 0 , P ) = 1 . Then,
If r > s , then 5 r − s n K = 1 0 r P K is such a number M where a = r and b is chosen such that 1 0 b − a + 1 ≡ 1 ( m o d P ) . Now this indeed can be done, as g cd ( 1 0 , P ) = 1 , so choose b = a − 1 + ϕ ( P ) (If P is a multiple of 3 , choose b = a − 1 + ϕ ( 9 P ) to account for the 9 in the denominator also). Then K = 9 P 1 0 b − a + 1 − 1 is simply chosen and this suffices.
Cases of r ≤ s are dealt similarly.
So all integers in { 1 , 2 , 3 , ⋯ , 1 0 0 0 } suffice this making the answer 1 0 0 0 .
Note that r , s ≥ 0 .
Problem Loading...
Note Loading...
Set Loading...
Consider the set of numbers {1, 11, 111, 1111, … , 9 1 0 n + 1 − 1 } where the last term has (n+1) '1's. Then by Pigeonhole principle, since there are (n+1) numbers, there exists two of them such that they have the same remainder when divided by n. Finding the difference will give you a multiple of n, and at the same time, the number is in form 111...111000...000. Thus all numbers n have this property and the answer is 1000.