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.

A348368 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

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

Views

Author

Ctibor O. Zizka, Oct 15 2021

Keywords

Examples

			k = 91; A000120(91 + A000120(91)) < A000120(91), thus k = 91 is a term.
		

Crossrefs

Programs

  • Maple
    q:= n-> (wt-> is(wt(n+wt(n)) 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 *)
  • 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

Formula

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