login
A241485
Primes p such that p+2, p+222 and p+2222 are also prime.
4
17, 29, 59, 71, 281, 461, 827, 1151, 1277, 1289, 1487, 1667, 1877, 1931, 2687, 2789, 2801, 3359, 3557, 3851, 4049, 4229, 4259, 4481, 4649, 5417, 5519, 5657, 5867, 5879, 6089, 6131, 6299, 6359, 6779, 6791, 7127, 7211, 8291, 8837, 9719, 10067, 10937, 13397, 13679
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
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