22

Prove that every positive integer divides a number such as $70, 700, 7770, 77000$, whose decimal representation consists of one or more $7$’s followed by one or more $0$’s.
Hint:$7$; $77$; $777$; $7777$

I know that I am supposed to use the pigeonhole principle, but I can't figure out how. I know that it probably comes down to proving that all odd numbers divide some number of the form $7, 77, 777$, etc.

Bill Dubuque
  • 282,220

2 Answers2

56

Consider the set of numbers $7 \times \sum_{i=0}^{M} 10^i$ for $M=0, \cdots N$ (That is the set of numbers, of length $1$ to $N+1$, all of whose digits are $7$). There are $N+1$ elements. Now consider them modulo $N$ . By the pigeon hole principle, there must be two that are congruent, subtract these and they will be divisible by $N$.

Edit: Let $a_{M} = 7 \times \sum_{i=0}^{M} 10^i$ (The $M+1$ digit number consisiting of only $7$'s) and $a_{M} \equiv b_{M} \pmod {N}$. There are only $N$ possible values for the $b$'s, so by the PHP there exist two $M$ values that are equal, say $p$ and $q$ (with $p>q$). We have $ a_{p} \equiv a_q \pmod {N}$. "Subtract these" and we have
\begin{eqnarray*} a_{p} - a_q = \underbrace{7 \cdots 7 }_{p-q \text{ 7's}} \underbrace{0 \cdots 0 }_{q+1 \text{ 0's}} \equiv 0 \pmod {N}. \end{eqnarray*}

  • 1
    I know a different, much more complicated, proof. But this one is simply amazing! – yo' Oct 09 '17 at 06:42
  • Can you please elaborate on "subtract these"--from what? "they will be divisible by N"--who are they? To be completely honest, I don't really understand the question, because, obviously, as stated it doesn't make sense, since not every positive integer divides 70, let alone every number of that shape. I hoped to maybe understand it from the answer given, but it's not very helpful either :) – wvxvw Oct 09 '17 at 07:03
  • @wvxvw the two numbers from that set that are congruent mod N, subtract the smaller from the larger. The result will be a number of the requisite form (the smaller will cancel some of the 7s from the tail end of the larger, leaving 0s), which is a multiple of N (if a = b (mod N), then a - b = 0 (mod N)). The goal is to prove that every integer divides some number of the form, not all of them. So here we produce, on demand, a number which is a multiple of any given integer. – hobbs Oct 09 '17 at 07:28
  • 1
    @hobbs Thanks for adding that explanation. I have added an edit that essentially says the same thing. wvxvw: please read hobbs comment & my edit (Do not hesitate if your require further clarification). – Donald Splutterwit Oct 09 '17 at 07:33
  • OK, thanks, I understand now! – wvxvw Oct 09 '17 at 10:30
  • 1
    @wvxvw Note that not every odd number divides a number of the form 777... . 5, 15, 25, ... are all counterexamples. – saulspatz Oct 09 '17 at 13:06
  • Indeed 7 is a holy numbet. – Mikasa Oct 09 '17 at 13:57
  • @ResidentDementor - nothing special about 7 here. You could replace it with any other digit except 0 and the same thing would be true. All numbers not divisible by 2 or 5 will divide 111...1 for some appropriate number of ones. Adding 0's allows divisibility by $2^a5^b$ factors as well. – Paul Sinclair Oct 09 '17 at 16:39
8

Take some integer $n$. Consider the numbers $$x_i= \underbrace{77...77}_i \text{ mod } n\qquad\text{for $i\in\Bbb N$}$$

The pidgeonhole principle tells you that there are $x_i=x_j$ with $i> j$. Then we have $(x_i-x_j)\equiv 0 \pmod n$ (i.e. $n$ divides $x_i-x_j$), as well as

$$x_i-x_j = \underbrace{77...77}_{i-j}\overbrace{00...00}^{j}.$$

M. Winter
  • 30,828