OFFSET
1,1
COMMENTS
All the terms in the sequence are congruent to 2 mod 3.
The constants in the definition (2, 222 and 2222) are the concatenation of digit 2.
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 17 is a prime: 17+2 = 19, 17+222 = 239 and 17+2222 = 2239 are also prime.
a(2) = 29 is a prime: 29+2 = 31, 29+222 = 251 and 29+2222 = 2251 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+2]&&PrimeQ[p+222]&&PrimeQ[p+2222], AppendTo[KD, p]], {n, 5000}]; KD
(*For b-file*) c=0; p=Prime[n]; Do[If[PrimeQ[p+2]&&PrimeQ[p+222]&&PrimeQ[p+2222], c=c+1; Print[c, " ", p]], {n, 1, 3*10^6}];
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Apr 23 2014
STATUS
approved