2 ms·
If a number start repeating from some point, you can do a nice trick: multiply this number by 10^n choosing n to be a length of a period (effectively shifting t
by ordu 2y ago
If a number start repeating from some point, you can do a nice trick: multiply this number by 10^n choosing n to be a length of a period (effectively shifting the decimal points n places to the right). Then subtract:
10^nx-x
infinite periods will cancel each other due to the subtraction, you'll number with a finite amount of digits, say y, so:
10^nx - x = y or x = y/(10^n - 1).
y is rational (finite amount of digits), 10^n - 1 not just rational but integer, so x is rational.