Re: [sage-support] find Nth prime with Sage

2014-04-07 Thread Szabolcs Horvát
Than you for the responses William and Andrew. William's idea does sound reasonable, I assumed Mathematica does something similar. The reason I needed this functionality was actually to verify something I computed using Mathematica (for my peace of mind). For now I will look at the

[sage-support] find Nth prime with Sage

2014-04-03 Thread Szabolcs Horvát
Hello, I'm quite new to Sage. Does it have any functionality that will easily compute the Nth prime and it's fast enough that it will work for N of the order 10^9 or 10^10 reasonable quickly (say, under 10 seconds)? pari.nth_prime(10) takes a very long time. Are there alternatives?

Re: [sage-support] find Nth prime with Sage

2014-04-03 Thread William Stein
On Wed, Apr 2, 2014 at 1:20 PM, Szabolcs Horvát szhor...@gmail.com wrote: Hello, I'm quite new to Sage. Does it have any functionality that will easily compute the Nth prime and it's fast enough that it will work for N of the order 10^9 or 10^10 reasonable quickly (say, under 10 seconds)?

Re: [sage-support] find Nth prime with Sage

2014-04-03 Thread William Stein
On Thu, Apr 3, 2014 at 11:52 AM, R. Andrew Ohana andrew.oh...@gmail.com wrote: Actually you only need the RH to prove that this method is reasonably fast. I don't think sage has Li^{-1} implemented, which is really what you need in order to implement this ( Li ~ pi, so Li^{-1} ~ pi^{-1} =

Re: [sage-support] find Nth prime with Sage

2014-04-03 Thread Andrew Ohana
Actually you should only need the RH to prove that this method is reasonably fast. I don't think sage has Li^{-1} implemented, which is really what you need in order to implement this (Li ~ pi, so Li^{-1} ~ pi^{-1} = nth_prime function). There has been some effort to include the open source