OFFSET
1,1
COMMENTS
All the terms in the sequence are congruent to 2 mod 3.
The constants in the definition (8, 888 and 8888) are the concatenation of digit 8.
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 53 is a prime: 53+8 = 61, 53+888 = 941 and 53+8888 = 8941 are also prime.
a(2) = 263 is a prime: 263+8 = 271, 263+888 = 1151 and 263+8888 = 9151 are also prime.
MAPLE
KD:= proc() local a, b, d, e; a:= ithprime(n); b:=a+8; d:=a+888; e:=a+8888; 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 + 8] && PrimeQ[p + 888] && PrimeQ[p + 8888], AppendTo[KD, p]], {n, 5000}]; KD
(*For the b-file*) c = 0; p = Prime[n]; Do[If[PrimeQ[p + 8] && PrimeQ[p + 888] && PrimeQ[p + 8888], c = c + 1; Print[c, " ", p]], {n, 1, 5*10^6}];
Select[Prime[Range[2500]], AllTrue[#+{8, 888, 8888}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 31 2017 *)
PROG
(PARI) s=[]; forprime(p=2, 18000, if(isprime(p+8) && isprime(p+888) && isprime(p+8888), s=concat(s, p))); s \\ Colin Barker, Apr 25 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Apr 23 2014
STATUS
approved