Representation of positive rational numbers as series. [duplicate]

Solution 1:

This is more like the base $b$ notation for a number, but with the base varying per digit.

For example: $$ \begin{align}\frac{17}{10} &= 1 + \frac{7}{10} \\&=1 + \frac{1}{2!} + \frac{1}{5} \\ &= 1+\frac{1}{2!} +\frac{1}{3!} + \frac{1}{30}\\ &=1+\frac{1}{2!}+\frac{1}{3!}+\frac{4}{5!} \end{align}$$

If $x$ is a real number, define the sequence $$x_1=x\\a_i=\lfloor x_i\rfloor\\x_{i+1}=(i+1)(x_i-a_i)$$ Then: $$x=\sum_{i=1}^\infty \frac{a_i}{i!}$$

This sum will terminate when $x$ was rational - that is $x_n=0$ for some $n$, and so $a_i=0$ for $i\geq n$.

Since $0\leq x_i-a_i<1$, we have that $0\leq x_{i+1}<i+1$ and thus $0\leq a_{i+1}<i+1$.

More generally, if $\{b_1,b_2,\dots,b_n,\dots\}$ is a sequence of natural numbers all greater than $1$, then we can define $B_0=1$, $B_{n}=b_nB_{n-1}$ and write any real number as:

$$\sum_{i=0}^\infty \frac{a_i}{B_i}$$ with $a_i$ integers and, for $i>0$, $0\leq a_i<b_i$.

When the $b_i=b$, this is the base $b$ representation. When $b_i=i+1$, this is the representation above.

Given a rational number $x$ such that $xB_n$ is an integer for some $n$, then $x$ can be written as a finite sum in the above format.