login
A043356
Numbers having four 1's in base 5.
1
156, 656, 756, 776, 780, 782, 783, 784, 786, 791, 796, 806, 831, 856, 906, 1031, 1156, 1406, 2031, 2656, 3156, 3256, 3276, 3280, 3282, 3283, 3284, 3286, 3291, 3296, 3306, 3331, 3356, 3406, 3531, 3656, 3756, 3776, 3780
OFFSET
1,1
LINKS
MAPLE
F:= proc(d, m) option remember;
local A, B;
if m > d then return [] fi;
if d = 0 then return [0] fi;
A:= seq(seq(seq(t+i*5^(d-1), t=procname(dd, m)), dd = 0..d-1), i=2..4);
if m = 0 then [A]
else [seq(seq(t+5^(d-1), t=procname(dd, m-1)), dd=0..d-1), A]
fi
end proc:
map(op, [seq(F(d, 4), d=4..6)]); # Robert Israel, Jul 02 2018
PROG
(PARI) isok(n) = #select(x->(x==1), digits(n, 5)) == 4; \\ Michel Marcus, Jul 02 2018
CROSSREFS
Cf. A007091 (numbers in base 5).
Sequence in context: A250382 A106056 A259947 * A038476 A158550 A156994
KEYWORD
nonn,base
STATUS
approved