OFFSET
1,1
COMMENTS
Conjecture: There are infinitely many primes p(k) such that p(k)-2 and p(k+m)-2 are both primes for all m > 1.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
EXAMPLE
p(8)-2 = 17, p(8+6)-2 = 41, both prime, 17 is in the sequence.
MATHEMATICA
For[n = 1, n < 500, n++, If[PrimeQ[Prime[n] + 2], If[PrimeQ[Prime[n + 7] - 2], Print[Prime[n]]]]] (* Stefan Steinerberger, Feb 07 2006 *)
Select[Prime[Range[1500]], AllTrue[{#+2, Prime[PrimePi[#]+7]-2}, PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 05 2019 *)
PROG
(PARI) pnpk(n, m=7, 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(v1-k, ", ") ) ) ; } \\ corrected by Amiram Eldar, Oct 04 2024
(PARI) lista(pmax) = {my(k = 1, p = primes(8)); forprime(p1 = p[#p], pmax, k++; p[#p] = p1; if(p[2]- p[1] == 2 && p[8] - p[7] == 2, print1(p[1], ", ")); for(i = 1, #p-1, p[i] = p[i+1])); } \\ Amiram Eldar, Oct 04 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, May 02 2005
STATUS
approved