%I #32 Nov 08 2016 22:20:19
%S 11,22,33,44,55,66,77,88,99,100,111,21,31,41,51,61,71,81,91,200,112,
%T 222,32,42,52,62,72,82,92,300,113,223,333,43,53,63,73,83,93,400,114,
%U 224,334,444,54,64,74,84,94,500,115,225,335,445,555,65,75,85,95,600,116,226,336,446,556,666,76,86,96,700
%N Next larger number having the same digits as n.
%C This sequence can be used to find terms of A276633. Each number in base 10 can have 1024 sets of digits, either {0}, {1}, ..., or {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Some occur once or never in A276633. For each such set the least number having its digits can be chosen. Then from that set put the next higher number having the digits only of that set.
%H Robert Israel, <a href="/A276769/b276769.txt">Table of n, a(n) for n = 1..10000</a>
%e No number between (exclusive) 31 and 113 has the digits of 31; {1, 3}. 113 has. Therefore, a(31) = 113.
%p N:= 1000: # to get a(1)..a(m-1) where a(m) is the first term > N
%p for s in combinat:-powerset({$0..9}) do R[s]:= NULL od:
%p for n from 1 to N do
%p s:= convert(convert(n,base,10),set);
%p R[s]:= R[s], n;
%p if R[s] <> n then A[R[s][-2]]:= n fi
%p od:
%p seq(A[i],i=1..min(remove(t-> A[t]::integer, [$1..N]))-1); # _Robert Israel_, Nov 08 2016
%o (PARI) a(n) = {my(m=vecsort(digits(n), ,8), i = n+1); while(vecsort(digits(i), ,8)!=m,i++); i}
%Y Cf. A276633.
%K nonn,base,easy,look
%O 1,1
%A _David A. Corneth_, Sep 20 2016