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
KEYWORD
nonn
AUTHOR
Carmine Suriano, Feb 03 2014
STATUS
approved