#"When dividing numerically, we can only have at most p"#
#"different remainders. If we encounter a remainder that"#
#"we had before, we get in a cycle."#
#n/p = a_1 a_2 ... a_q . a_{q+1} a_{q+2} ...#
#"Now call "r = n - [a_1 a_2 ... a_q] * p","#
#"then "0<= r < p.#
#r/p = 0.a_{q+1} a_{q+2} ...#
#r_2 = 10 r - p a_{q+1}#
#"Then we have"#
#0 <= r_2 < p#
#"And when dividing further, we repeat with "r_3" between"#
#0" and "p-1". And then "r_4", and so on..."#
#"Whenever we encounter a "r_i" that we have encountered"#
#"before we begin to cycle."#
#"As there are only "p" different "r_i" possible, this will certainly"#
#"happen."#
#"2 and 5 are not special, they give recurring 0 which we also"#
#"can consider as a recurring decimal. And we do not have to"#
#"restrict ourselves to prime numbers."#