OFFSET
0,1
COMMENTS
For n >= 1, k == 1 (mod 30). - Robert Israel, May 06 2015
LINKS
Tim Johannes Ohrtmann, Table of n, a(n) for n = 0..105
MAPLE
A[0]:= 4:
for n from 1 to 30 do
for k from 1 by 30 do
if andmap(isprime, map(`+`, [0, 2, 6, 8], 10^n+k)) then
A[n]:= k; break
fi;
od od:
seq(A[n], n=0..30); # Robert Israel, May 06 2015
MATHEMATICA
lpk[n_]:=Module[{k=1, x=10^n}, While[AnyTrue[x+ k+{0, 2, 6, 8}, CompositeQ], k++]; k]; Table[lpk[n], {n, 0, 15}] (* The program generates the first 16 terms of the sequence. *) (* Harvey P. Dale, Jun 18 2022 *)
PROG
(PARI) print1(4, ", "); n=0; until(n==100, n++; x=1; y=0; until(y==1, if(isprime(10^n+x), if(isprime(10^n+x+2), if(isprime(10^n+x+6), if(isprime(10^n+x+8), y++, x=x+30), x=x+30), x=x+30), x=x+30); if(y==1, print1(x, ", ")))) \\ Tim Johannes Ohrtmann, May 04 2015
(PARI) a(n)=if(n==0, return(4)); my(k=10^n+1); while(!isprime(k) || !isprime(k+2) || !isprime(k+6) || !isprime(k+8), k+=30); k-10^n \\ Charles R Greathouse IV, May 06 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Jason Earls, Aug 10 2006
STATUS
approved