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

%I #21 Jan 04 2019 09:03:26

%S 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,

%T 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,

%U 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

%N Let f(n) = smallest prime > n; a(n) = f(n+1) - f(n).

%H Antti Karttunen, <a href="/A096500/b096500.txt">Table of n, a(n) for n = 1..20000</a>

%H Antti Karttunen, <a href="/A096500/a096500.txt">Data supplement: n, a(n) computed for n = 1..100000</a>

%F From _Antti Karttunen_, Jan 03 2019: (Start)

%F a(n) = A151800(n+1) - A151800(n).

%F a(n) = A010051(1+n) * A001223(A000720(1+n)).

%F (End)

%p seq(nextprime(n+1)-nextprime(n),n=1..250); # _Muniru A Asiru_, Jan 03 2019

%t <<NumberTheory`NumberTheoryFunctions` Table[NextPrime[n+1]-NextPrime[n], {n, 1, 256}]

%t (* Second program: *)

%t Abs[Subtract @@ #] & /@ Partition[Array[NextPrime, 105], 2, 1] (* _Michael De Vlieger_, Jan 03 2019 *)

%o (PARI)

%o A151800(n) = nextprime(1+n);

%o A096500(n) = (A151800(1+n)-A151800(n)); \\ _Antti Karttunen_, Jan 03 2019

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

%Y First differences of A151800.

%Y Cf. also A109578.

%K nonn

%O 1,2

%A _Labos Elemer_, Jul 09 2004

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 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)