OFFSET
1,1
COMMENTS
The constants in the definition (6, 666 and 6666) are concatenations of the digit 6.
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10000
EXAMPLE
a(2) = 53 is a prime: 53+6 = 59, 53+666 = 719 and 53+6666 = 6719 are also prime.
a(3) = 67 is a prime: 67+6 = 73, 67+666 = 733 and 67+6666 = 6733 are also prime.
MAPLE
KD:= proc() local a, b, d, e; a:= ithprime(n); b:=a+2; d:=a+222; e:=a+2222; if isprime(b)and isprime(d)and isprime(e) then return (a) :fi; end: seq(KD(), n=1..5000);
MATHEMATICA
KD = {}; Do[p = Prime[n]; If[PrimeQ[p + 6] && PrimeQ[p + 666] && PrimeQ[p + 6666], AppendTo[KD, p]], {n, 5000}]; KD
(*For the b-file*) c = 0; p = Prime[n]; Do[If[PrimeQ[p + 6] && PrimeQ[p + 666] && PrimeQ[p + 6666], c = c + 1; Print[c, " ", p]], {n, 1, 2*10^6}];
PROG
(PARI) s=[]; forprime(p=2, 6000, if(isprime(p+6) && isprime(p+666) && isprime(p+6666), s=concat(s, p))); s \\ Colin Barker, Apr 25 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Apr 23 2014
STATUS
approved