Re: Length of repeating series of digits in rational numbers



johngross wrote:
Hi all,

Given two integers i,j expressed to an arbitrary radix r;

Is it possible to calculate the length of the repeating digits of the
rational fraction i/j? in advance? without having to actually work
through it until the digits start repeating?

If so, I would very much like to know how.

Thanks in advance.

johngross

The length is the orden k of r mod j. I.e., k is the minimun exponet as r^k
= 1 (mod j). This is a divisor of phi(j), the euler totient function that
says how many numbers less than j are relative primes to j.


--
Best regards,

Ignacio Larrosa Cañestro
A Coruña (España)
ilarrosaQUITARMAYUSCULAS@xxxxxxxxxxx


.