[seqfan] Re: A058054

Frank Adams-Watters franktaw at netscape.net
Thu Jul 24 03:52:50 CEST 2014


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.

Franklin T. Adams-Watters

-----Original Message-----
From: Max Alekseyev <maxale at gmail.com>
To: Sequence Fanatics Discussion list <seqfan at list.seqfan.eu>
Sent: Wed, Jul 23, 2014 8:17 pm
Subject: [seqfan] Re: A058054


I suggest to remove A058054(1) as undefined and start with offset 2.

Regards,
Max


On Wed, Jul 23, 2014 at 8:41 PM, Hans Havermann <gladhobo at teksavvy.com> 
wrote:
> https://oeis.org/A058054
> nextprime(n!)-prevprime(n!).
>
> "For n!=1,2,6,24,120 nextprime(n!)=2,3,7,29,127 while 
prevprime(n!)=-2,2,5,23,113
so their difference is: a(n)=4,0,2,6,14,.."
> Formula: a(n) = A037151(n) - A006990(n)]
>
> The name and formula are at odds over the first two terms. To get 
a(1) we
cannot use the formula because A006990(1) is undefined. So the author 
uses the
name and suggests prevprime(1!) = -2. But then for a(2) he ignores the 
name,
because prevprime(2!) = -2 as well, not 2, (yielding a difference of 
5), and
relies instead on the formula. But doesn't subtract correctly!
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/

_______________________________________________

Seqfan Mailing list - http://list.seqfan.eu/


  



More information about the SeqFan mailing list