Re: Length of repeating series of digits in rational numbers



On Dec 15, 9:50 am, "Ignacio Larrosa Cañestro"
<ilarrosaQUITARMAYUSCU...@xxxxxxxxxxx> wrote:
johngross wrote:
On Dec 15, 8:21 am, "Ignacio Larrosa Cañestro"
<ilarrosaQUITARMAYUSCU...@xxxxxxxxxxx> wrote:
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)
ilarrosaQUITARMAYUSCU...@xxxxxxxxxxx

Hi Ignacio,

Thanks for your very quick response, but I must confess you have
baffled me.

Is 'orden' a specific methematical term, or do you mean 'order'?

I mean order, "orden" is order in spanish.

Could you possibly give me an example, say for

length (256/60 base 5) = ?

Well, I was thinking in r an j coprimes. If they aren't, we must consider
the coprime part j' of j with respect to r.

In our example, 256/60 = 64/15. As j = 15 = 3*5, then j' = 3

Then, the length of the period is  k = order(5, 3) = 2, becasuse 5^1 = 2
(mod 3) and 5^2 = 1 (mod 3). Then the order of  5 mod 3 is 2.

The length of the periodic part is then 2. Of course, it could be an
aperiodic part, debt to the presence of commons factors of j and r..

Actually,  "{n}" means "expressed in base n",

64/15 {10} = 4 + 4/15 {10} = 4 + (4/5)/3  {10}

       = 4 + (4/5)/3 {5} = 4 + 0.4/3 {5}

      = 4.1131313...  {5}

--
Best regards,

Ignacio Larrosa Cañestro
A Coruña (España)
ilarrosaQUITARMAYUSCU...@xxxxxxxxxxxx Hide quoted text -

- Show quoted text -

Hi once more,

I think I'm getting the idea, but what do I do when I have no coprimes
between j and r?

I am currently trying

17/420 {17} which seems to give me a period of 12 repeating digits

and

17/196 {17} for which I haven't been able to detect a period of
repeating digits (at least, to the precision to which I can trust the
Windows calculator to be accurate).

Sorry to bother you again, and thanks for your help so far.

Warm regards,
John Gross

.



Relevant Pages