OFFSET
0,1
COMMENTS
Second-to-last (= third from right) digit of p is not allowed to be zero: e.g., after a(37)=307 we do not use 3079 because then next term must start with 079 which is not possible, hence a(38)=30703.
LINKS
Zak Seidov, Table of n,a(n) for n=0..1000
MATHEMATICA
s={113}; id2={1, 1, 3}; Do[Do[p=Prime[k]; If[FreeQ[s, p], idp=IntegerDigits[p];
If[id2==Take[idp, 3]&&idp[[ -3]]>0, AppendTo[s, p]; id2=Take[idp, -3]; Break[]]], {k, 31, 10^7}], {1000}]; s
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Aug 09 2010
STATUS
approved