Maths WorkshopMaths problems with full solutions
Exercise 1610Combinatorics › Counting principlesL1Added 3 Nov 2026

Counting coprime integers

#inclusion-exclusion#coprime#totient

Statement

Compute the number of integers from 11 to 6060 coprime to 6060.

Hint

Use inclusion-exclusion on prime divisors 2,3,52,3,5 of 6060.

Show solutionHide solution

Solution

Non-coprime. Count numbers divisible by 22, 33, or 55:
- ∣A2∣=⌊60/2⌋=30|A_2|=\lfloor60/2\rfloor=30
- ∣A3∣=20|A_3|=20
- ∣A5∣=12|A_5|=12
- ∣A2∩A3∣=∣A6∣=10|A_2\cap A_3|=|A_6|=10
- ∣A2∩A5∣=∣A10∣=6|A_2\cap A_5|=|A_{10}|=6
- ∣A3∩A5∣=∣A15∣=4|A_3\cap A_5|=|A_{15}|=4
- ∣A2∩A3∩A5∣=∣A30∣=2|A_2\cap A_3\cap A_5|=|A_{30}|=2

Union. 30+20+12−10−6−4+2=4430+20+12-10-6-4+2=44.

Coprime. 60−44=1660-44=16.

Check. φ(60)=60(1−1/2)(1−1/3)(1−1/5)=16\varphi(60)=60(1-1/2)(1-1/3)(1-1/5)=16. ✓

Conclusion. 1616 coprime integers.