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

Characterization of primes

#primes#characterization#divisors

Statement

Show that n>1n>1 is prime iff n∣ab⇒n∣an\mid ab\Rightarrow n\mid a or n∣bn\mid b for all integers a,ba,b.

Hint

Forward: Euclid's lemma. Converse: if n=abn=ab with 1<a,b<n1<a,b<n, then n∣abn\mid ab but n∤a,bn\nmid a,b.

Show solutionHide solution

Solution

Forward. Suppose nn prime and n∣abn\mid ab. Euclid's lemma gives n∣an\mid a or n∣bn\mid b.

Converse. If nn is composite, write n=pqn=pq with 1<p,q<n1<p,q<n. Then n∣pqn\mid pq but n∤pn\nmid p and n∤qn\nmid q (since p,q<np,q<n). Contradiction.

Conclusion. The characterization holds.