# Basis Expansion of Irrational Number

## Theorem

A basis expansion of an irrational number never terminates and does not recur.

## Proof

We use a Proof by Contraposition.

Thus, we show that if a basis expansion of a (real) number terminates or recurs, then that number is rational.

Suppose $x \in \R$ were to terminate in some number base $b$.

Then (using the notation of that definition):

- $\exists k \in \N: f_k = 0$

and so we can express $x$ precisely as:

- $x = \left[{s . d_1 d_2 d_3 \ldots d_{k - 1} }\right]_b$

This means:

- $x = s + \dfrac {d_1} b + \dfrac {d_2} {b^2} + \dfrac {d_3} {b^3} + \cdots + \dfrac {d_{k - 1} } {b^{k - 1} }$

This is the same as:

- $x = \dfrac {s b^{k - 1} + d_1 b^{k - 2} + d_2 b^{k - 3} + \cdots + d_{k - 1} } {b^{k - 1} }$

Both numerator and denominator are integers and so $x$ is a rational number.

Now suppose $x \in \R$ were to recur in some number base $b$.

Let $y$ be the recurring part of the fractional part of $x$.

That is, $y$ is obtained from $x$ by first subtracting $\floor x$ and then subtracting the nonrecurring prefix of the basis expansion (if any).

Then we can express $y$ precisely as:

- $y = \left[{0 . 0 0 \ldots 0 d_1 d_2 \ldots d_{k - 1} d_1 d_2 \ldots d_{k - 1} \ldots}\right]_b$

for some number $m$ (possibly $m = 0$) of zeroes following the point.

We define:

- $z:= \left[{0 . d_1 d_2 \ldots d_{k - 1} }\right]_b = \dfrac {d_1} b + \dfrac {d_2} {b^2} + \dfrac {d_3} {b^3} + \cdots + \dfrac {d_{k - 1} } {b^{k - 1} }$

Then $z$ is a rational number.

Furthermore:

- $y = \dfrac z {b^m} + \dfrac z {b^{m + k} } + \dfrac z {b^{m + 2 k} } + \cdots = \dfrac z {b^m} \paren {1 + \dfrac 1 {b^k} + \dfrac 1 {b^{2 k } } + \cdots} = \dfrac z {b^m} \cdot \dfrac 1 {1 - \dfrac 1 {b^k} }$

so $y$ is a rrational number as well.

Thus as $x - y$ is rational, $x$ is also rational.

$\blacksquare$