10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.7 Counting primes 155<br />

for b ≥ 2. We leave the simple proof for Exercise 3.33. Since φ(y, 2) =<br />

⌊(y +1)/2⌋, we can continue to use (3.22) to eventually come down to<br />

expressions φ(y, 2) for various choices of y. For example,<br />

φ(1000, 7) = φ(1000, 5) − φ(142, 5)<br />

= φ(1000, 3) − φ(200, 3) − φ(142, 3) + φ(28, 3)<br />

= φ(1000, 2) − φ(333, 2) − φ(200, 2) + φ(66, 2)<br />

− φ(142, 2) + φ(47, 2) + φ(28, 2) − φ(9, 2)<br />

= 500 − 167 − 100 + 33 − 71 + 24 + 14 − 5<br />

= 228.<br />

Using this scheme, we may express any φ(x, pa) asasumof2 a−1 terms. In<br />

fact, this bottom-line expression is merely the inclusion–exclusion principle<br />

applied to the divisors of p2p3 ···pa, the product of the first a − 1 odd primes.<br />

We have<br />

φ(x, pa) =<br />

<br />

n|p2p3···pa<br />

µ(n)φ(x/n, 2) =<br />

<br />

n|p2p3···pa<br />

<br />

x/n +1<br />

µ(n)<br />

,<br />

2<br />

where µ is the Möbius function see Section 1.4.1.<br />

For a = π(x 1/3 ), clearly 2 a−1 termsistoomany,andwewouldhavebeen<br />

better off just sieving to x. However, we do not have to consider any n in the<br />

sum with n>x, since then φ(x/n, 2) = 0. This “truncation rule” reduces<br />

the number of terms to O(x), which is starting to be competitive with merely<br />

sieving. By fiddling with this idea, we can reduce the O-constant to a fairly<br />

small number. Since 2 · 3 · 5 · 7 · 11 = 2310, by computing a table of values<br />

of φ(x, 11) for x =0, 1,...,2309, one can quickly compute any φ(x, 11): It is<br />

ϕ(2310) ⌊x/2310⌋ + φ(x mod 2310, 11), where ϕ is the Euler totient function.<br />

By halting the recurrence (3.22) whenever a b value drops to 11 or a y/pb<br />

value drops below 1, we get<br />

φ(x, pa) =<br />

<br />

n|p6p7···pa<br />

n≤x<br />

µ(n)φ(x/n, 11).<br />

If a = π x1/3 , the number of terms in this sum is asymptotic to cx with<br />

c = ρ(3)ζ(2) −1 5 i=1 pi/(pi + 1), where ρ is the Dickman function (see Section<br />

1.4.5), and ζ is the Riemann zeta function (so that ζ(2) = 6/π2 ). This<br />

expression for c captures the facts that n has no prime factors exceeding x1/3 ,<br />

n is squarefree, and n has no prime factor below 12. Using ρ(3) ≈ 0.0486, we<br />

get that c ≈ 0.00987. By reducing a to π x1/4 (and agreeing to compute<br />

<br />

1/4<br />

φ3 x, x <br />

1/4 in addition to φ2 x, x ), we reduce the constant c to an<br />

expression where ρ(4) ≈ 0.00491 replaces ρ(3), so that c ≈ 0.000998. These<br />

machinations amount, in essence, to the method of Meissel, as improved by<br />

Lehmer, see [Lagarias et al. 1985].

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!