Recurring decimal expansion of $\frac17$

The decimal expansion of $\frac17$ seems to have an interesting pattern: $$ \frac{1}{7} = 0.142857142857142857...$$

Take the first two digits of the expansion: $14 = 2^1*7$

Then the next two: $28 = 2^2*7$

The pattern seems to halt abruptly with the next two: $57 \neq 2^2*7$ (since $2^3*7 = 56$)

But when continued further, the pattern established itself once more, although in a slightly different way: $2^4*7 = 112$; the $1$ in the hundreds place appears to have been "carried over".

This leads us to: $$\frac 17 = 0.14 + 0.0028 + 0.000056 + 0.00000112 .....$$

Or more concisely, $$\frac 17 = (\frac{2^1*7}{10^2}) + (\frac{2^2*7}{10^4}) + (\frac{2^3*7}{10^6}) + (\frac{2^4*7}{10^8})....$$

The k-th term of the above geometric progression appears to be $7*(\frac{2}{100})^k.$

This infinite geometric progression $7*\sum_{k=1}^\infty (\frac{2}{100})^k$ evaluates to $\frac17$, which confirms the observation.

Since this expansion was obtained through observation and not through a rigorous proof, it offers no insight as to why such a pattern exists. Any insights regarding this pattern will be appreciated.

Edit: (rephrasing the question to make it more clear) This infinite progression for $\frac17$ stems from a rather unusual pattern involving powers of $2$, and not from the recurring portion of the decimal ($0.142857$). The idea that the fraction $\frac17$ has anything to do with powers of two seems absurd, and I wanted to know if there is a justification for this pattern. Also, is this expansion involving powers of two unique to the fraction $\frac17$, or is there a more general way to apply this to any recurring decimal?


Solution 1:

If I understood correctly, your question is about why certain groups of digits in the decimal expansion of $1/7$ are multiples of $7$, and why they also have a factor of $2^n$.

For a short version: jump to the end of my answer, the following is an explanation which is not as clean as the last paragraph.

You achieved to express $1/7$ as a geometric series

$$7\cdot\sum_{n=1}^{\infty} \left(\frac2{100}\right)^n.$$

The $100$ is not very surprising, as we are talking about digits in the decimal system. So powers of $10$ are always present. What might be puzzling is where the $2$ comes from. The limit of the series is

$$7\cdot\frac{2/100}{1-2/100}=7\cdot\frac2{100-2}=7\cdot\frac2{98}$$

and the reason this perfectly works out to $1/7$ is because $98=\color{red}{2}\cdot7\cdot 7$. The reason why this works so perfectly for $7$ (and not for other numbers $-$ then it would not really be surprising), is that $7^2+1=50$ is exactly $10^{2}/{\color{red}{2}}$ (and this is where $2$ comes into the game).

Let me explain. If we want that groups of digits of $1/p$ such that they are multiples of $p$ itself, we have to express it as a geometric series

$$\sum_{n=1}^{\infty}\left[p\cdot\left(\frac{q}{10^k}\right)^n\right].$$

The $10^k$ is an artifact of the decimal system and makes that our digits are (to some extent) exactly of the form $p\cdot q^n$ (e.g. $7\cdot2^n$ in your case). There are some ways to tweak this system, but let's stick to it for now. Evaluating this series gives

$$p\cdot\frac{q/10^k}{1-q/10^k}=p\cdot\frac{q}{10^k-q}.$$

For this to perfectly be $1/p$, we need $10^k-q=q\cdot p^2$ (check it, everything cancels out). We rearrange this to

$$q=\frac{10^k}{p^2+1}.$$

Here you see why this works for $p=7$. Then it turns out we can choose $k=2$ to get $q=2$. Until now I found no other number for which we have $p^2+1$ in such a nice form. If you allow that the digit groups are of the form $\alpha p\cdot q^n$ with some additional factor $\alpha$, then we are looking for combinations in which $\alpha p^2+1$ divides $10^k$. It is still not easy to find such combinations, but I found one or two nicer ones.


Using my method, I found that

$$\frac1{127}\approx 0.\color{lightgray}{00}\color{red}{7874}\color{lightgray}{0}15748\color{lightgray}{0}\color{red}{31496}\color{lightgray}{0}62992\color{red}{125984}251\, ...$$

which turned out to be generated by

\begin{align} \color{lightgray}{00}\color{red}{7874} &= 127 \cdot 31 \cdot 2^1 \\ \color{lightgray}{0}15748 &= 127 \cdot 31 \cdot 2^2 \\ \color{lightgray}{0}\color{red}{31496} &= 127 \cdot 31 \cdot 2^3 \\ \color{lightgray}{0}62992 &= 127 \cdot 31 \cdot 2^4 \\ \color{red}{125984} &= 127 \cdot 31 \cdot 2^5 \\ \cdots \end{align}

This example uses $q=2$, $k=6$, $p=127$ and $\alpha=31$. The reason for this nice pattern (and the occurence of $\color{red}2^n$) is again that $127^2\cdot31+1=500000=10^6/\color{red}2$.

When you are less restrictive on this kind of occuring pattern, e.g. $p$ needs no longer to be part of the digit sequence of $1/p$, then we can build an even nicer example from the one above:

$$\frac1{127^2}\approx 0.\color{lightgray}{0000}62\color{lightgray}{000}124\color{lightgray}{000}248\color{lightgray}{000}496\color{lightgray}{000}992\color{lightgray}{00}1984\color{lightgray}{00}3968\,...$$

where the black digits are just $31\cdot 2^n$.


Another crazy example is

$$\frac1{17}\approx 0.\color{lightgray}0\color{red}{58823529411764705882352941176470588235294}11764705\, ...$$

which follows the pattern $a(n)=17\cdot 1730103806228373702422145328719723183391\cdot 2^n$. For small values of $n$ we find

\begin{align} a(1)&=\color{lightgray}0\color{red}{58823529411764705882352941176470588235294}\\ a(2)&=117647058823529411764705882352941176470588\\ \cdots \end{align}

as expected. Unfortunately the numbers are so long that I cannot really show you how perfectly it fits. This pattern uses $p=17$, $q=2$, $k=42$ and an enormous $\alpha$ seen above. Once again we observe $17^2\cdot \alpha+1=10^{42}/\color{red}2$.


A more technical observation

Thinking about the problem so much brought me to an even more direct insight.

Let $q$ be a divisor of $10^k$ and $10^k/q-1=a\cdot b$. Then the digit pattern of the decimal representation of $1/a$ contains the sequence $b\cdot q^n$.

Proof.

$$\frac1a=b\cdot\frac1{ab}=b\cdot\frac1{10^k/q-1}=b\cdot\frac{q/10^k}{1-q/10^k}=\sum_{n=1}^{\infty} \left[b\cdot \left(\frac q{10^k}\right)^n\right].\qquad\square$$

This was used above and can be seen in all of the examples, e.g.

$$7\cdot7=\frac{10^2}2-1,\qquad 127^2\cdot 31=\frac{10^6}2-1$$

This shows a nice duality. Because of the symmetry between $a$ and $b$ we also see that $1/31$ contains the pattern $127^2\cdot 2^n$. No such duality can be observed in $1/7$ because this was the one case with $a=b=7$. We also see that the only possible values for $q$ are $2^s5^r$ because these are the only possible divisors of $10^k$.

This final observation allows us to generate an infinitude of examples with nice digit patterns. So I will simply stop here despite the problem really catching my attention. The examples presented above are not so nice in this new light but you can certainly find better ones now.

Solution 2:

Observe the pattern of $\dfrac1{49}=\dfrac2{100-2}$:

$$0.020408163265306122448979591836734693877551020408163265306\cdots$$

As a sum of terms $\dfrac{2^k}{100^k}$, it shows the successive powers of two in digit pairs, which is quickly destroyed by carries.

Now if you multiply by $7$, you will see the last two digits of $7\cdot2^k$, until carries hide them. But as the period is $6$ (which is maximal), only one pair is perturbed.


The phenomenon can be more striking with $\dfrac1{7142857}$,

$$0.00000014000000280000005600000112000002240000044800000896000\cdots$$

due to the fact that $7\cdot7142857=49999999$, so that you find the $8$ first digits of the multiples of $7$ by powers of $2$.

Solution 3:

This is another solution that is much more simple:

Notice that $\frac{1}{7} = 0.142857 \cdots$ Since the series of digits $142857$ repeats every $6$ digits, then we can write $\frac{1}{7}$ as $142857*10^{-6} + 142857*10^{-12} + \cdots + 142857*10^{-6n}$. This can be written as a geometric series, with first term $a=142857*10^{-6}$, and common ratio $r = 10^{-6}$.

Using the geometric series formula $\frac{a}{1-r}$, we get $$\frac{142857*10^{-6}}{1-10^{-6}}.$$

We can multiply both top and bottom by $10^6$ to get $\frac{142857}{999999}$, which cancels out to $\frac{1}{7}$.

(another method is to write something like $10^6x = 142857.142857 \cdots (1)$, and $x = 0.142857 \cdots (2)$, and then subtract $(2)$ from $(1)$, but I think most people know this method already.)

Solution 4:

In my opinion, the long division algorithm for computing the decimal expansion of $1/7$ gives a fairly clear reason why decimal expansions should repeat: at each step there are only finitely many possibilities for what the current remainder can be, so eventually you'll repeat a previous state, so everything you do after that point is identical to what you did the last time you were at that point.

(this is true even for terminating decimals; e.g. recall that $0.5$ is short for $0.5\overline{0}$)