login
Each digit of a(n) appears in a(n+1) and a(n+1) > a(n) is minimal.
2

%I #13 Nov 22 2022 02:37:46

%S 0,10,100,101,102,120,201,210,1002,1012,1020,1021,1022,1023,1032,1203,

%T 1230,1302,1320,2013,2031,2103,2130,2301,2310,3012,3021,3102,3120,

%U 3201,3210,10023,10032,10123,10132,10203,10213,10223,10230,10231,10232,10233,10234,10243

%N Each digit of a(n) appears in a(n+1) and a(n+1) > a(n) is minimal.

%C Starting with another integer as 0 (the "seed") would lead to another sequence.

%H Michael S. Branicky, <a href="/A107411/b107411.txt">Table of n, a(n) for n = 0..10000</a>

%e After 100 we get 101 (and not 1000) because the lone 0 in "101" is considered as the copy of both zeros of "100".

%p R:= 0: S:= {0}: count:= 1;

%p for k from 1 while count < 100 do

%p Sk:= convert(convert(k,base,10),set);

%p if S subset Sk then

%p R:= R, k;

%p count:= count+1;

%p S:= Sk;

%p fi

%p od:

%p R; # _Robert Israel_, Nov 21 2022

%o (Python)

%o from itertools import islice

%o def agen(an=0):

%o while True:

%o yield an

%o target, k = set(str(an)), an + 1

%o while not (target <= set(str(k))): k += 1

%o an = k

%o print(list(islice(agen(), 41))) # _Michael S. Branicky_, Nov 21 2022

%Y Cf. A297065.

%K base,easy,nonn

%O 0,2

%A _Eric Angelini_, Jun 09 2005

%E Missing terms a(35)-a(37) inserted by _Michael S. Branicky_, Nov 21 2022