login
A348368
Numbers k such that w(k + w(k)) < w(k), where w(k) is the binary weight of k, A000120(k).
1
6, 7, 13, 14, 15, 21, 29, 30, 31, 37, 45, 46, 47, 55, 59, 60, 61, 62, 63, 69, 77, 78, 79, 87, 91, 92, 93, 94, 95, 103, 107, 108, 109, 111, 115, 123, 124, 125, 126, 127, 133, 141, 142, 143, 151, 155, 156, 157, 158, 159, 167, 171, 172, 173, 175, 179, 187, 188, 189
OFFSET
1,1
LINKS
FORMULA
k : A000120(A092391(k)) < A000120(k); A348367(k) < A000120(k).
EXAMPLE
k = 91; A000120(91 + A000120(91)) < A000120(91), thus k = 91 is a term.
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