12

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$?

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
ematth7
  • 729
  • It is $10^{16}\equiv1\pmod{17}$, and not $10^{15}$. Or you could do long division. – Empy2 Nov 06 '15 at 06:08
  • But $10^16\equiv{1} (mod 17)$ is equal to 100000000000000000 – ematth7 Nov 06 '15 at 06:11
  • 1/17=has a periodic decimal occurrence of 0.0588235294117647… = a leading factor of $10^{-n}5882352941176470588$ times $(10^{-16}+(10^{-16})^2+…)$ with the limit of $1/(1-10^{-16})=10^{16}/(10^{16}-1)$ It follows that 58823529411764717 gives us the 16 nines. – Mikael Jensen Nov 06 '15 at 16:52

4 Answers4

28

$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}$

cr001
  • 12,778
some one
  • 407
  • 1/17=has a periodic decimal occurrence of 0.0588235294117647… = a leading factor of $10^{-n}5882352941176470588$ times $(10^{-16}+(10^{-16})^2+…)$ with the limit of $1/(1-10^{-16})=10^{16}/(10^{16}-1)$ It follows that 58823529411764717 gives us the 16 nines. – Mikael Jensen Nov 06 '15 at 16:49
  • It is also necessary that $\gcd(9, 17) = 1$, otherwise the denominator term wouldn't be trivial. – DanielV Nov 07 '15 at 14:49
26

Do you know that $a^{p-1}-1$ is always divisible by $p$ when $p$ is prime and $a$ is not divisible by $p$? It's a famous result. Take $a=10$ and $p=17$ to get $9999999999999999$. And dividing out $9$ won't change divisibility by $17$.

$11111111$ is just too easy to outright factor. It's clearly divisible by $11$, which is prime ($11\cdot01010101$). And also by $101$ which is prime ($101\cdot00110011$). After dividing these two prime factors, you have $$11111111=11\cdot101\cdot10001$$ For the remaining factor of $10001$, note that it is $100^2+1$. That's not helpful for factoring. But move on to calculate it is $101^2-200$. Still not helpful. $102^2-403$. $103^2-608$. $104^2-815$. $105^2-1024$. Aha. So it's $105^2-32^2=(105-32)(105+32)=73\cdot137$. So you have $$11111111=11\cdot73\cdot101\cdot137$$

2'5 9'2
  • 56,991
  • 7
    I've never seen this method of factoring. (the "aha" part). Do you keep repeating the process until the 2nd term is a perfect square? – Tony Ennis Nov 06 '15 at 11:54
  • @TonyEnnis There is no guarantee that part will work. From one perspective, it's going to be just as slow in general as checking primes starting with $2,3,\ldots$. This is sort of like checking for prime divisors starting from the middle instead of from the bottom. Here though, given where the number comes from, my hunch was that any remaining prime divisors would be large. And since we had $100^2+1$, it was easy to know where to start this process. Still, I would stress, there is no guarantee this would pay off. Maybe $10001$ would turn out prime. – 2'5 9'2 Nov 06 '15 at 16:44
  • @TonyEnnis The idea here is also used by the Quadratic Sieve factoring algorithm for factoring large numbers. – 2'5 9'2 Nov 06 '15 at 16:46
  • Oh, and I never answered your question exactly. Yes, if the number is factorable in the first place as $m\cdot n$, with $m>n$ both odd, then it is a difference of perfect squares. It's $\left(\frac{m+n}{2}\right)^2-\left(\frac{m-n}{2}\right)^2$. – 2'5 9'2 Nov 06 '15 at 16:50
0

Let $1111111111111111 \equiv k \pmod {17}$.

Then $9999999999999999 \equiv 9k\pmod {17}$

And $10000000000000000 =10^{16} \equiv 9k + 1\pmod {17}$.

ANd but Fermat's little theorem:

$9k + 1 \equiv 10^{16} \equiv 1 \pmod{17}$

so $9k \equiv 0 \pmod 17$.

Not $2\cdot 9 = 18 \equiv 1 \pmod {19}$ so $9^{-1} \equiv 2 \pmod {17}$ and we may do:

So $2\cdot 9k \equiv 2\cdot 0 \pmod {17}$

$k \equiv 0 \pmod 7$.

So $1111111111111111 \equiv 0 \pmod {17}$ and we are done. $17$ divides $1111111111111111$

Meanwhile if $11111111\equiv m \pmod{17}$ then

$99999999 \equiv 9m\pmod {17}$

$10^8 \equiv 9m + 1 \pmod {17}$.

And be successive squaring $10^2 \equiv 100=6*17-2\equiv -2 \pmod {17}$. $10^4\equiv (-2)^2\equiv 4\pmod{17}$ and $10^8 \equiv 4^2 =16\equiv -1 \pmod {17}$.

SO $9m + 1 \equiv -1\pmod{17}$

$9m \equiv -2 \pmod {17}$

$m\equiv 2\cdot 9m \equiv -2\cdot 2 \equiv -4 \equiv 13 \pmod {17}$.

And we are done $17$ does not divide $11111111$ and, indeed, we will have a remainder of $13$ if we attempt to.

$11111098= 653594\times 17$ and $11111111=653594\times 17 + 13$.

fleablood
  • 130,341
  • ARRRGH! ZOMBIE POST! ZOMBIE THREAD!.... Well, it's four days after halloween and I live is a zombie country with a zombie political system and a zombie populace that shouldn't be too surprising..... – fleablood Nov 04 '20 at 18:13
-2

$$ 1111111111111111 = \sum_0^{15} 10^ i $$

Since 17 is prime, the 16 values $10^0$, $10^1$, ..., $10^{15}$ are distinct and non-zero mod 17. (Otherwise we have $10^m = 17k$ for some integers $k$, $0\leq m < 17$ in which 17 is a factor of the RHS but not of the LHS.)

Thus

$$ 1111111111111111 = \sum_0^{15} 10^i $$

$$ = 1 + 2 + 3 + ... + 16 \mod 17 $$

$$ = (1 + 16) + (2 + 15) + ... + (8 + 9) \mod 17 $$

$$ = 8 \times 17 \mod 17 $$

$$ = 0 \mod 17 $$

james_d
  • 157
  • your first conclusion doesn't follow from the premise. For example, 2^0 = 2^3 = 1 modulo 7. – kevin cline Nov 06 '15 at 19:55
  • It's true that 10^0..10^15 are all distinct modulo 17, but it's not true for every value modulo 17. – kevin cline Nov 06 '15 at 20:03
  • Yup, you're right: my proof of that is not right. So why are those distinct? – james_d Nov 06 '15 at 20:11
  • It seems that 10 is a primitive root of 17. "Primitive roots" are all those numbers from 1 to p-1 where you get p-1 (here: 16) distinct powers. Every prime number has a primitive root - actually, it has many. In the case of p = 17, if x is a primitive root then x^2 is not because (x^2)^8 = 1 (modulo p). – gnasher729 Nov 06 '15 at 23:33
  • @gnasher729: for all primes (except 2), x^2 is not a primitive root. – kevin cline Nov 11 '15 at 17:58