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.

A348676 Triangle read by rows, T(n, k) = 2^(n - HammingWeight(k)), for 0 <= k <= n.

This page as a plain text file.
%I A348676 #10 Oct 30 2021 06:03:11
%S A348676 1,2,1,4,2,2,8,4,4,2,16,8,8,4,8,32,16,16,8,16,8,64,32,32,16,32,16,16,
%T A348676 128,64,64,32,64,32,32,16,256,128,128,64,128,64,64,32,128,512,256,256,
%U A348676 128,256,128,128,64,256,128,1024,512,512,256,512,256,256,128,512,256,256
%N A348676 Triangle read by rows, T(n, k) = 2^(n - HammingWeight(k)), for 0 <= k <= n.
%e A348676 Triangle starts:
%e A348676 [0] 1;
%e A348676 [1] 2,   1;
%e A348676 [2] 4,   2,   2;
%e A348676 [3] 8,   4,   4,   2;
%e A348676 [4] 16,  8,   8,   4,   8;
%e A348676 [5] 32,  16,  16,  8,   16,  8;
%e A348676 [6] 64,  32,  32,  16,  32,  16,  16;
%e A348676 [7] 128, 64,  64,  32,  64,  32,  32,  16;
%e A348676 [8] 256, 128, 128, 64,  128, 64,  64,  32, 128;
%e A348676 [9] 512, 256, 256, 128, 256, 128, 128, 64, 256, 128;
%p A348676 HammingWeight := n -> add(i, i = convert(n, base, 2)):
%p A348676 A348676 := (n, k) -> 2^(n - HammingWeight(k)):
%p A348676 seq(seq(A348676(n, k), k = 0..n), n = 0..10);
%t A348676 Table[2^(n - DigitCount[k, 2, 1]), {n, 0, 10}, {k, 0, n}] // Flatten (* _Amiram Eldar_, Oct 30 2021 *)
%Y A348676 Cf. A000120, A000079, A060818, A054243 (row gcd).
%Y A348676 Cf. A348684, A348685, A348687.
%K A348676 nonn,tabl
%O A348676 0,2
%A A348676 _Peter Luschny_, Oct 29 2021