[Math] Prove that 17 divides 1111111111111111 (16 1’s) and doesn’t divide 11111111

divisibilityelementary-number-theoryrepunit-numbers

I need to prove that $17$ divides $\underbrace{1111111111111111}_{\text{16 1's}}$ and doesn't divide $\underbrace{11111111}_{\text{8 1's}}$ by using congruence.

I know that $\underbrace{1111111111111111}_{\text{16 1's}}= \frac{10^{16}-1}{9}$ and that $10^{15}\equiv{1}\pmod {17}$. But how do I use these two facts to figure out if $17$ divides $1111111111111111$?

Best Answer

$1111111111111111=10^{15} + ... + 1 = \large{(10^{16} -1)\over9}$

$10^2 \equiv -2\pmod {17}$

$10^{16} - 1 = (-2)^8 - 1 = 256 -1 \equiv 1 -1 = 0\pmod {17}$

$11111111= \large{(10^8 -1 )\over9} $

$10^2 \equiv -2\pmod {17}$

$10^8 - 1 \equiv (-2)^4 - 1 = 15 \pmod {17}$

Related Question