Does the least positive multiple $10^n-1$ of prime $p$ divide $10^{p-1}-1$? Let $p$ be a prime other than $2$ or $5$. Let $n$ be the least positive integer with $10^n\equiv 1\pmod p$. By Fermat's Little Theorem, $n\leq p - 1$.
Does $10^n-1$ divide $10^{p-1}-1$?
I think so. Maybe looking at Euclid's algorithm for the greatest common divisor of $10^n-1$ and $10^{p-1}-1$ would help?
You see, I aim to provide answers the following week to challenges that I pose on my whiteboard. I posed two problems as fun challenges on my whiteboard last week.
The first problem was the special case $p=71$ for which $n=35$ and, behold, $(10^{35}-1)(10^{35}+1)+1 = 10^{70}$. Besides, with patience or a big-number calculator we easily see that the decimal expansion of $1/71$ repeats every $35$ digits.
The second problem was the general case, to state an efficient algorithm to find $n$ as defined above for any prime $p$. I asked because I expected the answer would immediately be clear to me. Oops!

Hint: This follows from the fact that $n$ divides $p-1$.
