Totient function and distinct primes.

  • Context: Graduate 
  • Thread starter Thread starter Yuqing
  • Start date Start date
  • Tags Tags
    Function Primes
Click For Summary

Discussion Overview

The discussion revolves around the properties of the totient function, specifically whether the equation phi(pq) = (p-1)(q-1) implies that p and q must be distinct primes. Participants explore this question under various assumptions about the nature of p and q, including cases where they may not be prime or coprime. The conversation also touches on generalizations to more than two primes.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants assert that if p and q are distinct primes, then phi(pq) = (p-1)(q-1) holds true, but question whether the reverse is also true.
  • One participant notes that if p = q, then phi(pq) does not equal (p-1)(q-1), suggesting that distinctness is necessary.
  • Another participant raises the possibility that p and q could be composite or non-coprime, complicating the proof of distinctness based solely on the totient function.
  • A participant proposes a scenario involving distinct primes and attempts to derive contradictions from assumptions about the nature of p and q.
  • Concerns are raised about the reliance on the primality of q in some proofs, especially when considering composite cases.
  • One participant mentions a general inequality involving the totient function and its relation to products of integers, but another challenges the validity of this inequality.

Areas of Agreement / Disagreement

Participants exhibit disagreement regarding whether the condition phi(pq) = (p-1)(q-1) guarantees that p and q are distinct primes. Some support this idea, while others express skepticism, particularly in cases where p and q may not be prime or coprime. The discussion remains unresolved.

Contextual Notes

Participants note that assumptions about the primality and coprimality of p and q significantly affect the validity of their arguments. There are also unresolved mathematical steps and dependencies on definitions that could influence the conclusions drawn.

Yuqing
Messages
216
Reaction score
0
It is true that phi(pq)=(p-1)(q-1) when p and q are distinct primes, but is it true that given phi(pq) = (p-1)(q-1) then p and q have to be distinct primes? It seems intuitive, but I'm having some difficulty proving it.

Also, if this was true, is it possible to generalize this into more than 2 primes? Given phi(m) = (p_1-1)(p_2-1)..(p_k-1) then m is a product of k distinct primes.
 
Last edited:
Physics news on Phys.org
For your first question, if p = q, then phi(pq)=phi(p^2)=p^2-p =/= (p-1)(q-1).

For your second, what happens if some of them are equal? As you can see above p divides phi(pq). This will also happen generally if some prime occurs more than once.
 
Sorry, I should've been more clear.

For the question, I am assuming that we do not know the nature of p or q. As you have mentioned, if p and q are both primes, they have to be distinct, but if p and q are not necessarily primes (they could be primes, composite, coprime or non-coprime) then could phi(pq) = (p-1)(q-1).

So basically I am asking, given two numbers p and q, where we do not know if p or q is prime, coprime or any detail in general, can we prove that if phi(pq) = (p-1)(q-1) then p and q are distinct primes. To give a numerical example, say we want to prove that 2 and 3 are primes, can we use

phi(2*3) = (2-1)(3-1) = 2 to prove that 2 are 3 are in fact distinct primes.

The same idea with the generalized case, say we know that

phi(p_1 *p_2 * ... *p_k) = (p_1-1)(p_2-1)..(p_k-1)

can we then say that p_1, p_2, ... p_k are distinct primes?
 
Last edited:
Yuqing said:
So basically I am asking, given two numbers p and q, where we do not know if p or q is prime, coprime or any detail in general, can we prove that if phi(pq) = (p-1)(q-1) then p and q are distinct primes.

Suppose we have phi(m q)=(m-1)(q-1) and m=pr and with p,q,r distinct primes (so p,q,r > 1).
Then we would also have phi(m q)=phi(pr q)=(p-1)(r-1)q

In other words, we would have (pr-1)=(p-1)(r-1), implying p+r=2 which is a contradiction (since both are > 1).

Similarly if we have phi(m q)=(m-1)(q-1) with m=r2 and q,r distinct primes.
Then we would have phi(m q)=phi(r2 q)=(r-1)rq
In this case we would have (r2-1)=(r-1)r, implying r=1 which again is a contradiction.

In general each factorisation of m would yield a value for phi(m q) that is lower than (m-1)(q-1).
And more generally each factorisation of m and n would yield a value for phi(m n) that is lower than (m-1)(n-1).

So I'd say, yes, if we have phi(m n)=(m-1)(n-1) then m and n must be distinct primes.
Qed.
 
I agree that it does seem like the case, but from what I can see, that proof relies on the fact that q is prime (which is required to properly cancel q-1). I cannot see an immediately obvious way to prove the proposition for the case that both p and q are composite. Especially troubling (for me at least) is the case where p and q might be non-coprime.
 
phi(ab) <= phi(a)phi(b) <= (a-1)(b-1), and the last inequality is equality if and only if a and b are primes. This extends easily to an arbitrary number of factors. The second inequality is obvious, and the first inequality can be seen from a easily derived general formula for phi(n) given the prime factorization of n.
 
But the first inequality is not true.

phi(24) = 8 > phi(4)*phi(6) = 2*2 = 4
 
Yuqing said:
But the first inequality is not true.

phi(24) = 8 > phi(4)*phi(6) = 2*2 = 4

My mistake, the inequality is the wrong way.
 

Similar threads

  • · Replies 31 ·
2
Replies
31
Views
3K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 17 ·
Replies
17
Views
7K