# Can a decimal that is infinitely repeating in one base be nonrepeating in another?

For instance, can a number like $$0.1111111\cdots$$ in base $$3$$ be represented as $$0.23515613\cdots$$ (non-repeating) in base $$8$$? I imagine the answer would be a resounding NO but it would be interesting to see a proof of why.

• $\frac{1}{10}$ is $0.1$ in base $10$ but $0.000110011 \dots$ in base $2$.
– kipf
Commented Feb 25 at 1:12
• @kipf both of your examples are repeating, if a terminating decimal is regarded as having trailing 0's Commented Feb 25 at 1:20
• An irrational will be non-repeating in any base, while any rational will repeat in any base. Long division will show you why. Commented Feb 25 at 1:23
• The proof is: if $n=p/q$, then after at most q divisions, every possible remainder of must be exhausted, after which the cycle repeats (or it already is repeating). Only an infinite denominator could not repeat (which is impossible). Commented Feb 25 at 1:31
• This is a somewhat obvious comment, but an irrational number can be non-repeating if you are working in non-standard positional number systems. That is to say, the golden ratio, an irrational number, is ‘1’ in base phi (i.e. where the radix is the golden ratio). Commented Feb 25 at 18:53

No.

Let $$x=0.\overline{a_{1}a_{2}\dots a_{n}}$$ in base $$b$$.

We show $$x$$ must be rational: First, $$b^{n}x=a_{1}a_{2}\dots a_{n}.\overline{a_{1}a_{2}\dots a_{n}}$$. So, $$a_{1}a_{2}\dots a_{n}=b^{n}x-x=x\left(b^{n}-1\right)$$ or $$x=\frac{a_{1}a_{2}\dots a_{n}}{b^{n}-1}$$. (Since $$x$$ is the ratio of two integers, $$x$$ is rational.)

Next, since $$x$$ is rational, $$x$$ must be repeating in any base $$c$$: For a proof sketch, see e.g. this or this.

(Those proof sketches are done for base $$10$$ but the same basic idea applies in any other base. The basic idea is that when we're doing the long division, the remainder at each step is in $$\{0,1,2,\dots,c-1\}$$ and so must eventually repeat.)

The repeating is a consequence of being a rational number and this is independent of the base chosen. We can calculate this number using the same general idea which is to multiply it by some power of the base to align the repeating part, subtract them, then form a ratio of integers.

To see this we consider a general repeating pattern in base $$b$$ given by $$x=0.p_1p_2\cdots p_mr_1r_2r_3\cdots r_nr_1r_2r_3\cdots$$ so that we have two block of digits, the prefix $$p_1p_2\dots p_m$$ and the repeating part $$r_1r_2r_3\cdots r_nr_1r_2r_3\cdots$$ and we'll multiply by suitable powers of $$b$$ to line up the strings. Now we multiply by $$b^m$$ and $$b^{m+n}$$ to get $$b^mx=p_1p_2\cdots p_m.r_1r_2r_3\cdots r_nr_1r_2r_3\cdots \\b^{m+n}x=p_1p_2\cdots p_mr_1r_2r_3\cdots r_n. r_1r_2r_3\cdots$$

so we now subtract to get $$(b^{m+n}-b^{m})x= p_1p_2\dots p_mr_1r_2r_3\dots r_n - p_1p_2\dots p_m$$

And we see the right hand side is an integer, call it $$k$$ so that $$x=\frac k{b^{m+n}-b^m}$$

and now we can see that it is rational as it's the ratio of two integers. Since this was done in an arbitrary base we see that rational numbers repeat regardless of which base we use. This allows us to characterize irrational numbers as those with an infinite non-repeating fractional part.

• You also need the converse (any rational number is repeating in any base). Commented Feb 25 at 2:46

A decimal that is infinitely repeating in one base is either finite or infinitely repeating in another base. This is because for any base $$b$$, a number is rational if and only if the decimal is finite or infinitely repeating. The sufficiency part that every finite or infinitely repeating decimal is rational is because we have $$\frac1{(b-1)_b}=(0.111\cdots)_b$$ $$\frac1{((b-1),(b-1))_b}=(0.010101\cdots)_b$$ etc., where $$(\cdots x_2x_1x_0.y_1y_2y_3\cdots)_b$$ denotes the number $$\cdots+x_2\cdot b^2+x_1\cdot b+x_0+y_1\cdot\frac1b+y_2\cdot\frac1{b^2}+y_3\cdot\frac1{b^3}+\cdots$$ (The left side should be finite, of course.) [Edit: in particular, $$((b-1),(b-1))_b=(b-1)b-(b-1)=b^2-1$$. I have added a comma between the two $$b-1$$ for this to be less confusing.] This can be verified by vertical division in base $$b$$. Hence every finite or infinitely repeating decimal is a finite sum of fractions of the form above, and thus a rational number.

Conversely, For any two integer $$m,n$$ with $$0, we may try vertical division for $$m$$ divided by $$n$$. In each step we find the largest digit $$y_i$$ and the remainder $$r_i=r_{i-1}-ny_i$$ for which $$r_i>0$$. Note that $$y_i$$ and $$r_i$$ completely determines the next $$y_{i+1}$$ and $$r_{i+1}$$ to come, thus all $$y_j$$ and $$r_j$$ with $$j>i$$.

This process either ends when the remainder is finally $$r_i=0$$, in which case the decimal of $$m/n$$ is finite in base $$b$$, or never does if $$r_i$$ is never going to be $$0$$. In the latter case, since the process is infinite and there are finitely many choices for the value of $$r_i$$ (i.e., $$1,2,\dots,b-1$$), at some point $$r_j$$ is the same as a previous one $$r_i$$ with $$i. Since any remainder completely determines the next remainders, $$r_{j+k}=r_{i+k}$$ for each $$k=0,1,2,\dots$$, i.e. the decimal of $$m/n$$ is infinitely repeating.

We can also show that a decimal of a number is finite if and only if it is a rational number and all prime factors of the denominator are prime factors of the base $$b$$. (Verify that which fraction represents $$0.1$$, $$0.01$$, etc.)

Continued fractions have a number of remarkable properties related to the Euclidean algorithm for integers or real numbers. Every rational number p/q has two closely related expressions as a finite continued fraction, whose coefficients can be determined by applying the Euclidean algorithm to (p,q). We know that the Euclidean algorithm terminates given any 2 integers p,q.

The numerical value of an infinite continued fraction is irrational (i.e., not rational).

Note we are only dealing with integers here. So the base does not matter.

Wikipedia, Continued fraction.