

A105413


Numbers p(n) such that both p(n)+2 and p(n+6)2 are prime numbers, where p(n) is the nth prime.


2



3, 11, 107, 239, 311, 569, 1019, 1031, 1229, 1427, 1997, 2081, 2087, 2111, 2687, 3251, 4049, 4127, 4157, 4229, 4241, 4481, 5231, 5639, 6089, 7307, 7559, 8969, 9629, 10007, 10457, 13691, 13829, 13901, 14249, 14549, 14561, 16187, 16649, 17207
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Conjecture: There are an infinite number of primes p(n) such that p(n)+2 and p(n+k)2 are both prime for all k > 1.


LINKS



EXAMPLE

prime(5)=11, and both prime(5)+2=13 and prime(5+6)2=29 are prime, so 11 is in the sequence.


MATHEMATICA

For[n = 1, n < 500, n++, If[PrimeQ[Prime[n] + 2], If[PrimeQ[Prime[n + 6]  2], Print[Prime[n]]]]] (* Stefan Steinerberger, Feb 07 2006 *)
Transpose[Select[Partition[Prime[Range[2000]], 7, 1], #[[2]]#[[1]] == #[[7]] #[[6]] == 2&]][[1]] (* Harvey P. Dale, Oct 08 2014 *)


PROG

(PARI) pnpk(n, m=6, k=2) = { local(x, v1, v2); for(x=1, n, v1 = prime(x)+ k; v2 = prime(x+m)k; if(isprime(v1)&isprime(v2), print1(prime(x), ", ") ) ) ; } \\ corrected by Michel Marcus, Sep 14 2015
(Magma) [NthPrime(n): n in [1..2000]  IsPrime(NthPrime(n)+2) and IsPrime(NthPrime(n+6)2)]; // Vincenzo Librandi, Sep 14 2015


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



