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

This page as a plain text file.
%I A348368 #26 Apr 02 2022 17:47:22
%S A348368 6,7,13,14,15,21,29,30,31,37,45,46,47,55,59,60,61,62,63,69,77,78,79,
%T A348368 87,91,92,93,94,95,103,107,108,109,111,115,123,124,125,126,127,133,
%U A348368 141,142,143,151,155,156,157,158,159,167,171,172,173,175,179,187,188,189
%N A348368 Numbers k such that w(k + w(k)) < w(k), where w(k) is the binary weight of k, A000120(k).
%H A348368 Robert Israel, <a href="/A348368/b348368.txt">Table of n, a(n) for n = 1..10000</a>
%F A348368 k : A000120(A092391(k)) < A000120(k); A348367(k) < A000120(k).
%e A348368 k = 91; A000120(91 + A000120(91)) < A000120(91), thus k = 91 is a term.
%p A348368 q:= n-> (wt-> is(wt(n+wt(n))<wt(n)))(k-> add(i, i=Bits[Split](k))):
%p A348368 select(q, [$0..200])[];  # _Alois P. Heinz_, Oct 15 2021
%t A348368 h[n_] := DigitCount[n, 2, 1]; q[n_] := h[n + (hn = h[n])] < hn; Select[Range[200], q] (* _Amiram Eldar_, Oct 15 2021 *)
%o A348368 (Python)
%o A348368 def h(n): return bin(n).count('1')
%o A348368 def ok(n): return h(n + h(n)) < h(n)
%o A348368 print(list(filter(ok, range(1, 190)))) # _Michael S. Branicky_, Oct 15 2021
%Y A348368 Cf. A000120, A092391, A348367.
%K A348368 nonn,base,easy
%O A348368 1,1
%A A348368 _Ctibor O. Zizka_, Oct 15 2021