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!)
A096501 Difference between primes preceding n+1 and n. 3

%I #17 Feb 23 2024 13:08:49

%S 0,4,1,0,2,0,2,0,0,0,4,0,2,0,0,0,4,0,2,0,0,0,4,0,0,0,0,0,6,0,2,0,0,0,

%T 0,0,6,0,0,0,4,0,2,0,0,0,4,0,0,0,0,0,6,0,0,0,0,0,6,0,2,0,0,0,0,0,6,0,

%U 0,0,4,0,2,0,0,0,0,0,6,0,0,0,4,0,0,0,0,0,6,0,0,0,0,0,0,0,8,0,0,0,4,0,2,0,0

%N Difference between primes preceding n+1 and n.

%C Valus a(1) = 0 and a(2) = 4 are based on convention in Mathematica-language that PreviousPrime(1) = PreviousPrime(2) = -2. - _Antti Karttunen_, Jan 03 2019

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

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

%F For n > 2, a(n) = A010051(n) * A001223(A000720(n)-1) = A136548(1+n)-A136548(n). - _Antti Karttunen_, Jan 03 2019

%p 0,4,seq(prevprime(n+1)-prevprime(n),n=3..150); # _Muniru A Asiru_, Jan 03 2019

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

%t Differences[NextPrime[Range[110],-1]] (* _Harvey P. Dale_, Jul 09 2017 *)

%o (PARI)

%o A136548(n) = if(n<3,1,precprime(n-1));

%o A096501(n) = if(2==n,4,A136548(1+n)-A136548(n)); \\ _Antti Karttunen_, Jan 03 2019

%Y Cf. A000720, A001223, A010051, A096500, A136548, A151799, A175851.

%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 March 29 03:51 EDT 2024. Contains 371264 sequences. (Running on oeis4.)