Relation between prime roots and residues mod 7 in the prime root chapter from my book it was mentioned that the powers of the primitive root mod 7 equals the residues if you are calculating $\frac{1}{7}$.
It is easy to see that $3$ is a primitive root mod $7$ with
$$ 3^1 \equiv 3, 3^2 \equiv 2, 3^3 \equiv 6, 3^4\equiv 4, 3^5 \equiv 5, 3^6\equiv 1$$
So you get the sequence $3,2,6,4,5,1$.
Now let's calculate $1/7$ by hand. You get $10=1\cdot7+3, 30=4\cdot7+2, 20=2\cdot7+6 , \ldots.$
So the residues you get while calculating $1/7=\overline{142857}$ are identical to the powers of the primitive root $3$. If you calculate $2/7, 3/7, \ldots$, it just shift the sequence, but the pattern stays the same.
But this is not true for the other primitive root mod $7$ (namly $5$) and it is not true for any other primes but 7 i tested, like $5, 11,$ or $13$.
Now I really wonder, is this just a coincidence? And if not, what makes the number $7$ so special? Are there other numbers with a similar phenomenon?

It does work for the other primitive root $5$, provided you work in base $12$ instead of $10$. The sequence of powers is
$$5, 4, 6, 2, 3, 1$$.
Now calculate $1/7$ in base $12$:
$$12 = 1\cdot7 + 5,\quad 5\cdot12 = 60 = 8\cdot 7 + 4,\quad 4\cdot12 = 48 = 6\cdot 7 + 6, \ldots$$
The sequence $5, 4, 6, \ldots$ turns up again. In general, if $r$ is a primitive root mod $p$, try calculating $1/p$ in base $p + r$.
