Question -
Example 1.30. Let $p \geq 7$ be a prime. Prove that the number $ \underbrace{11 \ldots 1}_{(p-1) \mathrm{l}^{\prime} \mathrm{s}} $ is divisible by $p$
Proof: We have $ \underbrace{11 \ldots 1}_{p-1^{\prime} \mathrm{s}}=\frac{10^{p-1}-1}{9} $ and the conclusion follows from Fermat's little theorem.
But by FLT we get ${10^{p-1}-1} \equiv 0 \pmod{p}$ how we will get that $\frac{10^{p-1}-1}{9} \equiv 0 \pmod{p}$?
If $ak \equiv 0 \pmod n$ and $\gcd(k,n) =1$ then $a \equiv 0\pmod n$.
Pf: If $\gcd(k,n) =1$ then by Bezouts Lemma there are $x,y$ so that $kx + ny = 1$. So $kx \equiv 1 \pmod n$. So $ak \equiv 0 \pmod n$ then $akx \equiv 0x\pmod n$ but $akx\equiv a(kx) \equiv a\pmod n$.
.....
So $p$ is prime and $p \ge 7$ so $\gcd(p,9) = 1$.
And $9|10^{p-1} -1$. And $10^{p-1} \equiv 1 \pmod p$. So......
$10^{p-1}-1= 9*\underbrace{111...1}\equiv 0 \pmod p$.
So $\underbrace{111...1}\equiv 0 \pmod p$.
======
Alternatively.
$9|10^p-1 = 9999999....9$ and $p|10^p-1$. So the least common multiple of $9$ and $p$ will also divide $10^9-1$.
The least common multiple of $9$ and $p$ is $9p$ as $\gcd(p,9) =1$.
So $9p|10^p-1$ and so $p|\frac {10^p - 1}9$.