1

Can anyone please explain this example as I tried a lot to understand it but I can't!

The problem:

Show that for every integer n there is a multiple of n that has only 0s and 1s in its decimal expansion.

The Solution of the book:

Let $n$ be a positive integer. Consider the $n + 1$ integers $1, 11,$ $111, ..., 1111, ...$ (where the last integer in this list is the integer with $n + 1$ $\ 1s$ in its decimal expansion). Note that there are $n$ possible remainders when an integer is divided by $n$. Because there are $n + 1$ integers in this list, by the pigeonhole principle there must be two with the same remainder when divided by $n$. The larger of these integers less the smaller one is a multiple of $n$, which has a decimal expansion consisting entirely of $0s$ and $1s$.

This problem from Discrete Mathematics and its application's for Rosen

Bill Dubuque
  • 272,048
  • 2
    What about that solution do you find confusing? Should say, this question has been asked many times on this site, here for instance. – lulu Jul 20 '20 at 20:56
  • 3
    I suggest working an example. Try $n=6$ and consider the $7$ numbers $1,11,111,1111,11111,11111,1111111$. – lulu Jul 20 '20 at 20:57
  • 1
    $5$ is too easy. 10 is the first number that comes to mind.Try $n=7$ and 8 numbers $1, 11, 111, 1111, 11111,111111,1111111$. – markvs Jul 20 '20 at 20:59
  • 6 is the as easy as 3. Since $111$ is divisible by 3, $1110$ is divisible by 6. – markvs Jul 20 '20 at 21:02
  • 1
    @JCAA $6$ is not as easy as $3$ as you never get a remainder of $0$ before you do the subtraction – Henry Jul 20 '20 at 21:10
  • @Henry: I have explained it above. In general, $a$ is as easy as $2a$ or $5a$ or any $2^k5^ma$. – markvs Jul 20 '20 at 21:12
  • You give a question. And then you give an answer. So what is your actual question? – fleablood Jul 20 '20 at 21:27
  • @fleablood my actual question? .. in the first line! I said "Can anyone please explain this example as I tried a lot to understand it but I can't!" – Blue Fire Jul 20 '20 at 21:38
  • 3
    If the book couldn't explain it, why do you think we can? The book makes perfect sense to us. For us to explain it differently we have to understand why you don't understand the book. – fleablood Jul 20 '20 at 21:58
  • 1
    ".. in the first line! I said "Can anyone please explain this example as I tried a lot to understand it but I can't!"" That's not a legitimate question as it does not ask anything specific. You have an explanation. If you do not understand the explanation it is your responsibility to pinpoint what you do not understand about it and ask a specific question for clarification. – fleablood Jul 21 '20 at 00:14

3 Answers3

4

Suppose, say, that $n=3$. Consider the four numbers $1$, $11$, $111$, and $1\,111$. What are the remainders of the division of these numbers by $3$? They are $1$, $2$, $0$, and $1$ respectively. The remainder $1$ appears twice (corresponding to the numbers $1$ and $1\,111$). So, $1\,111-1(=1\,110)$ is a multiple of $3$.

The same idea works with every $n$.

1

I'll go through the books solution for $n=12$. This should convince you in general.

Consider the $13$ numbers $1; 11;111;1111;11111;111111;1111111;11111111;111111111;1111111111;11111111111;111111111111;1111111111111;$

There are thirteeen numbers. They each have a remainder when divided by $12$. There are only twelve such remainders so at least two of them must be the same.

The remainders are:

$1;11;3; 7;11;3;7;11;3;7;11;3;7$.

Many of them are the same. For example $1111$ has remainder $7$. So $1111 = 12k + 7$ for some $k$ (as it turns out $1111= 12*92+7$) and $1111111$ also has remainder $7$. So $1111111 = 12j + 7$ for some $j$ (as it turns out $1111111 = 12*92592 + 7$).

So that means $1110000=11111111 -1111 = (12*j + 7)-(12k +7) = 12j -12k = 12(j-k)$ and is a multiple of $12$.

In this case $1110000 =1111111-1111 = (12*92592 + 7)-(12*92 + 7) = 12(92592-92) = 12(92500)$

Actually we could have done this at the very first repeated remainder.

$11$ and $11111$ both have remainder $11$. $11= 0*12 + 11$ and $11111 = 12*925 + 11$. so $11111-11 = 11100 = (12*925+11) -(0*12+11) = 12(925-0) = 12*925$.

Ans so we can keep adding $0$s and multiply be $10$....

More complicated would be $111111111111$ and $111111111$ both have $7$ as remainders and $111111$ and $111$ have $3$ as remainders. So $111111111111= 12*j+7$ and $111111111=12*k + 7$ and $111111=12*m+3$ and $111=12*n+3$ so

$111111111111-111111111+111111-111 = 111000111000 = (12j+7)-(12k+7)+ (12m+3)-(12n+3) = 12(j-k+m-n)$ and indeed. $\frac {111000111000}{12} = 9250009250$

fleablood
  • 124,253
  • $12$ is the same difficulty as $3$: $111$ is divisible by $3$, so $11100$ is divisible by $12$ (and while we are at it, $111000$ is divisible by $24$). – markvs Jul 20 '20 at 22:51
  • Uh.... so? What does that have to do with anything? – fleablood Jul 21 '20 at 00:09
  • The case of 3 has been considered before. The case of 6 also. What does the case of 12 (or 24 or 48 or 75) add to it, is not clear. I think that this answer is even worse than the accepted answer. Is that "anything"? It depends, – markvs Jul 21 '20 at 00:13
  • The question was, and only was, to explain the books answer. I have done so by working through one example. That is all that was asked, that was all that was all I was claiming to do, ant that is all that was required. I do not know what you think the question was or what you think an answer should be but it seems to be utterly nothing indicated but the actual question posted. – fleablood Jul 21 '20 at 00:17
  • 1
    The thing you wanted to do has been done one hour before you by Jose Carlos Santos and even before that in comments. Your explanation is much worse than his. For example it is much longer and is all over the place, contains lots of extra stuff. "Anything" else? – markvs Jul 21 '20 at 01:56
  • @fleablood You didn't add anything new and your answer is just bad worse representation of the same idea covered in comments and the answer by Jose Carlos Santos – Blue Fire Jul 21 '20 at 10:31
  • Thank you. Could you please explain why for n=3 we have 1,11,111,1111 and for n=4 we have 1,11,111,1111,11111, etc.? I don't really get where in the questions says that? It says for integer $n$, show there is a multiple that has 0s and 1s in its decimal expansion. So I don't know why where those numbers from for $n=3$ for example ($1,11,111,1111$)? – Avv Jun 26 '21 at 17:05
  • 1
    For $n = 3$ we consider the first $n+1 = 4$ numbers: $1, 11,111,1111$ and consider that the remainders mus repeat as we only have $3$ remainders. The remainders are $1, 2, 0$ and then we repeat $1$. For $n = 4$ consider the for $n+1=5$ numbers: $1,11,111,1111,11111$ and consider that the remainders must repeat as we only have $4$ remainders. And the remainders are $1, 3, 3,3,3$ and get that the remainders do repeat. .... – fleablood Jun 26 '21 at 18:08
  • 1
    To get an number that is divisible by $3$ we take two of the numbers that have the same remainder when divided by $3$. Ex. $1111$ has remainder $1$ and $1$ has remainder $1$ and subtract them so $1111 - 1 = 1110$ will have remainder $0$ and $3|1110$. To do the same for $4$ we can take any two with remainder $3$. Say $11111$ and $111$ and $11111-111= 11000$ will have remainder $0$ and $4|11000$. – fleablood Jun 26 '21 at 18:11
  • 1
    Or for the number $29$ if we consider $1, 1_2=11, 1_3=111,1_4 =1111, ...., 1_{30}= \underbrace{111.....1}{30}$. Now we consider the $30$ remainders. $R_1 = 1, R_2=11, R_3= 24$ (the remainder of $111\div 23$ is $24$... $R_4=9$ etc... up to $R{30}$. As there are $30$ such $R_k$ and only $29$ possible remainders two of them $R_k$ and $R_j$ must be equal to each other. (As it turns out $R_1=R_{29}=1$ and $R_2=R_{30}= 11$). The means $I_k - I_j$ will have remainder $R_k-R_j = 0$ and $29|I_k - I_j = \underbrace{111.....1}_{k-i}\underbrace{000....0}_j$. – fleablood Jun 26 '21 at 18:44
  • @fleablood. Fantastic! Thank you very much. – Avv Jun 26 '21 at 22:08
1

Here's a way I used to explain this to myself - Let n be a positive integer. Let's consider n+1 numbers of form 1, 11, 111, 1111, 1111 .... where last integer in this list is an integer with n+1 1s.

By the pigeonhole principle, there must be at least 2 numbers in this list of n+1 numbers that have the same remainder when divided by n.

Let these numbers be a & b.

a = 1...1 = Q.n + r, where Q is some integer and r is some integer < n

b = 1.....1 - Q'.n + r, where Q' is some integer and r is some integer < n (r is common remainder)

b > a

b - a = 111...11...11 - 11..111 = 111...00..000 = n(Q' - Q) + r - r = n.(Q' - Q)

=> b - a is a multiple of n that has only 0s and 1s in it's decimal.

Vyvy-vi
  • 11