Exercise 1615Combinatorics › Counting principlesOlympiadAdded 3 Nov 2026
Sieve formula
#sieve#inclusion-exclusion#primes
Statement
Use inclusion-exclusion to count numbers up to not divisible by , , or .
Hint
Complement of the union.
Show solutionHide solution
Solution
From earlier. .
Complement. .
Conclusion. numbers coprime to up to .
Remark. This is the sieve of Eratosthenes for primes .