OFFSET
1,2
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
seq(nextprime(n+1)-nextprime(n), n=1..250); # Muniru A Asiru, Jan 03 2019
MATHEMATICA
<<NumberTheory`NumberTheoryFunctions` Table[NextPrime[n+1]-NextPrime[n], {n, 1, 256}]
(* Second program: *)
Abs[Subtract @@ #] & /@ Partition[Array[NextPrime, 105], 2, 1] (* Michael De Vlieger, Jan 03 2019 *)
PROG
(PARI)
A151800(n) = nextprime(1+n);
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 09 2004
STATUS
approved