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.

Showing 1-3 of 3 results.

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).

A352776 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

0, 1, 3, 10, 11, 18, 19, 22, 23, 25, 34, 35, 38, 39, 41, 49, 53, 54, 66, 67, 70, 71, 73, 81, 85, 86, 97, 101, 102, 110, 116, 117, 119, 130, 131, 134, 135, 137, 145, 149, 150, 161, 165, 166, 174, 180, 181, 183, 193, 197, 198, 206, 212, 213, 215, 228, 229, 231, 236, 237, 243, 246, 247, 258, 259, 262, 263, 265, 273
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 02 2022

Keywords

Comments

w(k + w(k)) - w(k) = 0 this sequence, w(k + w(k)) - w(k) = 2 for k = 4*j, where A000120(j) = 3.

Examples

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

Crossrefs

Programs

  • Mathematica
    w[n_] := DigitCount[n, 2, 1]; Select[Range[0, 300], 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(274) if ok(k)]) # Michael S. Branicky, Apr 02 2022

Formula

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

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).
Showing 1-3 of 3 results.