Hi I have been working on this problem and I don't understand my textbook's solution to this problem.

Here is my textbook's solution to the problem: 

We have 1001 = 7\*11\*13 and the condition of the problem says 7\*11\*13\*k = 10^j - 10^i = (10^i)(10^(j-I) - 1). This implies 10^j-i = 1 (mod 1001) (and also (mod 7)). Since phi(7) = 6, by Euler's totient theorem, j-I = 0 (mod 6). If j-I = 6 we have 94 possibilities for j-I: 6-0, 7-1, ..., 99-93. If j-I = 12 we have 94-6 = 88 possibilities for j-I: 12-0, 13-1, ... , 99-87. The last case is j-I = 96 where we have 4 possibilities: 96-0, 97-1, 98-2, and 99-3. In total we have 94+88+82+...+10+4 = 16 \* (98/2) = 784 possibilities.

I don't get how (10^i)(10^(j-I) - 1) implies 10^(j-I) = 1 (mod 1001) and (mod 7), or why my textbook used the totient function on 7, instead of 1001. I also don't quite understand their method for finding the different possibilities for j-I.
['https://math.stackexchange.com/questions/1890332', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/360993/']
You have $7 \cdot 11 \cdot 13 \cdot k$ is a multiple of $1001$. You know $10^I$ is not a multiple of $1001$, so the other factor $10^{j-I}-1$ must be a multiple of $1001$ and hence of all its factors. The rest of the proof is incorrect but results in the correct answer. Euler's totient theorem says that $a^{\phi(n)} \equiv 1 \pmod n$ for $a$ coprime to $n$. As $7$ is prime, $\phi(7)=6$, so if $j-I$ is a multiple of $6, 10^{j-I}\equiv 1 \pmod 7$ What they say is $10^{j-I}\equiv 1 \pmod 7$ proves that $j-I$ must be a multiple of $6$. The book is reading the implication in the wrong direction. We can see the problem by looking at another factor of $1001,$ which is $11$. The book argument would also claim that we must have $j-I$ a multiple of $10$, but in fact working $\bmod 11$ only tells us that $j-I$ is even, which we knew already. We know that $10^6 \equiv 3^6 \equiv 1 \pmod 7$ but nothing in the argument shows that no lower power of $10$ is also $\equiv 1 \pmod 7$. That is what happens for $11$ and $13$, so all cases where $6|(j-I)$ result in $10^j-10^I$ being a multiple of $1001$
"I don't get how $(10^i)(10^{(j-I)} - 1)$ implies $10^{(j-I)} = 1 (\mod 1001)$

$1001k = 10^j - 10^i \iff 10^j - 10^i \equiv 0 \mod 1001$

So $10^{i}(10^{j-i}-1) \equiv 0 \mod 1001$.

$\gcd(10^i, 1001) = \gcd(2^i\*5^i, 7\*11\*13) = 1$.

So $10^{i}(10^{j-i}-1) \equiv 0 \mod 1001 \iff 10^{j-i} - 1 \equiv 1001 \iff 10^{j-i} \equiv 1 \mod 1001$

so $10^{j-1} - 1001k = 1$ so $10^{j-i} - 7(11\*13\*k) = 1$

so $10^{j-i} \equiv 1 \mod 7$.

" and (mod 7), or why my textbook used the totient function on 7, instead of 1001"$

Because it's easier. $\phi(7) =6$ and $\phi(1001) = 720$. $6$ is an easier number to work with

" I also don't quite understand their method for finding the different possibilities for j-I. "

By Fermat's Little Theorem $10^{\phi(7) = 6} \equiv 1 \mod 7$. So if $10^{j-1} = 1 \mod 7$ then $j - i$ must be a multiple of $6$ (i.e. $j-i \equiv 0 \mod 6$).

As $0 \le i < j \le 99$ then $1 \le j-i \le 99$. So $j-1 = 6;12;18;24;....;96$.

If $j-i = 6$ then $i = j - 6$ as $1 \le j \le 99$ then $0 = 6-6 \le i \le 99 -6 = 93$. That is 94 = 100 - 6 possibilities.

If $j-i = 12 = 6\*2$ then $i = j - 12$ and $0 \le i \le 99 -12 = 87$. That is $88 = 100 - 12 = 100 - 2\*6$ possibilities.

If $j-i = 6\*k$ then $i = j - 6k$ and $0 \le i \le 99 - 6k$. That is $99 - 6k + 1 = 100 - 6k$ possibilities.

Add these possibilities up: (100 - 6) + (100 - 12) + ...... + (100 - 96)

That is $\sum\_{k=1}^16 (100 - 6k) = \sum\_{k=1}^16 100 - \sum\_{k=1}^16 6k = 16\*100 -6 \sum\_{k=1}^16 k = 1600 - 6\*\frac{16\*(16+1)}2$.

=====

Actually though. I think your text is wrong.

Although $1001|10^j - 10^i \implies 10^{j-i} \equiv 1 \mod 7$ (and also $1 \mod 11$ and $1 \mod 13$).

$ \implies j - i \equiv 0 \mod 6$ (and also $0 \mod 10$ and $0 \mod 12$).

It doesn't follow that $j-i \equiv 0 \mod 6 \implies 1001|10^j - 10^i$ (nor do $0 \mod 10$ or $0 \mod 12$ imply $1001|10^j - 10^i$).

As it turns out $j - i \equiv 0 \mod 6$ does actually imply $10^{j-1} - 1 = 999...9$ a multiple of six nines. = $999\*1001\*(1000001000001.......000001)$.

But that was a coincidence that 1001 = $10^3 + 1$ and $3|6$. 

It wouldn't follow $j-i \equiv 0 \mod 10$ implies $1001|10^j - 10^i$ as $10^{10} -1 = 9999999999 = 9\*11\*101010101= 9\*11\*101\* 10001= 9\*11\*101\*73\*137$ .

So the proof is invalid. 

====

Can anyone double check my reasoning?