home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!cbnewsd!att-out!pacbell.com!network.ucsd.edu!mvb.saic.com!unogate!beckman.com!dn66!a_rubin
- Newsgroups: sci.math
- Subject: Re: nth prime
- Message-ID: <a_rubin.716166518@dn66>
- From: a_rubin@dsg4.dse.beckman.com (Arthur Rubin)
- Date: 10 Sep 92 23:08:38 GMT
- References: <1992Sep10.190905.10741@waikato.ac.nz> <1992Sep10.164133.27763@infodev.cam.ac.uk>
- Nntp-Posting-Host: dn66.dse.beckman.com
- Lines: 20
-
- In <1992Sep10.164133.27763@infodev.cam.ac.uk> gjm11@cus.cam.ac.uk (G.J. McCaughan) writes:
-
- >In article <1992Sep10.190905.10741@waikato.ac.nz> bill@waikato.ac.nz writes:
-
- >>Sorry to ask such a FAQ, but what's the quickest algorithm to
- >>find the nth prime? Is it O(nlogn) or something else?
-
- >I think there is no way to get p_n exactly that's much better than
- >the good old sieve of Eratosthenes. So in sieving out multiples of 2
- ...
-
- This isn't quite correct. There is an integral for (the number of primes
- <= n) which takes o(n) to evaluate. (I don't know the exact order.) I'm
- pretty sure that the time to find the first n primes is about O(n log n),
- but you don't have to all n of them in order to find the n_th.
- --
- Arthur L. Rubin: a_rubin@dsg4.dse.beckman.com (work) Beckman Instruments/Brea
- 216-5888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal)
- My opinions are my own, and do not represent those of my employer.
- My interaction with our news system is unstable; please mail anything important.
-