<s>[INST] Sum of digits after the decimal point of the order of $10$ in $(\frac{\Bbb{Z}}{p\Bbb{Z}})^*$ Let $p$ be a prime number and $a$ an integer such that $0<a<p.$ 
If I look at $(\frac{\Bbb{Z}}{p\Bbb{Z}})^*$, and the order of $10.$ 

I discover numerically that if the order of $10$ is even $2n$ then if we look at the list $(q_1,q_2,\cdots,q_{2n})$ the digits after the decimal point of $a/p$ then we have always $q(k)+q(k+N)=9$ for $k=1,\cdots,n.$

Can anyone enlighten me on how to prove this ?
 [/INST] If the order of $10$ modulo $p$ is $r$, then we have
$$\frac{1}{p} = \frac{Q}{10^{r}-1} = \sum_{m = 1}^\infty \frac{Q}{(10^{r})^m},$$
where
$$Q = \sum_{k = 1}^r q_k \cdot 10^{r-k}.$$
If $r$ is even, $r = 2n$, we can write $Q = 10^n\cdot a + b$, where $0 \leqslant a,b < 10^n$, and then
$$\frac{1}{p} = \sum_{m = 1}^\infty \frac{c_m}{(10^n)^m}$$
with $c_m = a$ if $m$ is odd, and $c_m = b$ if $m$ is even. Thus we find
$$10^n\cdot \frac{1}{p} = a + \sum_{m = 1}^\infty \frac{c_{m+1}}{(10^n)^m}$$
and therefore
$$\frac{10^n+1}{p} = a + \sum_{m = 1}^\infty \frac{c_m + c_{m+1}}{(10^n)^m} = a + \sum_{m = 1}^\infty \frac{a+b}{(10^n)^m}.$$
Since $p$ divides $10^{2n} - 1 = (10^n-1)(10^n+1)$ but not $10^n - 1$ (the order of $10$ modulo $p$ is $2n$), it follows that $p$ divides $10^n+1$. It follows that
$$g := \sum_{m = 1}^\infty \frac{a+b}{(10^n)^m} = \frac{a+b}{10^n - 1}$$
is an integer. Since $0 \leqslant a+b \leqslant  2\cdot (10^n-1)$, $g \in \{0,1,2\}$. $g = 0$ would imply $a = b = 0$, hence $Q = 0$ and so $\frac{1}{p} = 0$, which is absurd. $g = 2$ would imply $a = b = 10^n - 1$, hence $Q = 10^{2n}-1$, and thus $\frac{1}{p} = 1$, which is also absurd. It follows that $g = 1$, i.e. $a + b = 10^n - 1$. This is just the assertion $q_k + q_{n+k} = 9$ for $1 \leqslant k \leqslant n$.
</s>