# 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?

• Oct 4, 2017 at 9:20
• In the end you gave a rigorous proof, so it is not completely clear to me what you are asking for. A question on why something is in mathetmatics is always settled with a proof like yours. Oct 4, 2017 at 9:27
• @Art Your proof goes as follows: Assume the pattern that $0.14 + 0.0028 + 0.000056 + \cdots$ equals $\frac{1}{7}$. Since by the geometric series formula it converges to $\frac{1}{7}$, then the assumption is true. The 'missing step' is to show that a decimal expansion can be represented by only one decimal representation. Oct 4, 2017 at 9:29
• Going by the answers below, It would seem that it's pretty unclear what this question is really about. What exactly are you asking? Are you asking why a rational number may be represented as a geometric series? Are you asking why $\frac17$ has a geometric series of ratio $2/100$? Are you asking something else? Oct 4, 2017 at 9:31
• @Arthur Yes, it's about why the expansion has the ratio (2/100). Is it possible to express any given recurring decimal as an infinite geometric progression without going through the steps that I used? Is there a definite relation between the ratio (2/100) and the fraction 1/7?
– Art
Oct 4, 2017 at 9:40

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.

• This explains it well! Thank you! :)
– Art
Oct 4, 2017 at 11:34
• Am I understanding this right, that $p=3,k=1 \implies q=1$ and $p=2,k=1 \implies q=2$ are also solutions for $$q=\frac{10^k}{p^2+1}.$$ Oct 4, 2017 at 13:31
• @Burnsba Yes. But the digits of $\alpha q^n$ are interlacing, so they cannot be seen as seperate. It is good to have a big $k$ (compared to $\log_{10} q$ and $\log_{10}\alpha$) so that the distance between the sequence elements $\alpha q^n$ is big too and they can be considered as separate as in e.g. $1/127^2$. But you see its works for $1/3=0.333333...$ as $q=1$. Oct 4, 2017 at 13:35

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$.

• This seems to explain it! Thank you! :)
– Art
Oct 4, 2017 at 10:02
• @Art: I just modified my second example. You will be struck.
– user65203
Oct 4, 2017 at 10:04
• So, what about other rational numbers, like $\frac1{13} = 0.076923076923\ldots$, which can be realised as a geometric series as $0.07\cdot \sum_{n = 0}^\infty\left(\frac 9{100}\right)^n$? Is there a way to find $\frac9{100}$ from $13$ without writing out the decimal expansion and guessing? What is the pattern here? Oct 4, 2017 at 10:14
• @Arthur: $13\cdot7=91=100-9$, then $1/91\to13$ times powers of $9$. It's all about factorizations of $10^n-k$ where $k$ is a small integer.
– user65203
Oct 4, 2017 at 10:27
• After some fiddling, I've also found that $\frac 17 = 0.1 + 0.03 + 0.009 + 0.0027 +\cdots$, which is yet another geometric series representation with ratio $0.3$. I think I figured it out, sort of. Oct 4, 2017 at 10:32

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.)

• Of all the questions the OP did not ask, why did you decide to answer this one?
– user436658
Oct 4, 2017 at 9:24
• I was just giving an alternative solution, since the OP's proof is correct. Oct 4, 2017 at 9:25
• Well I realized that it could be expressed this way too, but what I haven't understood is why the pattern takes that particular form. It amazes me that a fraction can be expressed as an infinite geometric progression, and I want to understand how and why it takes the form of a progression with a common ratio 2/100. The numbers 7, 2 and 100 are seemingly unrelated, yet they're somehow all a part of this expansion.
– Art
Oct 4, 2017 at 9:29
• @Art This comment should be included into the question itself. At the moment noone seems to know how to answer your question in a way you would accept it. This is valuable information. Maybe you even ask if this is an artifact for $7$ or if it generalizes to other numbers. Oct 4, 2017 at 9:36
• @M.Winter I have edited the question now
– Art
Oct 4, 2017 at 9:58

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}$)

• As far as I understand, OP is not asking why it repeats. Oct 4, 2017 at 9:27
• @M.Winter: Last paragraph from the OP: 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.
– user14972
Oct 4, 2017 at 9:28
• Yes. He asks for the pattern, but I see no hint that he is puzzled about the property that it repeats. More like why certain digit groups are of the form $7\cdot 2^n$. Its like answering a question on the distribution of the primes with a proof that there are infinitely many. Oct 4, 2017 at 9:30