login
A105410
Numbers k such that prime(k)-2 and prime(k+3)-2 are both primes.
6
3, 8, 11, 18, 50, 58, 114, 174, 207, 210, 213, 254, 263, 266, 316, 321, 344, 396, 406, 461, 493, 496, 499, 543, 556, 582, 614, 626, 644, 724, 727, 741, 847, 932, 1099, 1102, 1118, 1121, 1233, 1236, 1261, 1285, 1443, 1616, 1619, 1640, 1705, 1710, 1783, 1792
OFFSET
1,1
LINKS
MATHEMATICA
Select[Range[2000], PrimeQ[Prime[#]-2]&&PrimeQ[Prime[#+3]-2]&] (* Harvey P. Dale, Jun 02 2011 *)
PROG
(PARI) pnpk(n, m=3, 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(x, ", ") ) ) ; } \\ corrected by Amiram Eldar, Oct 04 2024
(PARI) lista(pmax) = {my(k = 1, p = primes(5)); forprime(p1 = p[#p], pmax, k++; p[#p] = p1; if(p[2]- p[1] == 2 && p[5] - p[4] == 2, print1(k, ", ")); for(i = 1, #p-1, p[i] = p[i+1])); } \\ Amiram Eldar, Oct 04 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, May 02 2005
EXTENSIONS
Offset corrected by Amiram Eldar, Oct 04 2024
STATUS
approved