cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A352778 Numbers k such that w(k + w(k)) > w(k), where w(k) is the binary weight of k, A000120(k).

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Apr 02 2022

Keywords

Examples

			k = 17; A000120(17 + A000120(17)) > A000120(17), thus k = 17 is a term.
		

Crossrefs

Programs

  • Mathematica
    w[n_] := DigitCount[n, 2, 1]; Select[Range[200], w[# + w[#]] > w[#] &] (* Amiram Eldar, Apr 02 2022 *)
  • 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

Formula

k : A000120(A092391(k)) > A000120(k); A348367(k) > A000120(k).