Inclusion–Exclusion as a Sieve

Removing multiples of small primes can be expressed exactly with Möbius inversion. The number of divisors creates a cost even before estimates enter.

Source
Anbloq
Language
English
Created
Updated
Chapters
1
Reading time
1 min

For \(P(z)=\prod_{p<z}p\), the indicator of \(\gcd(n,P(z))=1\) is \(\sum_{d\mid\gcd(n,P(z))}\mu(d)\). For integers up to \(x\), interchange the finite sums to count multiples of each divisor.

\[\#\{1\le n\le x:(n,P(z))=1\} =\sum_{d\mid P(z)}\mu(d)\lfloor x/d\rfloor.\]

Four terms with an exact result

For \(P=2\cdot3\) and \(x=30\), the sum is \(30-15-10+5=10\). In general replacing floors by \(x/d\) gives main term \(x\prod_{p<z}(1-1/p)\), but an error bounded by the number of divisors of \(P(z)\). Selberg’s upper-bound sieve uses weights with a controlled support.[1]

References

  1. Andrew V. Sutherland, 18.785 Number Theory I lecture notes ↩