Understanding the Results of gcd(x,n)

  • Context: Undergrad 
  • Thread starter Thread starter Peter_Newman
  • Start date Start date
  • Tags Tags
    Gcd Number theory
Click For Summary
SUMMARY

The discussion centers on the properties of the greatest common divisor (gcd) when dealing with integers x, n, and prime factors p and q, specifically under the condition that p divides x and n equals p multiplied by q. It is established that if p divides x, then gcd(x, n) can only be either n or p, depending on whether q divides c, where c is defined such that x equals c multiplied by p. The reasoning confirms that if q does not divide c, gcd(c·p, p·q) equals p, while if q divides c, gcd(c·p, p·q) equals n.

PREREQUISITES
  • Understanding of prime factorization
  • Familiarity with the concept of greatest common divisor (gcd)
  • Basic knowledge of divisibility rules
  • Ability to manipulate algebraic expressions involving integers
NEXT STEPS
  • Study the properties of gcd in number theory
  • Learn about the Euclidean algorithm for calculating gcd
  • Explore the implications of prime factorization in gcd calculations
  • Investigate the relationship between gcd and least common multiple (lcm)
USEFUL FOR

Mathematicians, students studying number theory, and anyone interested in understanding the properties of gcd in relation to prime factors.

Peter_Newman
Messages
155
Reaction score
11
Hello,

I read something about to which I have a small question of understanding. Before I would like to outline it a little. So we have the primes ##p## and ##q## and we know ##p|x## and ##n = p\cdot q## furthermore it follows that ##p|n## also holds.

Now it was said that if ##p|x##, then ##\gcd(x,n)## is either ##n## or ##p##. Why is this so? I had a few thoughts that I would like to share here.

Consideration 1:
From ##p|x## it follows that there is a ##c## such that ##c \cdot p = x##, I simply put this into the ##\gcd(x,n)## and rewrite this a bit, I get ##\gcd(c\cdot p, p\cdot q)##. This is exactly ##n## if the ##c=q##, because ##c## cannot divide either the ##q## or the ##p##. (gcd of two equal numbers, is that number)

Consideration 2:
I again use the approach as before, ##\gcd(c\cdot p, p\cdot q)##. So this is ##p## exactly when ##c \neq q##, because then the only (common) divisor can be the ##q##.

I would be interested to know if the reasoning is correct.
 
Physics news on Phys.org
If ##n = pq## then the only divisors of ##n## are ##1,p, q, pq##.

Then the two cases are whether ##q## divides ##x## or not.

It's not a case of ##c =q##, it's a case of whether ##q## divides ##c##.
 
  • Like
Likes   Reactions: Peter_Newman
Hello @PeroK , can you explain this a little further? From there, it is not really clear to me, how one then comes to the assertion "if ##p|x##, then ##gcd(x,n)## is either ##n## or ##p##".
 
Peter_Newman said:
Hello @PeroK , can you explain this a little further? From there, it is not really clear to me, how one then comes to the assertion "if ##p|x##, then ##gcd(x,n)## is either ##n## or ##p##".
I left that bit for you to do. Look at the two cases I mentioned.
 
OK, then I would get started:

If the ##q## does not divide the ##c##, then ##\gcd(cp,pq)=p##, I would argue that the ##p## is the greatest common factor (in the expression of the gcd()). Is stat okay?
 
Peter_Newman said:
OK, then I would get started:

If the ##q## does not divide the ##c##, then ##\gcd(cp,pq)=p##, I would argue that the ##p## is the greatest common factor (in the expression of the gcd()). Is stat okay?
Yes.
 
  • Like
Likes   Reactions: Peter_Newman
Thank you @PeroK .

I have to admit, however, that the other part of proving "feels" kind of weird.

If the ##q## divides the ##c##, then surely the ##\gcd(cp,pq) = q##, but that can't be? Surely it should be shown that then the ##n## results?!
 
Peter_Newman said:
Thank you @PeroK .

I have to admit, however, that the other part of proving "feels" kind of weird.

If the ##q## divides the ##c##, then surely the ##\gcd(cp,pq) = q##, but that can't be? Surely it should be shown that then the ##n## results?!
You're looking for the greatest common divisor. And ##pq > q##.

Try ##c = qd## if you are still unsure.
 
  • Like
Likes   Reactions: Peter_Newman
Oh, now I see what you mean! Yes, of course that is absolutely right! If the ##q## divides the ##c## that means exactly ##k\cdot q = c##... Insert and one sees the "magic". Many thanks @PeroK !
 
  • Like
Likes   Reactions: PeroK

Similar threads

  • · Replies 23 ·
Replies
23
Views
1K
Replies
48
Views
5K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 12 ·
Replies
12
Views
715
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
2K
  • · Replies 21 ·
Replies
21
Views
1K
  • · Replies 0 ·
Replies
0
Views
938
  • · Replies 26 ·
Replies
26
Views
965
  • · Replies 4 ·
Replies
4
Views
2K