OFFSET
1,2
COMMENTS
Valus a(1) = 0 and a(2) = 4 are based on convention in Mathematica-language that PreviousPrime(1) = PreviousPrime(2) = -2. - Antti Karttunen, Jan 03 2019
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..100000
FORMULA
MAPLE
0, 4, seq(prevprime(n+1)-prevprime(n), n=3..150); # Muniru A Asiru, Jan 03 2019
MATHEMATICA
<<NumberTheory`NumberTheoryFunctions` Table[PreviousPrime[n+1]-PreviousPrime[n], {n, 1, 256}]
Differences[NextPrime[Range[110], -1]] (* Harvey P. Dale, Jul 09 2017 *)
PROG
(PARI)
A136548(n) = if(n<3, 1, precprime(n-1));
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 09 2004
STATUS
approved