Maths WorkshopMaths problems with full solutions
Exercise 265Number theory › PrimesHigh schoolAdded 3 Nov 2026

GCD with a prime

#gcd#prime#divisor

Statement

Compute gcd⁡(15,7)\gcd(15,7) and gcd⁡(15,5)\gcd(15,5), using the fact that 77 and 55 are prime.

Hint

gcd⁡(n,p)\gcd(n,p) is either 11 or pp when pp is prime.

Show solutionHide solution

Solution

gcd⁡(15,7)\gcd(15,7). 7∤157\nmid15, so gcd⁡=1\gcd=1.

gcd⁡(15,5)\gcd(15,5). 5∣155\mid15, so gcd⁡=5\gcd=5.

Conclusion. gcd⁡(15,7)=1\gcd(15,7)=1, gcd⁡(15,5)=5\gcd(15,5)=5.