Maths WorkshopMaths problems with full solutions
Exercise 1123Number theory › PrimesL1Added 3 Nov 2026

Coprime products and primes

#coprime#product#prime

Statement

Let pp be prime and a,ba,b integers with gcd⁡(a,p)=1\gcd(a,p)=1. Show that if p∣abp\mid ab, then p∣bp\mid b.

Hint

Euclid's lemma with pp prime.

Show solutionHide solution

Solution

Euclid's lemma. If pp prime and p∣abp\mid ab, then p∣ap\mid a or p∣bp\mid b.

Given gcd⁡(a,p)=1\gcd(a,p)=1. Since pp is prime, this means p∤ap\nmid a. So p∣bp\mid b.

Conclusion. This is the standard form of Euclid's lemma for primes.