### Communities

tag:snake search within a tag
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
created:<1w created < 1 week ago
post_type:xxxx type of post
Q&A

Parent

# Why does the decimal expansion of $1/(10n - 1)$ have this neat pattern?

+15
−0

I was playing around with the reciprocals of some positive integers and found these interesting patterns:

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

Now, this repeating decimal can also be obtained by "concatenating" the powers of $2$ successively to the left as follows:

\begin{align} 1& \\ 21& \\ 421& \\ 8421& \\ {\color{red}{1}}68421 \\ {\color{red}{3}}{\color{green}{3}}68421 \\ \vdots\quad & \end{align} Notice that here I think of the red $\color{red}{1}$ of $16$ and $\color{red}{3}$ of $32$ as being "carried over", so the units digit of $32$ and the tens digit of $16$ add to give me the green $\color{green}{3}$. The sequence gets increasingly complicated as more terms are concatenated in this manner, but it definitely looks like it's converging to $\dotsc 052631578947368421$, where the ellipsis indicates that the pattern repeats forever towards the left. This is a bit surprising because (informally) this would mean that if I perform this pattern infinitely far out to the right of the decimal point, then I get the decimal expansion of $1/19$.

How can I go about making this idea precise?

Some more data for this pattern: \begin{align} \vdots\quad & \\ {\color{red}{3}}{\color{green}{3}}68421 \\ {\color{red}{6}}{\color{green}{7}}368421 \\ {\color{red}{1}}{\color{green}{34}}7368421 \\ {\color{red}{2}}{\color{green}{69}}47368421 \\ {\color{red}{5}}{\color{green}{38}}947368421 \\ {\color{red}{10}}{\color{green}{77}}8947368421 \\ \vdots\quad & \end{align}

In this pattern, one can see that at each stage one new digit from the required sequence is correctly added, despite all the carrying-over.

I have also observed this to be the case for the decimal expansion of $1/29$: $$\frac{1}{29} = 0.\overline{0344827586206896551724137931}$$ In this case, we concatenate the powers of $3$ in a similar fashion.

Is there any significance to the fact that $19 = {\color{red}{2}}*10 - 1$ and $29 = {\color{red}{3}}*10 - 1$ to the use of powers of $2$ and $3$, respectively, in these computations?

I also checked for $1/39$, and though the repeating part of its decimal expansion is not as impressively long as for the other two cases, the pattern still holds up: $$\frac{1}{39} = 0.\overline{025641}$$ and concatenating the powers of $4$ indeed gives $\dotsc 025641$.

The last case I checked was $1/49$, and it also obeys this pattern: $$\frac{1}{49} = 0.\overline{020408163265306122448979591836734693877551}$$ and concatenating the powers of $5$ gives us this very repeating set of digits.

Of course, the pattern for $1/49$ makes it obvious that there is a concatenation that works in the forward direction: namely, the powers of $2$ concatenated in bunches of two digits. But this just means that $$\frac{1}{49} = \frac{2}{100} + \frac{2^2}{100^2} + \frac{2^3}{100^3} + \dotsb$$ which is true by the formula for the sum of an infinite geometric series. So, "forward concatenating" patterns can be explained in this manner, but I'm stumped regarding how to explain the "backward concatenating" ones.

If anyone can throw some light on this, it would be greatly appreciated!

Why does this post require moderator attention?
Why should this post be closed?

Post
+8
−1

First of all, there is indeed a pattern.

To figure out why, there's an easier example than what you've found: $$0.\bar{1} = \frac{1}{9}.$$

How does that work? $1$ is the only power of $1$: $1^n = 1$.

Now, how do we prove this? if $x = 0.\bar{1}$, then $10x = 1.\bar{1}$ and so, $9x=1$.

Hidden in that proof lies the answer for the other cases - you have some repeating number and in order to show what fraction that repeating number is equal to, here $1/\left(10n-1\right)$, you multiply it by $10n$ and subtract the number (again, I'll just call it $x$).

To take your example of $1/19$, we have that the fraction is $x = 0.\overline{052631578947368421}$, so we multiply by $20$ to get $20x = 1.\overline{052631578947368421}$, subtract $x$ and $19x = 1$. Crucially, the number left on the RHS after subtracting is exactly $1$, as everything after the decimal point cancels. It must do this, because the fraction is some integer divided by some other integer. That is, if $x=n/m$, then $mx=n$.

As we're in a decimal system, multiplying by $10$ is shifting one digit to the left. So, in doing this multiplication by $10n$, you're shifting the digit to the left, then multiplying by $n$, which is exactly the procedure outlined in the question.

Now, each particular digit (after this multiplication procedure) must cancel with the digit to the left so at this point, they must be equal and we have the exact behaviour outlined in your question.

To explain this generally and in more detail (taking $x<1$ wlog.) I'll use a fraction $$x = \frac{m}{10n-1}.$$

When written in decimal format, this is $x = 0.x_1x_2\ldots x_k\ldots$, with $x_{k+r}=x_k$ for some $r$, where each $x_k$ is a single digit (i.e. an integer in the range $0-9$ as we're in a decimal basis).

Now, we know that $\left(10n-1\right)x = m$, or $10nx - x = m$. However, m is an integer, so all the digits after the decimal point (the 'fractional part', in other words) are $0$.

This means that the digits in the fractional part of $10nx - x$ must also be $0$.

So, we look at the digits $x_r$ and $x_1\ldots x_{r-1}$.

The fractional part of $10nx -$ the fractional part of $x$ equals $0$, or the fractional part of $10nx$ equals the fractional part of $x$. For this to be the case, all the digits must be equal.

So, we take the digit $x_r$. To calculate $x_{r-1}$, we use the properties of the fractional parts being equal and multiplication by 10 as shifting the digit to the left to give that the fractional part of $10n\left(0.x_1\ldots x_r\right) - 0.x_1\ldots x_r = 0.0\ldots x_r$ (where the $0$s after the point are repeated $r-1$ times).

This is exactly what's written in the question, just in a different way: $nx_r \mod 10 = x_{r-1}$. Or, the digit to the left of $x_{r-1}$ is $nx_r$, with change. Accounting for this change gives that $x_{r-j} = n^jx_r$, which is where the powers of $n$ come from, the change being what needs to be added to digits further to the left.

To explain what I mean by phrases such as "Accounting for this change", let's take the initial stream of digits again and write them out more explicitly, where the number in brackets to the right of each line represents the number of times the 0 is repeated after the decimal point:

Now, we apply this procedure of multiplying by $10n$. It is a requirement that, because the fractional part of $x$ must equal the fractional part of $10nx$, $10nx-m=x$, that is

\begin{align*}10nx - m &= 0.0\ldots x_k \qquad(k-1)\\ &+ 0.0\ldots x_{k-1} \qquad(k-2)\\ &+ 0.0\ldots x_{k-2} \qquad(k-3) + \ldots\end{align*}

Taking this line by line (where the term in brackets on the LHS has $j-1$ $0$s after the decimal point and the superscripts denote that this series arises from the $j^{th}$ term in the similar expansion of $x$) gives that

We can add this to the next term in the expansion of $x$ to get that (unfortunately at this point, notation gets very confusing but the first term on the left hand side has $j-1$ $0$s and the second, $j-2$) \begin{align*}10n\left(0.0\ldots x_j + 0.0\ldots x_{j-1}\right) &= 0.0\ldots x_{k-1}^{(j)} \qquad(k-2)\\ &+ 0.0\ldots x_{k-2}^{(j)} \qquad(k-3)\\ &+ 0.0\ldots x_{k-2}^{(j-1)} \qquad(k-3)\\ &+ 0.0\ldots x_{k-3}^{(j)} \qquad(k-4)\\ &+ 0.0\ldots x_{k-3}^{(j-1)} \qquad(k-4) + \ldots\end{align*}

Now, having done this, the $k^{th}$ term is exactly $$\sum_{j>k}0.0\ldots x_k^{(j)} \qquad(k-1),$$

which is the sum over $10n\times$ all the digits to the right of the $k^{th}$ digit, where you're only summing the resulting $k^{th}$ digit.

However, you can recursively apply this to get that the $k^{th}$ digit is the sum over $\left(10n\right)^p\times$ all the digits, $p$ positions to the right of the $k^{th}$ digit, where you're only summing the resulting $k^{th}$ digit.

This is precisely what's done in the question, although written in a different way and shows that the behaviour arises because the terms are required to be sums of powers of $10n$ of previous terms because this is a fraction with a denominator of $10n-1$.

Why does this post require moderator attention?

Quintec‭ wrote over 3 years ago

I'm confused how this answers the question of the pattern of digits. You only use the fact that x = 1/19 in your answer and don't explain what the significance of the powers of n is. (Or maybe my reading comprehension skills are poor...)

The Amplitwist‭ wrote over 3 years ago

Thank you for your answer! I hope you won't mind if I say that I somehow feel this answer doesn't go all the way towards explaining why this "backwards concatenation" process appears. Specifically, I do understand that if $x = 0.\overline{x_1 x_2 x_3 \dotso x_r}$, then $x$ is a rational number equal to some $n/m$ that can be found as you outlined. However, why does this method of specifically concatenating the powers of $n$ work when considering $1/(10n - 1)$?

The Amplitwist‭ wrote over 3 years ago · edited over 3 years ago

Secondly, though I say this "works", how do I adequately make sense of that? After all, the string that I get by my method of concatenation strictly speaking gives an "infinite number" such as $\dotsc 052631578947368421$. So perhaps, my claim is something like $$\frac{1}{10n-1} = \lim_{k \to \infty} \frac{(10n)^0 + (10n)^1 + (10n)^2 + \dotsb + (10n)^k}{10^k}\ ?$$ I'm not sure... But I do think there's a bit more to be said from where you leave off in your post :)

Mithrandir24601‭ wrote over 3 years ago

I've updated my answer (although honestly, I feel that the first bit is about 100 times clearer). I've included the bit about the powers of $n$ and what you're referring to as 'backwards concatenation' is what I'm referring to as 'multiplying a digit by $n$ to get the digit to the left'. It works because the '-1' is the bit that causes the fractional part to cancel, hence be equal

The Amplitwist‭ wrote over 3 years ago

But, $x_{r-j}$ is not equal to $n^j x_r$! (I presume you meant modulo $10$?) For instance, for the decimal expansion of $1/19$, $x_{r-5} = 3$ but $2^5 x_r = 32 \neq 3 \pmod{10}$. In fact, they are not equal precisely because of the carrying-over happening in the concatenation process. I'm sorry, but I'm still not satisfied that your answer fully explains this phenomenon.

Mithrandir24601‭ wrote over 3 years ago

"with change ... the change being what needs to be added to digits further to the left." Is this carrying over process. What more do you want me to say? All you're doing is multiplying a digit by n and shifting it to the left one place. Repeat, summing everything up, this is precisely what's going on in the question... there are only so many ways of writing 'multiply by 10n'...

Mithrandir24601‭ wrote over 3 years ago

I'd added an additional (yet more convoluted) edit that should explain in more detail what's going on but honestly, 'it's required because $10nx - x$ is an integer' is by far the best answer because this whole 'left concatenation' process follows immediately and directly from that. Call it a geometric series if you like but that's just another term for you 'left concatenation' process, just more formally written. All I've said is similarly different ways of describing exactly the same thing

Skipping 1 deleted comment.