OFFSET
1,1
FORMULA
a(n)=NextPrime[p(n)+p(n+1)]-PreviousPrime[p(n)+p(n+1)]
EXAMPLE
n=8, p(8)+p(9)=19+23=42,a[8]=43-41=2=a(8).
MATHEMATICA
<<NumberTheory`NumberTheoryFunctions` t1=Table[PreviousPrime[Prime[n]+Prime[n+1]], {n, 1, 128}]; t2=Table[NextPrime[Prime[n]+Prime[n+1]], {n, 1, 128}]; t2-t1
NextPrime[#]-NextPrime[#, -1]&/@(Total/@Partition[Prime[Range[100]], 2, 1]) (* Harvey P. Dale, Mar 07 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 17 2004
STATUS
approved