09.12.2012 Views

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

9.3 0 MANIPULATION 443<br />

since the right side approaches zero as n t co. OK, we know that p = O(n2);<br />

there<strong>for</strong>e log p = 0 (log n) and log log p = 0 (log log n). We can now conclude<br />

from (9.45) that<br />

lnp = Inn + O(loglogn) ;<br />

in fact, with this new estimate in hand we can conclude that In In p = In Inn-t<br />

0 (log log n/log n), and (9.45) now yields<br />

lnp = Inn + lnlnn+ O(loglogn/logn)<br />

And we can plug this into the right-hand side of (g.44), obtaining<br />

p = nlnn+nlnlnn+O(n).<br />

This is the approximate size of the nth prime.<br />

We can refine this estimate by using a better approximation of n(n) in<br />

place of (9.42). The next term of (9.31) tells us that<br />

Get out the scratch proceeding as be<strong>for</strong>e, we obtain the recurrence<br />

paper again, gang.<br />

p = nlnp (1 i- (lnp) ‘)-‘(1 + O(l/logn)‘) ,<br />

(9.46)<br />

which has a relative error of 0( 1 /logn)2 instead of 0( 1 /logn). Taking logarithms<br />

and retaining proper accuracy (but not too much) now yields<br />

lnp = lnn+lnlnp+0(1/logn)<br />

= Inn l+<br />

(<br />

lnlnp<br />

Ann + O(l/logn)2) ;<br />

lnlnn<br />

lnlnp = lnlnn+ Inn +o(q$y,, .<br />

Finally we substitute these results into (9.47) and our answer finds its way<br />

out:<br />

P, = nlnn+nlnlnn-n+n %+0(C). b@)<br />

For example, when ‘n = lo6 this estimate comes to 15631363.8 + O(n/logn);<br />

the millionth prime is actually 15485863. Exercise 21 shows that a still more<br />

accurate approximation to P, results if we begin with a still more accurate<br />

approximation to n(n) in place of (9.46).

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

Saved successfully!

Ooh no, something went wrong!