Repetend (period) length of decimal expansion for $\frac{1}{p^k}$

256 Views Asked by At

Denote by $\lambda(a)$ the length of repetend (period) of decimal expansion for fraction $\frac{1}{a}$.

It can be proven, that if $a$ and 10 are coprime, then $\lambda(a)$ is the minimum of $i$ where $10^i - 1$ is a multiple of $a$. From this in particular follows that if a and 10 are coprime, then $\lambda(a)$ is a divisor of Euler's totient function $\varphi(a)$.

I am trying to prove the following statement (mentioned in Wikipedia without proof):

Let $p$ be a prime number different from 2 and 5, and $k$ the maximum of $i$ where $\lambda(p^i)=\lambda(p)$. Then $$ \lambda(p^n)=\begin{cases} \lambda(p),\;\; \text{if} \; 1 \le n \le k \\ p^{n-k}\,\lambda(p),\;\;\text{if} \; n \gt k \end{cases} $$

(In single line: $\lambda(p^n)=p^{max(0,\;n-k)}\,\lambda(p),\; n\ge 1$)

Example: $\frac{1}{3}=0.(3)$, $\frac{1}{9}=0.(1)$, so $\lambda(3)=\lambda(9)=1$. However $\frac{1}{27}=0.(037)$, $\frac{1}{81}=0.(012345679)$. Therefore $k=2$, while $\lambda(27)=3\;(i.e.\; 3^{3-2})$ and $\lambda(81)=9\;(i.e. \;3^{4-2})$


This is what I've come up with:

Lemma. If $p$ is a prime number, different from 2 and 5 and $m \gt n$ then $\lambda(p^m)$ is a multiple of $\lambda(p^n)$.

Proof. Let $x=\lambda(p^m)$ and $y=\lambda(p^n)$. Dividing $x$ by $y$ yields: $x=qy+r$ where $0 \le r \lt y$. Therefore $$ 10^x-1 = 10^r (10^{qy}-1) + (10^r-1) $$

The left-hand side is divisible by $p^m$, hence by $p^n$. The first summand of RHS is divisible by $10^y-1$, therefore also divisible by $p^n$. This suggests that the second summand $10^r-1$ must be divisible by $p^n$. However, if $r\gt 0$, then due to minimality of $y$ and $r \lt y$ it follows that $10^r-1$ is not divisible by $p^n$, therefore $r=0$, so $x$ is a multiiple of $y$.


From the proven lemma it follows that $m \ge n$ implies $\lambda(p^m) \ge \lambda(p^n)$. Therefore if $1 \le n \le k$ then $\lambda(p) \le \lambda(p^n) \le \lambda(p^k) = \lambda(p)$, so $\lambda(p^n) = \lambda(p)$ and case $1 \le n \le k$ is proven.

If $n \gt k$, then, according to the lemma, $\lambda(p^n) = s\;\lambda(p^k) = s\;\lambda(p)$, where $s \gt 1$. Need to prove that $s=p^{n-k}$. Considering the simplest case $n=k+1$, I tried to use $\varphi(p^k)=p^{k-1}(p-1)$, but it led me to nowhere given the presence of $p-1$ which can provide additional factor, coprime with $p$.

1

There are 1 best solutions below

4
On BEST ANSWER

First of all, if $m$ is the period of $10$ modulo $p^{n}$, we have $$ 10^{m} \equiv 1 \pmod{p^{n}}, $$
so that $$ 10^{m} = 1 + t p^{n} $$
for some $t$, and $$ 10^{m p} = (1 + t p^{n})^{p} = 1 + \binom{p}{1} t p^{n} + \dots \equiv 1 \pmod{p^{n+1}}, $$
so that the period of $10$ modulo $p^{n+1}$ is either $m$ or $m p$.

The period is clearly $m p$ when $n = k$.

Now note that $$\tag{it grows} 10^{m} \equiv 1 \pmod{p^{n}}, \qquad 10^{m} \not\equiv 1 \pmod{p^{n+1}}, $$ if and only if $$\tag{cond for $n$} 10^{m} = 1 + t p^{n}, \quad \text{for some $t$ with $p \nmid t$.} $$

Therefore if $10$ has period $m$ modulo $p^{n}$ and period $m p$ modulo $p^{n+1}$ so that (it grows) and (cond for $n$) hold, then \begin{align} 10^{m p} &= (1 + t p^{n})^{p} \\&= 1 + \binom{p}{1} t p^{n} + \binom{p}{2} t^{2} p^{2 n} + \dots \\&= 1 + t p^{n+1} + s p^{n+2} \end{align} for some $s$, so that $$ 10^{m p} = 1 + (t + s p) p^{n+1}, $$ with $p \nmid t + s p$. Therefore (cond for $n+1$) holds, and we go on.