From: caldwell@unix1.utm.edu (Chris Caldwell) Newsgroups: sci.math Subject: ln(2)+ln(3)+ln(5)+ln(7)+...+ln(p) Date: 18 Jan 1995 00:11:27 GMT I am looking for a pratical, accurate approximation of ln(p#) = ln(2)+ln(3)+...+ln(p) (where the sum is taken over the primes <= p). My values of p are about 10^10. Any suggestion? ============================================================================== From: rusin@washington.math.niu.edu (Dave Rusin) Newsgroups: sci.math Subject: Re: ln(2)+ln(3)+ln(5)+ln(7)+...+ln(p) Date: 18 Jan 1995 21:55:39 GMT In article <3fhmbf$186@martha.utk.edu>, Chris Caldwell wrote: >I am looking for a pratical, accurate approximation of > > ln(p#) = ln(2)+ln(3)+...+ln(p) > >(where the sum is taken over the primes <= p). My values >of p are about 10^10. Any suggestion? What, no number theorists out there? This is a classical function, a careful analysis of which leads to the prime number theorem. Here's Landau writing in 1909: section 17: sets \theta(x) = \Sum_{p\le x} \log(p) section 19: shows \theta(x)/x and \pi(x)/(x/log(x)) have the same limit section 24-25: shows that limit is 1. So ln(p#) = p + o(p). As I recall, the better you do at estimating the error in the Prime Number Theorem, the better you can estimate the error term o(p); the correspondence is too cumbersome for me to remember but it's not deep; in fact I believe this is the route used in "elementary" proofs of the PNT. For what it's worth, a sum over consecutive primes can often be rewritten as an ordinary sum using the approximation that the n-th prime is roughly n log(n), and the sum up to N is a sum over the first N/log(N) primes. Of course the error terms in these approximations can kill you but this is good enough to discover that the dominant term in ln(p#) is indeed p. dave