OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
q:= n-> (wt-> is(wt(n+wt(n))<wt(n)))(k-> add(i, i=Bits[Split](k))):
select(q, [$0..200])[]; # Alois P. Heinz, Oct 15 2021
MATHEMATICA
h[n_] := DigitCount[n, 2, 1]; q[n_] := h[n + (hn = h[n])] < hn; Select[Range[200], q] (* Amiram Eldar, Oct 15 2021 *)
PROG
(Python)
def h(n): return bin(n).count('1')
def ok(n): return h(n + h(n)) < h(n)
print(list(filter(ok, range(1, 190)))) # Michael S. Branicky, Oct 15 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Ctibor O. Zizka, Oct 15 2021
STATUS
approved