OFFSET
1,2
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..19705
MATHEMATICA
Function[t, 1 + Flatten[Map[Position[t, #] &, Union@ FoldList[Max, 0, t]] /. {} -> {{0}}]]@ Nest[Function[s, Block[{k = 1, id = IntegerDigits@ s[[-1]]}, While[MemberQ[s, k] || Intersection[id, IntegerDigits@ k] != {}, k++]; Append[s, k]]], {1}, 160] (* Michael De Vlieger, Feb 22 2017, after Robert G. Wilson v at A067581 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 08 2016
STATUS
approved