# decimal expansion

Every rational number   $\frac{m}{n}$, where $m$ and $n$ are positive integers, has an endless decimal expansion (or decadic expansion — according to Greek).  The decimal expansion of $\frac{m}{n}$ means the series

 $\displaystyle\nu.\nu_{1}\nu_{2}\nu_{3}\ldots=\nu+10^{-1}\nu_{1}+10^{-2}\nu_{2}% +10^{-3}\nu_{3}+\ldots$ (1)

where  $\nu=\lfloor\frac{m}{n}\rfloor$  is the integer part (http://planetmath.org/Floor) of $\frac{m}{n}$ and the integers $\nu_{j}$ are the remainders of  $\lfloor 10^{j}\cdot\!\frac{m}{n}\rfloor$  when divided by 10; thus  $0\leqq\nu_{j}<10$.

We may suppose that $m$ and $n$ are coprime   (if necessary, reduce the fraction).  Then the depends only on the denominator $n$.  In the case that  $\gcd(n,\,10)=1$,  the is the least positive integer $l$ such that $10^{l}\equiv 1\pmod{n}$ (the does not change if we multiply the fraction by a suitable power of 10 and then reduce all prime factors   of 10 from the denominator).  In every case, the is a factor of the number $\varphi(n)$, where $\varphi$ is Euler’s totient function.

Examples

$\frac{1}{8}=0.125000\ldots=0.124999\ldots$ (one-digit ; N.B. two possibilities),

$\frac{1}{12}=0.08333\ldots$ (one-digit per.),

$\frac{1}{37}=0.^{\prime}027^{\prime}027^{\prime}027^{\prime}\ldots$ (three-digit per.),

$\frac{1}{82}=0.0^{\prime}12195^{\prime}12195^{\prime}12195^{\prime}\ldots$ (five-digit per.),

$\frac{1}{25351}=0.000039446\ldots$ (hundred-digit per.)

The tail of infinitely many 0’s (as in 0.125000…) is of course usually not written out.  Such a tail is possible only when $n$ has no other prime factors except prime factors of the base of the digit system in question.

If the tails of 0’s are not accepted, then the digital expansion of every positive rational is unique (then e.g. 0.124999…  is the only for $\frac{1}{8}$ in the decimal system).

Completely similar results concern the digital expansions in any other positional digit system.  Let the fraction $\frac{1}{31}$ be an example ($\varphi(31)=30$); its is

in the decadic (decimal) digit system  $\frac{1}{31}=0.^{\prime}032258064516129^{\prime}\ldots_{\mathrm{ten}}$  (15-digit per.),

in the hexadic (senary) digit system  $\frac{1}{51}=0.^{\prime}010545^{\prime}010545^{\prime}010545^{\prime}\ldots_{% \mathrm{six}}$  (6-digit per.),

in the dyadic () digit system  $\frac{1}{11111}=0.000010000100001\ldots_{\mathrm{two}}$  (5-digit per.).

Note.  Also any irrational number has a unique decimal expansion, but it is non-periodic; for example Liouville’s number (http://planetmath.org/ExampleOfTranscendentalNumber)

 $0.110001\,000000\,000000\,000001\,000000\,\ldots$

which is transcendental over $\mathbb{Q}$.