login
A107859
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
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, 19, 32, 34, 33, 22, 7, 26, 41, 50, 27, 36, 28, 29, 51, 37, 38, 61, 39, 42, 43, 8, 46, 71, 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
OFFSET
0,3
COMMENTS
Case a(1)=1,a(2)=0, A107860.
MATHEMATICA
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
CROSSREFS
Cf. A107860.
Sequence in context: A023916 A297353 A172503 * A294069 A249585 A067524
KEYWORD
nonn,base
AUTHOR
Eric Angelini & Zak Seidov, May 25 2005
STATUS
approved