Recurring Decimal Expansion

270 Views Asked by At

For any natural number $n>1$, we write the infinite decimal expansion of $\frac 1n$ (for example, $\frac 14$ is written as $0.24999$... instead of $0.25$). We need to determine the length of the non-periodic part of the infinite decimal expansion of $\frac 1n$.

I tried many methods, a somewhat promising one was to assume $\frac 1n$ to be some $0.abbbbb$..., where ‘$a$’ denotes the non-recurring part which has $r$ digits including zero, while ‘$b$’ is the recurring part. But I get stuck at deciding the lower and upper bounds for $r$. Please help.

(Please note: this is my first post on this website. So if I have to improve the way I should post the question in, please let me know how to correct the errors in my post. Thanks.)

1

There are 1 best solutions below

1
On BEST ANSWER

Lemma:

For every number $n\in N$ that is not divisible by 2 and 5, there exists $k\in N$ such that $n\mid10^k-1$

Proof: Suppose that the statement is not true, i.e. $10^k-1\not\equiv0 \pmod n$ for all values of $k$. There are infinitely many values of $k$ and just $n-1$ possible values ($1\dots n-1$) for $10^k-1\pmod n$. So by pidgeon hole principle there are two different values $k_1, k_2$ such that:

$$10^{k_1}-1\equiv10^{k_2}-1\pmod n,\quad (k_1>k_2)$$

This simply means that:

$$10^{k_1}-10^{k_2}\equiv0\pmod n$$

$$10^{k_2}(10^{k1-k2}-1)\equiv0\pmod n$$

Number $n$ has no factors 2 and 5 so obviously $n\nmid 10^{k_2}$ which implies that $n\mid(10^{k_1-k_2}-1)$ or:

$$n\mid10^k-1$$

...where $k=k_1-k_2$.

End of lemma proof.

Part 1:

Let us now show that:

For every number $n$ such that $2\nmid n$ and $5\nmid n$, decimal representation of $1/n$ has no pre-periodic part. In other words, $1/n$ can be written as: $$\frac 1n=0.aaa\dots=0.\bar{a}\tag{1}$$

...where $a$ stands for a group of repeating digits (possibly starting with zero) of length $l_a$. For example for $n=7$: $1/7=0.\overline{142857}$, so $a=142857$ and $l_a=6$.

One can easily show that (1) can be rewritten in the following way:

$${\frac1n}=\frac{a}{10^{l_a}-1}$$

$$a=\frac{10^{l_a}-1}{n}$$

According to our lemma, it's guaranted that there exists $l_a$ such that $n\mid 10^{l_a}-1$ so it's is possible to find $a$ for every $n$ such that $1/n=0.\bar{a}$, without a pre-periodic part.

Part 2

If $2\mid n$ or $5\mid n$, decimal representation of $1/n$ has a pre-periodic part: $$\frac1n=0.b\overline {a}\tag{2}$$

...with the lenght of pre-periodic group of digits $b$ equal to $l_b$ and length of periodic group of digits $a$ equal to $l_a$.

Suppose the pposite, that there is some number $n$ divisible by either 2 or 5 such that:

$$\frac1n=0.\bar{a}=\frac{a}{10^{l_a}-1}$$

$$na=10^{l_a}-1$$

...which is impossible because the LHS is divisible by 2 or 5 and the RHS is clearly not.

Based on part 1 and 2 we now know that:

Decimal representation of $1/n$ has pre-periodic part if and only if $2\mid n$ or $5\mid n$.

Part 3

For a number $n$ of the form $n=2^p5^qm$ and $2,5\nmid m$ the length of pre-periodic part is exactly $\max(p,q)$.

It can be easily proved that any number of the form $0.b\bar{a}$ can be written as:

$$0.b\bar{a}=\frac{b}{10^{l_b}}+\frac{a}{10^{l_b}(10^{l_a}-1)}\tag{3}$$

Because $m$ is not divisible by 2 or 5, we can write $1/m$ as:

$$\frac1m=\frac{a}{10^{l_a}-1}$$

which means that:

$$\frac1n=\frac1{2^p5^q} \cdot \frac1m$$

If we introduce:

$$r=\max(p,q)$$

we get:

$$\frac1n=\frac{2^{r-p}5^{r-q}}{10^r} \cdot \frac1m=\frac{2^{r-p}5^{r-q}a}{10^r(10^{l_a}-1)}\tag{4}$$

Now look at (4) carefully.

Case 1:

$$2^{r-p}5^{r-q}a<10^{l_a}-1$$

By comparing (3) and (4), the length of pre-periodic part is $r$, and the pre-periodic part is made of zeroes $b=0$. Periodic part is equal to $2^{r-p}5^{r-q}a$ and the length of the periodic part is $l_a$.

Case 2:

$$2^{r-p}5^{r-q}a>10^{l_a}-1$$

In that case you can write:

$$2^{r-p}5^{r-q}a=s(10^{l_a}-1)+a_1$$

...and (4) becomes:

$$\frac1n=\frac{s(10^{l_a}-1)+a_1}{10^r(10^{l_a}-1)}=\frac{s}{10^r}+\frac{a_1}{10^r(10^{l_a}-1)}$$

By comparing the last expression with (4), the length of the pre-periodic part $s$ is again $r$ and the length of repeating sequence $a_1$ is again $l_a$.

Conclusion

  1. The length of the periodic part in the decimal representation of $1/n$ is determined by the length of periodic part in $1/m$ with $m$ being the greatest divisor of $n$ such that $2\nmid m$ and $5\nmid m$.
  2. Pre-periodic part exists only if $n$ is of the form $2^p5^qm$.
  3. The length of the pre-periodic part is $\max(p,q)$

Interesting example

$$\frac{1}{19}=0.\overline{052631578947368421}$$

Periodic part has 18 digits. Now take a look at:

$$\frac{1}{760}=\frac{1}{2^3\cdot5\cdot19}=0.001\overline{315789473684210526}$$

Pre-periodic part has length 3 (because the biggest power of 2 or 5 in $n=760$ is 3). And the periodic part has length 18, same length as in $1/19$.