3

I have been struggling with this question. It would be great if somebody can really help me out with this question:

Prove that for any prime number $p\ge5$, there exists a $K$ such that $1111\dots11$ (repeated $K$ times) is divisible by $p.$

Anne Bauval
  • 34,650
Denzil
  • 153
  • 2
    http://math.stackexchange.com/questions/83932/proof-that-a-natural-number-multiplied-by-some-integer-results-in-a-number-with/83936#83936 – Chris Eagle Jun 26 '13 at 13:23
  • 3
    Interestingly, the smallest such $K$ is the number of repeating digits when you write out the decimal expansion of $1/P$. For example, when $P=7$, $K=6$, and $1/7=0.\overline{142857}$, while if $P=11$, then obviously $K=2$ and $1/11=0.\overline{09}$. – Thomas Andrews Jun 26 '13 at 13:28

1 Answers1

7

Using Fermat's Little Theorem $$10^{P-1}\equiv1\pmod P\text{ as }(P,10)=1$$

$$\implies P\text{ divides }\underbrace{99\cdots 99}_{P-1\text{ digits}}$$

$$\implies P\text{ divides }\underbrace{11\cdots 11}_{P-1\text{ digits}} \text {as } (P,9)=1$$


Alternatively,

using Pigeonhole Principle, if we consider $\underbrace{11\cdots 11}_{r\text{ digits}}$ where $r$ varies from $1,2,\cdot,P-1,P,P+1$

As $P$ can have at most $P$ remainders, there must be at least two values $r_1,r_2$ where $r_1>r_2$ of $r$ such that the remainders are same.

So, $P$ will divide $\underbrace{11\cdots 11}_{r_1\text{ digits}}-\underbrace{11\cdots 11}_{r_2\text{ digits}}=\underbrace{11\cdots 11}_{(r_2-r_1)\text{ digits}}\underbrace{00\cdots 00}_{r_1\text{ digits}}$

So, $P$ will divide $\underbrace{11\cdots 11}_{(r_2-r_1)\text{ digits}}$ as $(P,10)=1$

$P$ does not need to be prime.

Using Euler's Totient Theorem or Carmichael's Theorem, we can always find $n$ such that $10^n\equiv1\pmod P$ if $(P,10)=1$

Subsequently, integer $$P \text{ divides }\underbrace{11\cdots 11}_{n\text{ digits}} \text { if } (P,9)=1$$