# Thread: Prove prime p divides infinitely many members of 1, 11, 111, 1111...

1. ## Prove prime p divides infinitely many members of 1, 11, 111, 1111...

Prove that if p is prime and p > 5, then infinitely many members of the sequence 1, 11, 111, 1111, ... are divisible by p.

I think I can do most of it. Since p > 5, I used Fermat's little theorem to show 10^(p-1) - 1 ≡ 0 mod p. Then 99...99 ≡ 0 mod p (p-1 nines), which means 11...11 ≡ 0 mod p (p-1 ones) since p > 5 so gcd(p,9) = 1.

That shows one member of the sequence is divisible by p, but how do I go from here to show there are infinitely many?

2. I think the rest is indeed easy. Let m = 11...11 (p-1 ones). Suppose n = 11...11 ≡ 0 (mod p). Then 10^(p-1) * n + m ≡ 0 (mod p).

3. Originally Posted by uberbandgeek6
Prove that if p is prime and p > 5, then infinitely many members of the sequence 1, 11, 111, 1111, ... are divisible by p.

I think I can do most of it. Since p > 5, I used Fermat's little theorem to show 10^(p-1) - 1 ≡ 0 mod p. Then 99...99 ≡ 0 mod p (p-1 nines), which means 11...11 ≡ 0 mod p (p-1 ones) since p > 5 so gcd(p,9) = 1.

That shows one member of the sequence is divisible by p, but how do I go from here to show there are infinitely many?
You actually did most of it...

Note that the numbers $\displaystyle 9, 99, 999, ...$ are exactly the numbers of the form $\displaystyle 10^k-1$, where $\displaystyle k$ is a positive integer.
As you've pointed out the $\displaystyle (p-1)th$ member in the sequence is divisible by $\displaystyle p$.

But what about any $\displaystyle k$th member, where $\displaystyle k$ is a multiple of $\displaystyle p-1$?

We see that $\displaystyle 10^k\equiv1\pmod p$ since $\displaystyle p-1$ divides $\displaystyle k$ and so $\displaystyle 10^k-1\equiv0\pmod p$. Lastly, since $\displaystyle (9,p)=1$ we may divide by $\displaystyle 9$ to get $\displaystyle (10^k-1)/9\equiv0\pmod p$.

It works for every prime $\displaystyle p$ not equal to $\displaystyle 2$ or $\displaystyle 5$.

,

,

,

,

# 111 1111 11111 prime

Click on a term to search for related topics.