2
$\begingroup$

I would like to know solution of the following one, which I had in my mind from many weeks. Given $p$ with $(10, p) = 1$, the digits $a_k$ in the recurring decimal expansion of $1/p$: This can be written as $1/P = 0.a_1 a_2 \ldots a_N$ (this value is repeatedly repeating) are obtained as follows.

1) Determine the least positive residues $r_k$ of $10^k \pmod p$: $10^k\equiv r_k \pmod p$ for $0 \leq r_k .

2) Take $T = 1$ for $p\equiv 9 \pmod {10}$, $T = 3$ for $p \equiv 3 \pmod {10}$, $T = 7$ for $p\equiv 7 \pmod {10}$ and $T = 9$ for $p \equiv 1 \pmod {10}$.

Thus in all cases $pT\equiv 9 \pmod {10}$ or $pT \equiv -1 \pmod {10}$, Then $Tr_k\equiv a_k \pmod {10}$ for $0\leq a_k\leq 9$. I.e., $a_k$ are the last digits of $Tr_k$. “I would like to participate in a discussion on this problem(s)”


Edit: attempt at a clarification by user7530:

Let $p$ be an integer with $(10,p)=1$. Then $1/p$ is a periodic decimal $1/p = 0.a_1 a_2 \ldots a_N a_1 a_2 \ldots$ with period $N$.

I've observed that the digits $a_k$ satisfy the congruence $a_k \equiv -p^{-1} (10^k \bmod p) \mod 10.$

Is this formula correct? Is there a proof?

  • 1
    There is a grain of a good question here. I'll make an attempt at editing the original post.2011-11-19

1 Answers 1

1

I'm not sure I understand the question, but I note that $10^k/p=a_1a_2\dots a_k.a_{k+1}a_{k+2}\dots$ and if you truncate to an integer and look at that integer modulo 10 you get $a_k$.

  • 0
    Ah! I see it now... your answer implies that $\frac{10^k - (10^k\bmod p)}{p}$ is an integer and is congruent to $a_k$ mod 10, from which follows krrg's formula.2011-11-20