OFFSET
1,1
REFERENCES
A. Murthy, Smar. Notions J. Vol. 11, N. 1-2-3 Spring 2000
LINKS
Paul Zimmermann, Table of n, a(n) for n = 1..1127 [First 200 terms from T. D. Noe]
EXAMPLE
The 6th term of the sequence is 23 because that is smallest prime that when concatenated with previous terms 2, 3, 3, 3, 3, produces a prime (2333323).
MATHEMATICA
nxt[{lst_, n_}]:=Module[{id=IntegerDigits[lst], np=2}, While[ !PrimeQ[ FromDigits[ Join[id, IntegerDigits[np]]]], np=NextPrime[np]]; {FromDigits[ Join[id, IntegerDigits[np]]], np}]; Transpose[NestList[nxt, {2, 2}, 60]] [[2]] (* Harvey P. Dale, May 25 2015 *)
nxt[{l_, a_}]:=Module[{k=2}, While[CompositeQ[l*10^IntegerLength[k]+ k], k= NextPrime[ k]]; {l*10^IntegerLength[k]+k, k}]; NestList[nxt, {2, 2}, 60][[All, 2]] (* Harvey P. Dale, Aug 09 2020 *)
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
Felice Russo, Dec 15 1999
EXTENSIONS
Extended by T. D. Noe, May 01 2010
STATUS
approved