OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
F:= proc(d, z) option remember;
if d = 0 then if z = 0 then return [0] else return [] fi fi;
[`if`(z>0, op(procname(d-1, z-1)), NULL),
op(map(`+`, procname(d-1, z), 3^(d-1))),
op(map(`+`, procname(d-1, z), 2*3^(d-1)))]
end proc:
f:= proc(d)
op(map(`+`, F(d-1, 3), 3^(d-1))),
op(map(`+`, F(d-1, 3), 2*3^(d-1)))
end proc:
seq(f(d), d=4..6); # Robert Israel, Mar 22 2023
MATHEMATICA
Select[Range[400], DigitCount[#, 3, 0]==3&] (* Harvey P. Dale, Jan 18 2015 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved