OFFSET
1,2
LINKS
EXAMPLE
400 -> '110010000' with 3 binary ones and length = 9 = 3*3, therefore 400 is a term.
MAPLE
q:= n-> (l-> irem(nops(l), add(i, i=l))=0)(Bits[Split](n)):
select(q, [$1..200])[]; # Alois P. Heinz, Feb 04 2022
MATHEMATICA
lmnQ[n_]:=Module[{idn2=IntegerDigits[n, 2]}, Divisible[Length[idn2], Count[ idn2, 1]]]; Select[Range[200], lmnQ] (* Harvey P. Dale, Jul 27 2019 *)
PROG
(Perl)
$cnt=1; foreach $n(1..100_000){$_=sprintf ("%b", $n); print $cnt++, " $n\n" unless (length)%s/1//g; }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jul 26 2004
STATUS
approved