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!)
A237057 a(n) = smallest prime > a(n-1) such that a(n)+4n is also prime. 1
2, 3, 5, 7, 13, 17, 19, 31, 41, 43, 61, 83, 89, 97, 101, 103, 109, 113, 127, 151, 191, 193, 223, 239, 241, 283, 293, 311, 331, 347, 359, 367, 419, 431, 433, 461, 463, 499, 509, 521, 523, 563, 571, 601, 647, 659, 673, 719, 727, 733, 797, 809, 811, 821, 823, 829 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Many twin primes belong to the sequence, for example (41, 43) and (191, 193).

Many consecutive primes also appear such as (13, 17) and (83, 89).

LINKS

Harvey P. Dale, Table of n, a(n) for n = 0..1000

EXAMPLE

a(5)=17 since 17+4*5=17+20=37 is prime. 11+4*4=27 is not prime, so 11 is not in the sequence.

MATHEMATICA

nxt[{n_, p_}]:=Module[{np=NextPrime[p]}, While[!PrimeQ[np+4(n+1)], np = NextPrime[ np]]; {n+1, np}]; Transpose[NestList[nxt, {0, 2}, 60]][[2]] (* Harvey P. Dale, Feb 26 2015 *)

PROG

(PARI) a237057(maxp) = {my(a=[2], n=1); forprime(p=3, maxp, if(isprime(p+4*n), n++; a=concat(a, p)));  a} \\ Colin Barker, Feb 12 2014

CROSSREFS

Cf. A108184.

Sequence in context: A038903 A136003 A215799 * A183073 A123856 A336721

Adjacent sequences:  A237054 A237055 A237056 * A237058 A237059 A237060

KEYWORD

nonn

AUTHOR

Carmine Suriano, Feb 03 2014

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 January 19 21:55 EST 2022. Contains 350466 sequences. (Running on oeis4.)