Recurring decimals in prime fractions

  • Thread starter Thread starter Oxymoron
  • Start date Start date
  • Tags Tags
    Fractions Prime
Click For Summary
The discussion focuses on the properties of recurring decimals generated by the reciprocals of prime numbers, specifically the relationship between the period of these decimals and the primes themselves. It is established that the period of 1/p is linked to the order of 10 modulo p, with the period often being a divisor of p-1. The conversation also explores the periods of products of primes, concluding that while the period of 1/pq can be expressed in terms of the least common multiple of the periods of 1/p and 1/q, there is no straightforward formula for all cases. The participants emphasize the complexity of these relationships and the need for further exploration of the mathematical properties involved. Overall, the thread highlights the intriguing connections between prime numbers and their decimal representations.
  • #31
Oxymoron said:
So when I got to the step

10^t \equiv 1(\mod p)
10^t \equiv 1(\mod q)

=>

p\,|\,t-1
q\,|\,t-1

You've typed this sort of implication enough times I'm getting concerned it's not a typo. 10^t=1 mod p does not in anyway mean p divides t-1. You do however know that the order of 10 mod p will divide t if 10^t=1 mod p. In other words, if you raise 10 to an exponent and get 1, then this exponent is a multiple of the order. You also know the order of 10 mod p will divide p-1, the order of the group of units mod p is just p-1 (in general it's phi(n)).
 
Physics news on Phys.org
  • #32
Excellent. So I was lucky that the period of 1/7 equalled 7-1 AND phi(7) = 7-1. That was where I was getting confused.

So for 1/pq we could have written

per(1/pq) = lcm(phi(p),phi(q))
 
  • #33
Oxymoron said:
Excellent. So I was lucky that the period of 1/7 equalled 7-1 AND phi(7) = 7-1. That was where I was getting confused.

So for 1/pq we could have written

per(1/pq) = lcm(phi(p),phi(q))

This isn't correct- it's the 'luck' mistake that you just mentioned. You don't necessarily have per(1/p) equal to phi(p). You know per(1/p) divides phi(p) since per(1/p) equals the order of 10 mod p, but that's all you can say.
 
  • #34
So to answer the question which was "what can we say about the period pf 1/pq?" is exactly that, we can only "say". There is no exact formula for it.

We can say the period of 1/p divides phi(p) and the period of 1/q divides phi(q) because the period of 1/p is the order of 10 mod p (and for q), like you just said. So we can say that the period of 1/pq is a divisor of phi(pq).
 
  • #35
Yes, but you can also say something about per(1/pq) in terms of per(1/p) and per(1/q), namely per(1/pq) = lcm(per(1/p),per(1/q))
 
  • #36
And with per(1/p^2) we can say that it too is a divisor of phi(p^2). Which, as you have already said, means that per(1/p^2) divides p*(p-1)
 
  • #37
Posted by Shmoe

Yes, but you can also say something about per(1/pq) in terms of per(1/p) and per(1/q), namely per(1/pq) = lcm(per(1/p),per(1/q))

I thought we came to the conclusion that this wasnt true. It was because per(1/7) happened to equal phi(7), and per(1/17) happened to equal phi(17). Now you are saying that it was correct.
 
  • #38
Oxymoron said:
I thought we came to the conclusion that this wasnt true. It was because per(1/7) happened to equal phi(7), and per(1/17) happened to equal phi(17). Now you are saying that it was correct.

lcm(phi(p),phi(q)) and lcm(per(1/p),per(1/q)) are not always the same. Look back to posts 25/26.
 
  • #39
SUMMARY:

1. The period of 1/pq equals the order of 10 mod pq.
2. Let t=ord_(pq)(10).
3. By definition of order, we must have 10^t=1(mod pq).
4. This implies two linear congruences
a) 10^t = 1(mod p)
b) 10^t = 1(mod q)
5. We know that t divides ord_p(10) <=> 10^t=1(mod p)
6. We know that t divides ord_q(10) <=> 10^t=1(mod q)
7. We also know that ord_p(10) divides p-1 (or in other words phi(p)).
8. From 4a and 4b we know that if t divides two different numbers then it must divide their lowest common multiple. That is, t must divide lcm(ord_p(10),ord_q(10)).
9. Which means that t divides lcm(phi(p),phi(q)).

How does this look?
 
  • #40
It doesn't look right at all. t divides ord_p(10) does not mean that t divides phi(p). ...(or does it?)
 
Last edited:
  • #41
Oxymoron said:
5. We know that t divides ord_p(10) <=> 10^t=1(mod p)
6. We know that t divides ord_q(10) <=> 10^t=1(mod q)

These are backwards.

ord_p(10) divides t<=> 10^t=1(mod p)

Oxymoron said:
7. We also know that ord_p(10) divides p-1 (or in other words phi(p)).

This is true, but not necessary. You have a phi fixation.
Oxymoron said:
8. From 4a and 4b we know that if t divides two different numbers then it must divide their lowest common multiple. That is, t must divide lcm(ord_p(10),ord_q(10)).

This is backwards. You'll have ord_p(10) and ord_q(10) dividing t, and hence so does their least common multiple.

In the direction you are trying to go, you need something like (4)=>(3), which follows when p and q are distinct primes (hence relatively prime). This will let you show the order of 10 mod pq divides the order of of 10 mod p and 10 mod q, so it divides their least common multiple.

Oxymoron said:
9. Which means that t divides lcm(phi(p),phi(q)).

Again true, but saying t divides lcm(per(1/p),per(1/q)) is in general stronger.
 
Last edited:
  • #42
Thankyou Shmoe for all your help and patience. I believe I can now write a correct solution.
 
  • #43
**bump**

I'm working on a similar problem, ie, I need to find the period of 1/pq if (p,q) = (p,10) = (q,10) = 1.

If the period of 1/p is r and the period of 1/q is s, then

10^r \equiv 1 (p) \mbox{ and } 10^s \equiv 1 (q).

So, let t be the period of 1/pq, ie, 10^t \equiv 1 (pq), then 10^t \equiv 1 (p) \mbox{ and } 10^t \equiv 1 (q).

Now r|t and s|t (since if the order of a mod n is k and a^t \equiv 1 (n), then k|t). This implies that \textstyle \left. \frac{rs}{\mbox{gcd}(r,s)} \right| t \Rightarrow \mbox{lcm}(r,s)|t.

I just have to show that t|\mbox{lcm}(r,s) so I can say the period of 1/pq is exactly \mbox{lcm}(r,s) and I'm done (I think). I'm a bit stuck with this last bit though. Am I on the right track here or is there some other obvious way of going about this?

Thanks for any help.
 
Last edited:

Similar threads

  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 25 ·
Replies
25
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K