OFFSET
1,2
COMMENTS
The only fixed points are 1,2,3,99.
Starting from a(87)=89, every term must contain a 9.
First differences are bounded by -64 and 71.
EXAMPLE
a(7)=11 since the largest digit of a(4)=10 is 1, and 11 is the least positive integer at n=7 that contains 1.
MATHEMATICA
Nest[Append[#, Block[{k = 4, d}, While[Nand[FreeQ[#[[All, 1]], k], MemberQ[Set[d, IntegerDigits[k]], Max[#[[-3, -1]] ] ] ], k++]; {k, d}]] &, Transpose@ {#, IntegerDigits@ #} &@ Range[3], 71][[All, 1]] (* Michael De Vlieger, Apr 12 2018 *)
PROG
(PARI) firstTerms(m)={my(Seq:list=List([1, 2, 3]), z, cp, r, ok); cp=vector(10, u, u-1); for(i=4, m, z=vecmax(digits(Seq[i-3])); for(t=1, oo, forvec(y=vector(t, u, [1, #cp]), ok=0; for(j=1, t, if(cp[y[j]]==z, ok=1; break)); if(ok, r=fromdigits(vector(t, u, cp[y[u]])); for(w=1, #Seq, if(r==Seq[w], ok=0; break)); if(ok, listput(Seq, r); break(2)))))); return(Seq)} \\ R. J. Cano, Apr 14 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, Apr 06 2018
STATUS
approved