home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!pavo.csi.cam.ac.uk!camcus!gjm11
- From: gjm11@cus.cam.ac.uk (G.J. McCaughan)
- Newsgroups: sci.math
- Subject: Re: nth prime
- Message-ID: <1992Sep10.231742.573@infodev.cam.ac.uk>
- Date: 10 Sep 92 23:17:42 GMT
- References: <1992Sep10.190905.10741@waikato.ac.nz> <1992Sep10.164133.27763@infodev.cam.ac.uk>
- Sender: news@infodev.cam.ac.uk (USENET news)
- Organization: U of Cambridge, England
- Lines: 20
- Nntp-Posting-Host: apus.cus.cam.ac.uk
-
- In article <1992Sep10.164133.27763@infodev.cam.ac.uk>, gjm11@cus.cam.ac.uk (me) wrote:
-
- > I think there is no way to get p_n exactly that's much better than
- > the good old sieve of Eratosthenes.
-
- Ahem. As has been pointed out to me, this is quite false. There are quicker
- ways to calculate exactly the number of primes less than n (there's a method
- due to Legendre that takes time about n^(2/3), and the person who pointed out
- my mistake thinks there may be a method that takes only n^(3/5)), and then
- [this is what I missed!] you can do a binary search thing, which is going to
- take not more than about log n iterations of the prime-counting procedure.
- So, YES: you can calculate the n'th prime in time about n^t, for some t which
- might be as small as 3/5 but is certainly no worse than 2/3. ("About" here
- means that you can do it in time O(n^(t+epsilon)) whenever epsilon>0, if
- you're being picky.)
-
- I can probably find a reference to the Legendre method if you want.
- --
- Gareth McCaughan Dept. of Pure Mathematics & Mathematical Statistics,
- gjm11@cus.cam.ac.uk Cambridge University, England. [Research student]
-