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!
 A: Hint: This follows from the fact that $n$ divides $p-1$.
A: Yes, $\,{\rm mod}\,\ p\!:\,\, $ if $\, {\rm ord}_p(10) = n\,$ then $\, 10^k\equiv 1\iff n\mid k.\,$ 
Here is one way to prove this. First, notice that $\color{#c00}{10^n\equiv 1\equiv 10^k}\Rightarrow 10^{(n,k)}\!\equiv1\,$ since by Bezout's gcd identity $\,(n,k) = ni+kj\ $ so $\,10^{(n,k)}\! = 10^{\,ni+kj}\! = (\color{#c00}{10^n})^i (\color{#c00}{10^k})^j \equiv \color{#c00}1^i \color{#c00}1^j \equiv 1.$ 
Hence if $\,n\nmid k\,$ then $\,(n,k) < n\,$ and $\,10^{(n,k)}\!\equiv 1,\,$ contra minimality of $\,n := {\rm ord}_p(10).\ \, $ QED
The key idea of the proof: $ $ the set $\,S\,$ of naturals $\,k> 0\,$ such that $10^k\equiv 1\,$ are closed under $\,\rm gcd,\,$ therefore its least element $\,n\,$ must divide every element $\,k\in S\ $ (else their gcd $\,(n,k)\,$ would, by hypothesis,  be an element of $\,S,\,$ but smaller than the least element $\,n).$
A: Hint:  $(a^n-1) \mid (a^{mn}-1)$  for $1<a,m,n \in \mathbb{Z}.$
A: Suppose $n$ is the least positive integer so that $10^n\equiv1\pmod{p}$. Let
$$
p-1=qn+r
$$
where $0\le r\lt n$. Since $(p,10)=1$, $10$ is invertible mod $p$ and therefore,
$$
10^r\equiv10^{p-1-qn}\equiv1\pmod{p}
$$
Since $n$ is the least positive integer so that $10^n\equiv1\pmod{p}$, and $r\lt n$, we must have that $r=0$; that is, $p-1=qn$. Thus,
$$
10^n-1\mid10^{p-1}-1
$$
Since $10^{p-1}-1=10^{qn}-1=(10^n-1)(1+10^n+10^{2n}+\dots+10^{(q-1)n})$

For the general question, we know that $n\mid p-1$, and computing $10^n$ mod $p$ is fairly easy using the Right to Left Binary Method illustrated in this answer so an educated brute force attack should not be too difficult.
