I need to prove that there are infinitely many numbers of the form $x = 111....1$ such that $31|x$

what i tried - I wrote x as

$\sum_0^{n-1} 10^i$

i know that $(10,31) = 1 $

now im stuck .. any help will be aprriciated


$$\underbrace{11\cdots11}_{n\text{ digits}}=\dfrac{10^n-1}9$$

Using Fermat's Little Theorem, $$10^{31-1}\equiv1\pmod{31}\iff31|(10^{30}-1)$$

Now, $(10-1)|(10^m-1)$ for integer $m\ge0$

As $(3,31)=1$ $$31|\dfrac{10^{30}-1}9$$

Finally, $10^r-1$ will be divisible by $10^{30}-1$ if $30|r$


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.\:$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.