Basis Expansion of Rational Number

Theorem
Let $x$ be a rational number.