Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Feb 12 2021 21:39:42
%S 1,2,3,6,7,15,16,30,33,34,57,60,61,69,70,138,141,142,150,151,273,276,
%T 277,300,303,304,312,313,516,519,520,543,546,547,555,556,624,627,628,
%U 636,637,1245,1248,1249,1272,1275,1276,1284,1285,1353,1356,1357,1365
%N Numbers whose base-3 representation Sum_{i=0..m} d(i)*3^i has d(0) < d(1) > d(2) < ...
%H Robert Israel, <a href="/A032882/b032882.txt">Table of n, a(n) for n = 1..10000</a>
%p f:= proc(L,d) option remember; local i;
%p if d::even then seq([op(L),i],i=L[-1]+1..2)
%p else seq([op(L),i],i=0..L[-1]-1)
%p fi
%p end proc:
%p S[1]:= {[0],[1],[2]}:
%p for d from 2 to 10 do S[d]:= map(f,S[d-1],d) od:
%p A:= {}:
%p for d from 1 to 10 do
%p A:= A union map(proc(L) local i; add(L[i]*3^(i-1),i=1..nops(L)) end proc, select(L -> L[-1]>0, S[d]))
%p od:
%p sort(convert(A,list)); # _Robert Israel_, Jan 05 2021
%K nonn,base
%O 1,2
%A _Clark Kimberling_