login
Numbers whose base-4 representation contains exactly four 0's and three 3's.
1

%I #14 Sep 22 2024 18:14:12

%S 12303,12339,12348,12483,12492,12528,13059,13068,13104,13248,15363,

%T 15372,15408,15552,16128,16447,16591,16627,16636,17167,17203,17212,

%U 17347,17356,17392,19471,19507,19516,19651,19660

%N Numbers whose base-4 representation contains exactly four 0's and three 3's.

%H Robert Israel, <a href="/A045084/b045084.txt">Table of n, a(n) for n = 1..10000</a>

%p Res:= NULL:

%p for d from 7 to 8 do

%p for i from 0 to d-7 do

%p L:= [0$4, 3$3, 1$i,2$(d-7-i)];

%p P:= remove(t -> t[-1]=0, combinat:-permute(L));

%p Res:= Res,op(map(t -> add(t[i]*4^(i-1),i=1..d), P));

%p od od:

%p sort([Res]); # _Robert Israel_, Feb 27 2018

%t Select[Range[20000],DigitCount[#,4,0]==4&&DigitCount[#,4,3]==3&] (* _Harvey P. Dale_, Sep 22 2024 *)

%Y Cf. A007090.

%K nonn,base

%O 1,1

%A _Clark Kimberling_