login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 08:14 EDT 2024. Contains 371905 sequences. (Running on oeis4.)