Expii

Rationals in Base B, and Period of Repeating Expansion - Expii

In any number base B>1, the rational numbers are precisely those reals whose base B expansions either terminate or eventually repeat. Furthermore, the period (of the repeating part) equals the order of B modulo the lowest denominator of the rational.