OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..400
MAPLE
A[1]:= 8: A[2]:= 9: x:= 89:
for n from 3 to 100 do
for y from A[n-1] by 2 do
z:= x*10^(1+ilog10(y))+y;
if isprime(z) then break fi;
od:
A[n]:= y;
x:= z;
od:
seq(A[i], i=1..100); # Robert Israel, May 30 2018
MATHEMATICA
a[1] = 8; a[n_] := a[n] = Block[{k = a[n - 1], c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k ++ ]; k]; Table[ a[n], {n, 47}] (* Robert G. Wilson v, Aug 05 2005 *)
nxt[{jp_, a_}]:=Module[{k=a}, While[CompositeQ[jp 10^IntegerLength[k]+k], k++]; {jp 10^IntegerLength[k]+ k, k}]; NestList[nxt, {8, 8}, 50][[;; , 2]] (* Harvey P. Dale, Apr 10 2024 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, May 15 1998
STATUS
approved