OFFSET
1,1
EXAMPLE
a(5) = 19 and the number 4191119 is a prime.
MATHEMATICA
a[1] = 4; a[n_] := a[n] = Block[{k = 1, c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k += 2]; k]; Table[ a[n], {n, 63}] (* Robert G. Wilson v, Aug 05 2005 *)
nxt[{jxt_, a_}]:=Module[{n=1}, While[CompositeQ[jxt*10^IntegerLength[n]+n], n++]; {jxt*10^IntegerLength[ n]+n, n}]; NestList[nxt, {4, 4}, 70][[;; , 2]] (* Harvey P. Dale, Oct 06 2023 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Mar 26 2002
EXTENSIONS
More terms from Jason Earls, Jun 13 2002
STATUS
approved