# Is there a general pattern behind the decimal expansion of $\frac{1}{7}$ being $.14+.0028+.000056+.00000112+…=.\overline{142857}$?

I wondered if all decimal expansions of $\frac{1}{n}$ could be thought of in such a way, but clearly for $n=6$,

$$.12+.0024+.000048+.00000096+.0000000192+...\neq.1\bar{6}$$

Why does it work for 7 but not 6? Is there only one such number per base, i.e. 7 in base 10? If so what is the general formula?

## 5 Answers

You're trying to extend your observation that $$.14+.0028+.000056+.00000112+\dots = \frac17 = \frac7{49}$$ in two directions, that don't match. The right identities are: $$.12 + 0.0024 + 0.000048 + \dots = \frac{6}{49}$$ and $$.16 + 0.0064 + 0.000256 + \dots = \frac{1}{6}.$$

These three numbers are solutions to the equations \begin{align} x &= .14 + \frac{2x}{100} && \implies x = \frac1{7} \\ x &= .12 + \frac{2x}{100} && \implies x = \frac6{49} \\ x &= .16 + \frac{4x}{100} && \implies x = \frac1{6} \end{align} respectively. (Note that to double the number and also shift it two places to the right corresponds to multiplying it by $\dfrac{2}{10^2}$.)

A generalization that covers all of them is this

Fact: Suppose you write down some starting number $s$ (like $0.14$ or $0.12$ or $0.16$ in the examples above), then successively multiply it by some ratio $r<1$ (like $\frac{2}{100} or \frac{2}{100} or \frac{4}{100}$ in the examples above) and add. Then the resulting number is the solution to $$x = s + rx,$$ namely $x = \dfrac{s}{1-r}$.

[If you care about the proof, it's straightforward: your definition of $x$ is that $x = s + sr + sr^2 + \dots$, which is equal to $\dfrac{s}{1-r}$ using geometric series, which is what the equation also gives.]

This fact lets you do two things.

One, you can write down absolutely any expression you like (of the "multiply-it-by-r-and repeat" type), and find the simple fraction it's equal to: for example, if you write down $0.2 + 0.06 + 0.018 + 0.0054 + \dots$ (each term is the previous term tripled and shifted one place to the right, i.e. multplication by $r = \frac{3}{10}$), then you can immediately say that the number is $\displaystyle \frac{0.2}{1-\frac{3}{10}} = \frac{2}{10 - 3} = \frac27$.

Two (more usefully), for many fractions, you can calculate their digits without actual division. Given a fraction $a/b$, just find a multiple of $b$ that is close to a power of $10$, say $10^d = mb + n$. Then $$\frac{a}{b} = \frac{ma}{10^d - n} = \frac{ma/10^d}{1 - n/10^d},$$ so you can calculate $a/b$ by writing down $ma/10^d$, then at each step multiplying the latest term by $n$, shifting it $d$ places to the right, and adding. For instance, given the fraction $\frac{7}{12}$, note that $12 \times 8 = 100 - 4$, so you can start with $7 \times 8/100 = 0.56$, and each time multiply by $4/100$ and add: $$\frac{7}{12} = 0.56 + 0.0224 + 0.000896 + 0.00003584 + \dots$$ (note that $896 = 4 \times 224$, etc.) [Actually this turns out to be the very simple $0.583333\dots$, so for this particular example direct division may have been better.]

You asked about other bases. In base $b$, corresponding to the base $10$ example $$.14+.0028+.000056+.00000112+\dots$$ if you take the number $$x = s + s(2/b^2) + s(2/b^2)^2\dots, \quad (\text{ where } s = 2n/b^2)$$ then $x = \dfrac{2n/b^2}{1-2/b^2} = \dfrac{2n}{b^2 - 2} = \dfrac{n}{b^2/2 - 1}.$

If you want $x = 1/n$, then $n^2 = b^2/2 - 1$. So you'll have a solution $n$ only for bases $b$ where $b^2 = 2n^2 + 2$ for some $n$, not for all bases. In fact the set of such $(n, b)$ can be got from solving a Pell-type equation $n^2 - 2(b/2)^2 = -1$: the solutions are given by, if $(1 + \sqrt{2})^k = a_k + b_k\sqrt{2}$ where $k$ is odd, then $n = a_k$, $b = 2b_k$. So, in particular, the first few solutions are

$$k=1 (n=1, b=2): 1/1 = 0.1_2 + 0.01_2 + 0.001_2 + \dots = 0.11111_2$$ (the way $0.\overline{9} = 1$), $$k=3 (n=7, b=10): 1/7 = 0.14 + 0.0028 + 0.000056 + \dots = 0.142857\dots$$ $$k=5 (n=41, b=58): 1/41 =$$ well, I can't decide on symbols to use in base $58$, but you get the idea. There are no other solutions in between. So in some sense $7$ and $10$ are special, in that the next smallest base is as large as $58$.

However, if you don't constrain yourself to the numbers $s = 2n/b^2$ (as in the starting number being $.14$ for $n=7, b = 10$) and $r = 2/b^2$, then there are many solutions in base $10$ as explained above, or indeed in any base. For example, in base $5$, we have $$\frac{1}{11} = \frac{11}{5^3 - 4} = \frac{21_5/5^3}{1 - 4/5^3} = 0.021_5 + 0.000134_5 + 0.000001201_5 + \dots$$ (note that in base $5$, we have $21_5 \times 4 = 134_5$ and $134_5 \times 4 = 1201_5$ etc.)

The expansion in your title formula is effectively $\displaystyle \sum_1^\infty 7 \times \left(\frac{2}{100}\right)^n = 7 \times \frac {1}{49} = \frac {1}{7}$

Simpler similar ones might be $\displaystyle \sum_1^\infty 2 \times \left(\frac{2}{10}\right)^n = 2 \times \frac {1}{4} = \frac {1}{2}$, i.e. $0.4 + 0.08 +0.016 + \cdots = 0.5$ or $\displaystyle \sum_1^\infty 3 \times \left(\frac{1}{10}\right)^n = 3 \times \frac {1}{9} = \frac {1}{3}$, i.e. $0.3 + 0.03 +0.003 + \cdots = 0.333\ldots$ or $\displaystyle \sum_1^\infty 1 \times \left(\frac{5}{10}\right)^n = 1 \times \frac {1}{1} = 1$, i.e $0.5 + 0.25 +0.125 + \cdots = 1$.

To get $\frac {1}{6}$, a possibility, though not so pretty, is $\displaystyle \sum_1^\infty 4 \times \left(\frac{4}{100}\right)^n$ i.e. $0.16 + 0.0064 + 0.000256 + \cdots = 0.1666\ldots$.

One approach to getting $\frac {1}{k}$ is to look for a multiple of $k$ (say $mk$) which is one less than a number whose prime factors are $2$ or $5$. Then $mk+1$ will divide some power of $10$ (say $10^h =g (mk+1)$). You will then be able to write $\displaystyle \sum_1^\infty m \times \left(\dfrac{g}{10^h}\right)^n = m \times \frac {1}{mk} = \frac {1}{k}$. In your original example $k=7, m=7, g=2, h=2$, but apart from having $k=m$ as in my next three examples, there is nothing particularly special about it.

• Indeed, for example $1/19 = 0.05 + 0.0025 + 0.000625 + ...$ (with $g=5$, $h=2$, $m=1$, $k=19$). – ShreevatsaR Feb 1 '14 at 23:29
• Also, we don't need the geometric series expression explicitly, though it may be implicit: the numbers $.14+.0028+.000056+.00000112+\dots$ and $0.16 + 0.0064 + 0.000256 + \dots$ and $0.05+0.0025+0.000625+\dots$ can be computed directly from their expressions, as solutions to $x = 0.14 + 2x/100$ and $x=0.16 + 4x/100$ and $x = 0.05 + 5x/100$ respectively (etc). – ShreevatsaR Feb 1 '14 at 23:54

Do you know about geometric series? Your series is really $$7(0.02 + 0.0004 + \cdots) = 7 \frac{2/100}{1 - 2/100} = 7 \cdot \frac{1}{49}$$ When you replace $7$ by something else, say $n$, your series is similarly $n \frac{2/100}{1 - 2/100} = \frac{n}{49}$.

In particular, only when $n = 7$ would that be equal to $\frac{1}{n}$.

Your expansion comes from the fact that you can write: $$\frac{1}{7}=\frac{7}{50}\sum_{k=0}^\infty 50^{-k}=0.14(1+2\cdot0.01+4\cdot0.0001+\ldots)$$ You can check the equality by using the standard result that for $|q|<1$ you have $\sum_{k=0}^\infty q^k=\frac{1}{1-k}$.

It doesn't work for $6$ because if you wanted a structurally similar sum, you'd have: $$\frac{1}{6}=\frac{49}{6\cdot50}\sum_{k=0}^\infty 50^{-k}$$ and the fraction on the left does not have a finite decimal expansion.

Please rectify me as I could not find following expression explicitly

$$\frac17=\frac{14}{98}=\frac{14}{100\left(1-\frac2{100}\right)}=\frac{14}{100}\left(1-0.02\right)^{-1}$$

$$=0.14[1+0.02+(0.02)^2+(0.02)^3+\cdots]$$