prove that there are infinitely many numbers of the form $x = 111....1$ such that $31\mid x$ I need to prove that there are infinitely many numbers  of the form $x = 111....1$ such that $31\mid x$
what I tried - I wrote x as 
$\sum_0^{n-1} 10^i$
I know that $(10,31) = 1 $
now I'm stuck .. any help will be appreciated
 A: $$\underbrace{11\cdots11}_{n\text{ digits}}=\dfrac{10^n-1}9$$
Using Fermat's Little Theorem, $$10^{31-1}\equiv1\pmod{31}\iff31\mid(10^{30}-1)$$
Now, $(10-1)\mid(10^m-1)$ for integer $m\ge0$
As $(3,31)=1$ $$31\mid\dfrac{10^{30}-1}9$$
Finally, $10^r-1$ will be divisible by $10^{30}-1$ if $30\mid r$
A: Hint $\ $ By a simple Pigeonhole argument, if $\rm\:n\:$ is coprime to $10\,$ then every integer with at least $\rm\:n\:$ digits all $\ne 0$  has a contiguous digit subsequence that forms an integer $\ne 0\,$ divisible by $\rm\:n.\:$ 
A: To answer the more general question, this result holds for any $N$ coprime to 10, not just $N=31$:
Proof 1: Let $N$ be any positive integer. Then by there exist an infinite-cardinality set $S$ of positive integers s.t. for all $n_1,n_2 \in S$; $n_2 > n_1$; the following holds:
$$ \underbrace{11\cdots11}_{n_1 {\text{ digits}}} \equiv_N \underbrace{11\cdots11}_{n_2 {\text{ digits}}}.$$
[Make sure you see why.] Thus subtracting the left from the right in the above gives
$$ 10^{n_2-n_1}\underbrace{11\cdots11}_{n_2-n_1 {\text{ digits}}} \equiv_N 0,$$
for each such $n_1,n_2 \in S$. If $N$ is coprime to 10, this gives 
$$ \underbrace{11\cdots11}_{n_2-n_1 {\text{ digits}}} \equiv_N 0,$$
for each such $n_1,n_2 \in S$, which yields the desired result. [So the line of reasoning Bill Dubuque was getting at just written out a bit more]
Proof 2: Let $N$ be any positive integer coprime to 10. Then $9N$ is also coprime to 10. Thus there exists an infinite series of integers $n$ satisfying
$$10^n \equiv_{9N} 1.$$
[Indeed $n$ any integral multiple of $|\left(\mathbb{Z}/9N\mathbb{Z}\right)^{\times}|$ will do.]  This gives 
$$10^n -1 \equiv_{9N} 0,$$
for each such $n$ i.e., $9N|(10^n-1)$, which gives
$$N|\frac{10^n-1}{9}$$
for each such $n$. Can you finish from here. [So lab's answer as above w the generalization to include the case where $3|N$]
