Write a proof that for every positive integer n, there exist i and j with 1 ≤ i < j ≤ n + 1, such that n is a divisor(must be a factor of) of $66 . . . 6$(j digits) $ - 66 . . . 6 $(i digits).
I tried to use the php to based on the fact that there are n+1 ways to pick an integer for i and j each and there are n-1 remainders possible. After that I am stuck and do not know how to proceed? Any help and/or solutions?
Let's clean up Laska's comment.
Consider the $n+1$ integers $6, 66, 666, \ldots, \underbrace{66\ldots 6}_{n+1 \text{ digits}}$. There are $n+1$ of these numbers. There are $n$ possible residues $\pmod n: 0, 1, 2, \ldots, n-1$. Therefore, by the pigeonhole principle two distinct integers within our collection, with $1 \leq i \lt j \leq n+1$ digits, respectively, must have the same residue. Their difference is therefore divisible by $n$.