OFFSET
1,1
COMMENTS
All the terms in the sequence are congruent to 1 mod 3.
The constants in the definition (12, 1234 and 123456) are the concatenation of digits 1,2,3,4,5 and 6.
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..5077
EXAMPLE
a(1) = 127 is a prime: 127+12 = 139, 127+1234 = 1361 and 127+123456 = 123583 are also prime.
a(2) = 907 is a prime: 907+12 = 919, 907+1234 = 2141 and 907+123456 = 124363 are also prime.
MAPLE
KD:= proc() local a, b, d, e; a:= ithprime(n); b:=a+12; d:=a+1234; e:=a+123456; if isprime(b)and isprime(d)and isprime(e) then return (a) :fi; end: seq(KD(), n=1..15000);
MATHEMATICA
KD={}; Do[p=Prime[n]; If[PrimeQ[p+12]&&PrimeQ[p+1234]&&PrimeQ[p+123456], AppendTo[KD, p]], {n, 15000}]; KD
c=0; p=Prime[n]; Do[If[PrimeQ[p+12]&&PrimeQ[p+1234]&&PrimeQ[p+123456], c=c+1; Print[c, " ", p]], {n, 1, 5*10^6}]; (*b-file*)
PROG
(PARI) s=[]; forprime(p=2, 140000, if(isprime(p+12) && isprime(p+1234) && isprime(p+123456), s=concat(s, p))); s \\ Colin Barker, Apr 22 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Apr 21 2014
STATUS
approved