Maths WorkshopMaths problems with full solutions
Exercise 1615Combinatorics › Counting principlesOlympiadAdded 3 Nov 2026

Sieve formula

#sieve#inclusion-exclusion#primes

Statement

Use inclusion-exclusion to count numbers up to 100100 not divisible by 22, 33, or 55.

Hint

Complement of the union.

Show solutionHide solution

Solution

From earlier. ∣A2∪A3∪A5∣=74|A_2\cup A_3\cup A_5|=74.

Complement. 100−74=26100-74=26.

Conclusion. 2626 numbers coprime to 3030 up to 100100.

Remark. This is the sieve of Eratosthenes for primes ≥7\ge7.