[seqfan] Re: A058054
Hans Havermann
gladhobo at teksavvy.com
Thu Jul 24 04:19:43 CEST 2014
Frank Adams-Watters:
> If p is a prime, there is some ambiguity as to whether prevprime(p) is p, or the prime before p. (Similarly for nextprime, of course.) PARI definitely returns p for these; I think Mathematica does, too.
In Mathematica, NextPrime[n] is strictly the prime above n. PreviousPrime[n] was a Mathematica add-on once upon a time. It was never built-in, which is why you see it user-defined in OEIS Mathmatica code that implements it.
More information about the SeqFan
mailing list