login
A096500
Let f(n) = smallest prime > n; a(n) = f(n+1) - f(n).
3
1, 2, 0, 2, 0, 4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 0, 6, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 0, 6, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 6, 0, 0, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 4, 0, 0, 0
OFFSET
1,2
FORMULA
From Antti Karttunen, Jan 03 2019: (Start)
a(n) = A151800(n+1) - A151800(n).
a(n) = A010051(1+n) * A001223(A000720(1+n)).
(End)
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);
A096500(n) = (A151800(1+n)-A151800(n)); \\ Antti Karttunen, Jan 03 2019
CROSSREFS
First differences of A151800.
Cf. also A109578.
Sequence in context: A240183 A112631 A158706 * A231563 A282849 A111813
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 09 2004
STATUS
approved