-1

Let $S$ be the set of natural numbers which can be written as a non-empty string of ones followed by a non-empty string of zeroes. For example, $10$, $111100$ and $11100000$ are all in $S$, but $11$ and $1110011$ are not in $S$. Prove that there exists a natural number $n$ in $S$ such that $2018$ divides $n$.

The numbers $\,s \in S\,$ have form $\,s = ((10^k-1)/9)10^n\,$ so $\,9s = (10^k-1)10^n = 10^{k+n}-10^k,\,$ so we need $\,10^{k+n}\equiv 10^k\pmod{2018}.\,$ How can we achieve that?

To all future readers and concerned users:

First of all, no this isn't a contest question. As some have pointed out, that this question is rather simple for a contest. In addition, I don't know of any contests that allow you to access the Internet during it, not to mention the fact they are also written in spans of a few hours.

My solution:

It is similar to that of @Bill but mine is probably not as elegant. I also don't think this solution explicitly uses pigeon hole.

Recognize that 2018 = 2 * 1009 which are also relatively coprime. 1009 is also prime as it is not divisible by any numbers between 1 and its square root.

By FLT (Fermat's Little Theorem) 10^1008 = 1 (mod 1009) -> 10^1008 -1 = 0 (mod 1009)

In addition multiplication does not break congruence so:

10^n(10^1008-1) = 0 (mod 1009) for some n in N.

Now this part is hand-wavy...

Since n is in N we can say the result of 10^n(10^1008-1) is a long string 9's followed by at LEAST ONE zero.

By definition of modulus, we can say 1009 also divides this string of 9's followed by at LEAST ONE zero. Since it ends in zero, it is also divisible by 2. Since 2 and 1009 are coprime, it is also divisible by 2018.

For additional context: This question does not require pigeonhole, the only requirement was to have a decently strong proof.

Note: Sorry I was not clearer earlier this wasn't a contest question. I solved the question a few hours after I posted it and forgot to address some concerns about possible ethical issues.

John
  • 41
  • 5
    Any thoughts? Hint: prove that there a number of the form $111\cdots 1$ that is divisible by $1009$. – lulu Nov 03 '18 at 15:12
  • 9
    Where did this problem come from? The fact that it contains $2018$ suggests it might be a current contest problem. Is it? – lulu Nov 03 '18 at 15:13
  • 1
    Perhaps easier to some, rather than showing there is some number of the form $111\cdots 1$ that is divisible by $1009$., you can show that there are two numbers of different length of the form $111\cdots 1$ where they both have the same remainder modulo 2018 and as a result their difference has a useful property. – JMoravitz Nov 03 '18 at 15:21
  • 4
    @lulu "a current contest problem" This looks like a very standard pigeon-hole principle question that could be within the first five examples introduced for the subject, hardly contest level material. – JMoravitz Nov 03 '18 at 15:25
  • 5
    @JMoravitz The current year reference always suggests "contest" to me. If the OP cared at all, he could easily clarify the source. – lulu Nov 03 '18 at 15:26
  • 1
    @John I added some context to save the question from being deleted (it is a good target for dupes). You are welcome to modify that as need be to reflect what was the actual stumbling block. – Bill Dubuque Jan 02 '20 at 19:31
  • @BillDubuque Thank you! This question is a year old now To all others concerned if this a contest: No this isn't a contest question it was introduced as a set of practice questions for midterm prep for a first year mathematics course. This is very late so it's possible you might not get this – John Feb 10 '20 at 16:45

3 Answers3

2

Hint $\bmod 2018\!:\,\ 10^{k+n}\equiv 10^n\ $ by pigeonhole, $ $ so $\,2018\mid (10^k-1)10^n = \color{#c00}9\cdot 11\cdots 100\cdots 0.\,$ But $\,\gcd(2018,9) = \gcd(2\!+\!0\!+\!1\!+\!8,9)=\gcd(11,9)=1\ $ therefore $\,2018\mid \color{#c00}9m\,\Rightarrow\, 2018\mid m$

Bill Dubuque
  • 285,713
  • The smallest example is $n=1, k=252$, that is $m=11\cdots 10$ with $252$ $1$'s. – lhf Nov 03 '18 at 17:26
  • 5
    It's rather sad that some users downvote answer for non-mathematical reasons (here because someone speculated in the CRUDE chat room that this was a competition problem). – Bill Dubuque Nov 05 '18 at 17:39
  • 3
    IMHO, there are potential reasons other than the 'contest speculation'. As the hold banner says, the question lacks context and effort and answers to such questions are also often downvoted. – user0 Nov 06 '18 at 05:20
1

Every positive integer $M$ may be written as $M =m2^a5^b$ wher $\gcd(m,10) = 1$.

So by Eulers theorem there exist an $n=\phi(m)$ so that $10^n \equiv 1 \pmod m$. So $m|10^n - 1$.

It's well known and easiliy verified that $\frac{10^n -1}9 = \underbrace{111...1}_n$ (just multiply both sides by $9$).

So if $\gcd(m,9) = 1$ then $m|\frac{10^n-1}9=\underbrace{111...1}_n$ And so $M=m2^a5^b|\underbrace{111...1}_n*2^a5^b$ and for $k = \max (a,b)$ then $\underbrace{111...1}_n*2^a5^b|\underbrace{111...1}_n*10^k = \underbrace{111...1}_n\underbrace{000...0}_k$.

And as $2018 = 1009*2$ and $1009$ is relatively prime to $9$. (Actually $1009$ is prime.) We have $2018|\underbrace{111....1}_{\phi(1009) = 1008\text{ times}}0$. (Note: $1008$ might not be the least number of $1$ but it is a sufficient number of $1$. It's possible, extremely likely in fact, that there are $n|1008$ so that $10^n \equiv 1 \pmod {1009}$.)

...

Postscript: If $\gcd(m,9)\ne 1$, we can rewrite $m$ ad $m= m'*3^c$

And $3^c|10000....1000....10000.... 1$ for $3^c$ number of $1$s with $n= \phi(m')$ zeros between then as $m'|11111....1$ the $3^cm'|1000....1000...1*11111111....11=11111111......1111$ and $M|1111.....1000000.....0$.

So this will be true of all numbers.

fleablood
  • 134,278
  • 2
    fyi: apparently some users downvoted our answers (I got 3) because of unfounded speculation in the "CRUDE" chatroom that this was a contest problem. – Bill Dubuque Nov 05 '18 at 18:08
  • Hmmpph... why would anyone assume that... It's a bit to common knowledge to be likely to be a contest problem. – fleablood Nov 05 '18 at 19:33
0

By pigeonhole principle, among the numbers 1, 11, 111, 1111, ... on up to 2019 ones in a row, there must be at least two who share the same remainder modulo 2018.

Their difference then must be a multiple of 2018 and their difference is of the desired form consisting of a nonempty string of ones followed by zeroes.

JMoravitz
  • 81,216