What is the shortest proof to show $\underbrace{{111\cdots}1}_{{\small{p-1} \ 1's}}$ is divisible by $p$
Show $\underbrace{{111\cdots}1}_{{\small{p-1} \ 1's}}$ is divisible by $p$
5
$\begingroup$
elementary-number-theory
-
0Try looking up Fermats little Theorem – 2012-03-24
-
3As noted in comments to KV Raman's answer, this is false for $p=2,3,5$. (But true for all other $p$.) – 2012-03-24
-
3In base $b,$ this will be false for any primes that divide either $b$ or $b-1.$ – 2012-03-24
-
0When I looked back my notes, I missed the point $p \geq 7$, and it is all my fault. – 2012-03-25
1 Answers
9
$$\underbrace{{111\cdots}1}_{{\small{p-1} \ 1's}} = \frac{10^{p-\small{1}}-1}{9} \equiv 0 \pmod{p}$$
because by Fermats little theorem, since gcd$(10,p)=1, 10^{p-1} \equiv 1 \pmod{p}$
NOTE: Assuming $p > 5$. The result is not true for $p=2, 3$ or $5$. In all the excitement to show, I missed important point.
For $p=2$ obviously $1$ is not divisible by $2$ - does not hold, and $p=3$, $11$ is not divisible by $3$ and finally for $p=5$ gcd$(5,10)=2$ and therefore not true as well ($1111$ is not divisible by $5$).
-
1For completeness, consider the cases p=2,5 as well. (gcd(10, p) is not 1 in these cases) – 2012-03-24
-
0How is $\gcd(10, p) = 1$? Are you assuming either $p \neq 2, 5$ or $p \ge 11$? – 2012-03-24
-
0Ops. Posted same comment as Jan Grozny. – 2012-03-24
-
2Also, the whole thing is false for $p=3$ due to that division by $9$. – 2012-03-24
-
0@alex.jordan good catch – 2012-03-24
-
0Thanks everyone for catching the ignorance so quickly. – 2012-03-24