
12.2.66 Number theory
Let a rational number (m/n) be less than one. Prove that the (i-)th digit of its decimal notation ( 0, overline{a_{0} a_{1} a_{2} a_{3} cdots} ) is calculated by the formula: ( a_{i}=left(left(left(m cdot 10^{i}
ight) mod n
ight) cdot 10
ight) / n, quad ) where the last division operation is assumed to be an integer. Prove that dividing by a corner will always result in a finite decimal fraction or a periodic infinite fraction. Come up with an algorithm for converting an arbitrary periodic decimal fraction into a rational number.
A huge number of interesting olympiad problems in number theory, and its various sections.