login
Take the sequence bb with two integer "seeds", e.g. a(1)=0, a(2)=1 and the relating list cc consisting of all digits of bb, e.g. cc={0,1}. Take n=3, calculate d=abs[cc(n-1)-cc(n-2)] = abs(2-3)=1; then next term of bb, a(n), is the smallest "new" (not in bb) number containing digit d, e.g. a(3)=10 => bb={0,1,10} and cc={0,1,1,0}; we proceed: n=4, d = 0, a(4)=20, bb={0,1,10,20}, cc={0,1,1,0,2,0}, n=5, d = 1, a(5)=11, bb={0,1,10,20,11}, cc={0,1,1,0,2,0,1,1}, etc.
1

%I #5 Mar 31 2012 13:46:52

%S 0,1,10,20,11,2,12,13,30,14,15,16,17,21,40,3,18,23,31,4,24,5,25,6,35,

%T 19,32,34,33,22,7,26,41,50,27,36,28,29,51,37,38,61,39,42,43,8,46,71,

%U 81,91,100,60,101,70,45,52,44,62,53,47,54,72,55,48,63,49,56,64,57,74,84,82,94

%N Take the sequence bb with two integer "seeds", e.g. a(1)=0, a(2)=1 and the relating list cc consisting of all digits of bb, e.g. cc={0,1}. Take n=3, calculate d=abs[cc(n-1)-cc(n-2)] = abs(2-3)=1; then next term of bb, a(n), is the smallest "new" (not in bb) number containing digit d, e.g. a(3)=10 => bb={0,1,10} and cc={0,1,1,0}; we proceed: n=4, d = 0, a(4)=20, bb={0,1,10,20}, cc={0,1,1,0,2,0}, n=5, d = 1, a(5)=11, bb={0,1,10,20,11}, cc={0,1,1,0,2,0,1,1}, etc.

%C Case a(1)=1,a(2)=0, A107860.

%t id[t_]:=IntegerDigits[t];bb={0, 1};cc={0, 1};Do[Do[d=Abs[cc[[k]]-cc[[k+1]]];If[MemberQ[id[m], d]&&!MemberQ[bb, m], bb=Append[bb, m];cc=Flatten[{cc, id[m]}];Break[]], {m, 1, 1000}], {k, 1, 100}];bb

%Y Cf. A107860.

%K nonn,base

%O 0,3

%A _Eric Angelini_ & _Zak Seidov_, May 25 2005