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!)
A329251 Let P1 >= 3, P2, P3 be consecutive primes, with P3 - P2 = 2. a(n) = (P2 + P3)/12 for the first occurrence of (P2 - P1)/2 = n. 3
1, 2, 5, 0, 25, 87, 0, 325, 213, 0, 192, 758, 0, 500, 1158, 0, 1668, 5383, 0, 4217, 13130, 0, 15180, 4713, 0, 5955, 19583, 0, 66642, 17127, 0, 48108, 49485, 0, 28905, 171005, 0, 175530, 61838, 0, 314192, 76967, 0, 192637, 96147, 0, 812768, 708780, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Position of first occurrence of a gap of length P2 - P1 = 2*n containing no primes, immediately before the twin primes (P2,P3). To indicate impossible gaps of lengths 8, 14, 20, ..., a(3k+1) is set to 0 for all k >= 1.
LINKS
EXAMPLE
a(5) = 25 because the prime gap immediately before P2 = 25*6 - 1 = 149, P3 = 25*6 + 1 = 151 is the first such gap with length 2*n = 2*5 = 10. P2 - P1 = 149 - 139 =10.
MATHEMATICA
Module[{nn=500000, lst}, lst={(#[[2]]-#[[1]])/2, (#[[2]]+#[[3]])/12}&/@ Select[ Partition[Prime[Range[2, nn]], 3, 1], #[[3]]-#[[2]]==2&]; Table[ SelectFirst[ lst, #[[1]]==n&], {n, 50}]/.Missing["NotFound"]->{0, 0}] [[All, 2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 04 2020 *)
PROG
(PARI) my(v=vector(70), p1=3, p2=5, d); forprime(p3=7, 5e6, if(p3-p2==2, d=(p2-p1)/2; if(v[d]==0, v[d]=(p2+p3)/12)); p1=p2; p2=p3); v[1..49]
CROSSREFS
Sequence in context: A369629 A324611 A260327 * A062627 A011217 A078506
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Nov 10 2019
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 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)