This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A107780 #12 Jan 22 2020 02:54:25 %S A107780 9,19,1,10,0,20,2,12,11,13,3,23,21,14,4,24,22,25,5,15,16,6,26,27,7,17, %T A107780 18,8,28,29,32,30,31,33,34,35,36,37,38,39,43,40,41,42,44,45,46,47,48, %U A107780 49,54,50,51,52,53,55,56,57,58,59,65,60,61,62,63,64,66,67,68,69,76,70 %N A107780 a(1)=9, a(n) = smallest integer not previously used which contains a digit from a(n-1). %H A107780 Robert Israel, <a href="/A107780/b107780.txt">Table of n, a(n) for n = 1..10000</a> %p A107780 S:= [$0..100]: %p A107780 Res:= 9: S:= subs(9=NULL,S): %p A107780 digs:= {9}: %p A107780 while S <> [] do %p A107780 found:= false; %p A107780 for i from 1 to nops(S) while not found do %p A107780 ndigs:= convert(convert(S[i],base,10),set); %p A107780 if ndigs intersect digs <> {} then %p A107780 found:= true; %p A107780 Res:=Res, S[i]; %p A107780 S:= subsop(i=NULL, S); %p A107780 digs:= ndigs; %p A107780 fi %p A107780 od; %p A107780 if not found then break fi; %p A107780 od: %p A107780 Res; # _Robert Israel_, Jan 22 2020 %t A107780 f[l_] := Block[{c = 0}, While[ MemberQ[l, c] || Intersection @@ IntegerDigits /@{Last[l], c}=={}, c++ ];Return[Append[l, c]]];Nest[f, {9}, 70] (* _Ray Chandler_, Jul 19 2005 *) %Y A107780 Cf. A107353 a(1)=0, A107772 a(1)=1, A107773 a(1)=2, A107774 a(1)=3, A107775 a(1)=4, A107776 a(1)=5, A107777 a(1)=6, A107778 a(1)=7, A107779 a(1)=8, A107781 a(1)=10. %K A107780 base,nonn %O A107780 1,1 %A A107780 _Eric Angelini_ & _Zak Seidov_, May 24 2005