A241485 Primes p such that p+2, p+222 and p+2222 are also prime.
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
Keywords
Examples
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.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..10000
Programs
-
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}];
Comments