sieve of Eratosthenes

sieve of Eratosthenes

The

sieve of Eratosthenes

is the number-theoretic version of the

principle of inclusion-exclusion

. In the typical application of
the sieve of Eratosthenes one is concerned with estimating the
number of elements of a set

𝒜

that are not

divisible

by any of the primes in the set

𝒫

.

Möbius

inversion

formula

(

http://

planetmath

.org/MobiusInversionFormula

) can be written as

∑

d

∣

n

d

∣

P

μ

⁢

(

d

)

=

∑

d

∣

gcd

(

n

,

P

)

μ

⁢

(

d

)

=

{

1

,

if

⁢

gcd

⁡

(

n

,

P

)

=

1

,

0

,

if

⁢

gcd

⁡

(

n

,

P

)

>

1

.

(1)

If we set

P

=

∏

p

∈

𝒫

p

then (

1

) is
the

characteristic function

(

http://planetmath.org/CharacteristicFunction

) of the set of numbers that are not
divisible by any of the primes in

𝒫

. If we set

A

d

to be the number of elements of

A

that are divisible by

d

,
then the number of elements of

A

that are not divisible by any
primes in

𝒫

can be expressed as

∑

n

∈

𝒜

∑

d

∣

n

d

∣

P

μ

⁢

(

d

)

=

∑

d

∣

P

μ

⁢

(

d

)

⁢

∑

n

∈

𝒜

d

∣

n

1

=

∑

d

∣

P

μ

⁢

(

d

)

⁢

A

d

.

(2)

Example.

To establish an

upper bound

on the number of primes
less than

x

we set

𝒜

=

{

y

,

y

+

1

,

…

,

x

}

and

P

=

{

p

:

p

⁢

is a prime less than

⁢

y

}

. Then (

2

) counts
the number of

integers

between

y

and

x

that are not divisible
by any prime less than

y

. Hence the number of primes not
exceeding

x

is

π

⁢

(

x

)

≤

∑

d

∣

P

μ

⁢

(

d

)

⁢

(

(

x

-

y

)

/

d

+

O

⁢

(

1

)

)

≤

x

⁢

∑

d

∣

P

μ

⁢

(

d

)

d

+

O

⁢

(

|

P

|

)

=

x

⁢

∏

p

≤

y

(

1

-

1

/

p

)

+

O

⁢

(

2

y

)

.

By Mertens’ estimate for

∏

(

1

-

1

/

p

)

the main term is

x

⁢

e

-

γ

+

o

⁢

(

1

)

log

⁡

y

,

where

γ

is Euler’s constant. Setting

y

=

1

2

⁢

log

⁡

x

we obtain

π

⁢

(

x

)

≤

(

e

-

γ

+

o

⁢

(

1

)

)

⁢

x

log

⁡

log

⁡

x

.

The obtained bound is clearly inferior to the

prime number
theorem

, but the method applies to problems that are not tractable
by the other techniques.

The error term of the order

O

⁢

(

2

y

)

can be significantly

reduced

by using more robust sifting procedures such as Brun’s (

http://planetmath.org/BrunsPureSieve

) and Selberg’s sieves. For detailed exposition
of various sieve methods see monographs

[

1

,

2

,

3

]

.

References

1

George Greaves.

Sieves in

number theory

.

Springer, 2001.

http://www.emis.de/cgi-bin/zmen/ZMATH/en/quick.html?type=html&an=1003.11044

Zbl
1003.11044.

2

H. Halberstam and H.-E. Richert.

Sieve methods

, volume 4 of

London Mathematical Society

Monographs

.

1974.

http://www.emis.de/cgi-bin/zmen/ZMATH/en/quick.html?type=html&an=0298.10026

Zbl
0298.10026.

3

C. Hooley.

Application of sieve methods to the theory of numbers

,
volume 70 of

Cambridge Tracts in Mathematics

.

Cambridge Univ. Press, 1976.

http://www.emis.de/cgi-bin/zmen/ZMATH/en/quick.html?type=html&an=0327.10044

Zbl
0327.10044.

Title

sieve of Eratosthenes

Canonical name

SieveOfEratosthenes1

Date of creation

2013-03-22 14:07:40

Last modified on

2013-03-22 14:07:40

Owner

bbukh (348)

Last modified by

bbukh (348)

Numerical id

10

Author

bbukh (348)

Entry type

Definition

Classification

msc 11N35

Related topic

PrincipleOfInclusionExclusion

Related topic

BrunsPureSieve

Generated on Fri Feb 9 15:39:23 2018 by

LaTeXML