login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A348684 Triangle read by rows, T(n, k) = 2*n - HammingWeight(k), for 0 <= k <= n. 4
0, 2, 1, 4, 3, 3, 6, 5, 5, 4, 8, 7, 7, 6, 7, 10, 9, 9, 8, 9, 8, 12, 11, 11, 10, 11, 10, 10, 14, 13, 13, 12, 13, 12, 12, 11, 16, 15, 15, 14, 15, 14, 14, 13, 15, 18, 17, 17, 16, 17, 16, 16, 15, 17, 16, 20, 19, 19, 18, 19, 18, 18, 17, 19, 18, 18 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
EXAMPLE
Triangle starts:
[0] 0;
[1] 2, 1;
[2] 4, 3, 3;
[3] 6, 5, 5, 4;
[4] 8, 7, 7, 6, 7;
[5] 10, 9, 9, 8, 9, 8;
[6] 12, 11, 11, 10, 11, 10, 10;
[7] 14, 13, 13, 12, 13, 12, 12, 11;
[8] 16, 15, 15, 14, 15, 14, 14, 13, 15;
[9] 18, 17, 17, 16, 17, 16, 16, 15, 17, 16;
MAPLE
HammingWeight := n -> add(i, i = convert(n, base, 2)):
A348684 := (n, k) -> 2*n - HammingWeight(k):
seq(seq(A348684(n, k), k = 0..n), n = 0..10);
MATHEMATICA
Table[2*n - DigitCount[k, 2, 1], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Oct 30 2021 *)
CROSSREFS
Cf. A000120, A005843, A005187, A057427 (row gcd).
Sequence in context: A136757 A134599 A117235 * A159573 A102916 A081234
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Oct 29 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 2 13:09 EDT 2024. Contains 375613 sequences. (Running on oeis4.)