login
This site is supported by donations 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

Antti Karttunen, Table of n, a(n) for n = 1..20000

Antti Karttunen, Data supplement: n, a(n) computed for n = 1..100000

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

Cf. A000720, A001223, A010051, A096501, A175851.

First differences of A151800.

Cf. also A109578.

Sequence in context: A240183 A112631 A158706 * A231563 A282849 A111813

Adjacent sequences:  A096497 A096498 A096499 * A096501 A096502 A096503

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 21 22:01 EDT 2019. Contains 325205 sequences. (Running on oeis4.)