login
A352778
Numbers k such that w(k + w(k)) > w(k), where w(k) is the binary weight of k, A000120(k).
0
2, 4, 5, 8, 9, 12, 16, 17, 20, 24, 26, 27, 28, 32, 33, 36, 40, 42, 43, 44, 48, 50, 51, 52, 56, 57, 58, 64, 65, 68, 72, 74, 75, 76, 80, 82, 83, 84, 88, 89, 90, 96, 98, 99, 100, 104, 105, 106, 112, 113, 114, 118, 120, 121, 122, 128, 129, 132, 136, 138, 139, 140, 144, 146, 147, 148, 152, 153, 154, 160, 162, 163, 164
OFFSET
1,1
FORMULA
k : A000120(A092391(k)) > A000120(k); A348367(k) > A000120(k).
EXAMPLE
k = 17; A000120(17 + A000120(17)) > A000120(17), thus k = 17 is a term.
MATHEMATICA
w[n_] := DigitCount[n, 2, 1]; Select[Range[200], w[# + w[#]] > w[#] &] (* Amiram Eldar, Apr 02 2022 *)
PROG
(Python)
def w(n): return bin(n).count("1")
def ok(n): wn = w(n); return w(n + wn) > wn
print([k for k in range(165) if ok(k)]) # Michael S. Branicky, Apr 02 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Ctibor O. Zizka, Apr 02 2022
STATUS
approved