OFFSET
1,2
COMMENTS
Once the digit 9 is introduced in a(82)=89, all following terms must contain a 9.
The sequence contains no fixed points.
Analog sequence formed by taking the smallest digit from a(n-1) is A011540.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..3000
MATHEMATICA
a[n_] := a[n] = Block[{k = 1, s = Union[ IntegerDigits[ a[n -1]]][[-1]], t = Array[a, n - 1]}, While[ MemberQ[t, k] || !MemberQ[ IntegerDigits@ k, s], k++]; k]; a[1] = 0; Array[a, 72] (* Robert G. Wilson v, Dec 30 2017 *)
Nest[Append[#, Block[{m = Max@ IntegerDigits@ Last@ #, k}, k = m; While[Nand[FreeQ[#, k], MemberQ[IntegerDigits[k], m]], k++]; k]] &, {0}, 84] (* Michael De Vlieger, Dec 30 2017 *)
PROG
(PARI) first(n) = my(res = vector(n)); for(x=2, n, if(x == 2, res[x] = 10, for(i=1, +oo, if(!setsearch(Set(res), i) && setsearch(Set(digits(i)), vecmax(digits(res[x-1]))), res[x] = i; break())))); res \\ Iain Fox, Dec 31 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, Dec 29 2017
STATUS
approved