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!)
A360189 Number T(n,k) of nonnegative integers <= n having binary weight k; triangle T(n,k), n>=0, 0<=k<=floor(log_2(n+1)), read by rows. 15
1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 3, 2, 1, 3, 3, 1, 3, 3, 1, 1, 4, 3, 1, 1, 4, 4, 1, 1, 4, 5, 1, 1, 4, 5, 2, 1, 4, 6, 2, 1, 4, 6, 3, 1, 4, 6, 4, 1, 4, 6, 4, 1, 1, 5, 6, 4, 1, 1, 5, 7, 4, 1, 1, 5, 8, 4, 1, 1, 5, 8, 5, 1, 1, 5, 9, 5, 1, 1, 5, 9, 6, 1, 1, 5, 9, 7, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
T(n,k) is defined for all n >= 0 and k >= 0. Terms that are not in the triangle are zero.
LINKS
Wikipedia, Iverson bracket
FORMULA
T(n,k) = T(n-1,k) + [A000120(n) = k] where [] is the Iverson bracket and T(n,k) = 0 for n<0.
T(2^n-1,k) = A007318(n,k) = binomial(n,k).
T(n,floor(log_2(n+1))) = A090996(n+1).
Sum_{k>=0} T(n,k) = n+1.
Sum_{k>=0} k * T(n,k) = A000788(n).
Sum_{k>=0} k^2 * T(n,k) = A231500(n).
Sum_{k>=0} k^3 * T(n,k) = A231501(n).
Sum_{k>=0} k^4 * T(n,k) = A231502(n).
Sum_{k>=0} 2^k * T(n,k) = A006046(n+1).
Sum_{k>=0} 3^k * T(n,k) = A130665(n).
Sum_{k>=0} 4^k * T(n,k) = A116520(n+1).
Sum_{k>=0} 5^k * T(n,k) = A130667(n+1).
Sum_{k>=0} 6^k * T(n,k) = A116522(n+1).
Sum_{k>=0} 7^k * T(n,k) = A161342(n+1).
Sum_{k>=0} 8^k * T(n,k) = A116526(n+1).
Sum_{k>=0} 10^k * T(n,k) = A116525(n+1).
Sum_{k>=0} n^k * T(n,k) = A361257(n).
EXAMPLE
T(6,2) = 3: 3, 5, 6, or in binary: 11_2, 101_2, 110_2.
T(15,3) = 4: 7, 11, 13, 14, or in binary: 111_2, 1011_2, 1101_2, 1110_2.
Triangle T(n,k) begins:
1;
1, 1;
1, 2;
1, 2, 1;
1, 3, 1;
1, 3, 2;
1, 3, 3;
1, 3, 3, 1;
1, 4, 3, 1;
1, 4, 4, 1;
1, 4, 5, 1;
1, 4, 5, 2;
1, 4, 6, 2;
1, 4, 6, 3;
1, 4, 6, 4;
1, 4, 6, 4, 1;
...
MAPLE
b:= proc(n) option remember; `if`(n<0, 0,
b(n-1)+x^add(i, i=Bits[Split](n)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
seq(T(n), n=0..23);
CROSSREFS
Columns k=0-2 give: A000012, A029837(n+1) = A113473(n) for n>0, A340068(n+1).
Last elements of rows give A090996(n+1).
Sequence in context: A249809 A075104 A253667 * A368210 A233932 A008289
KEYWORD
nonn,look,tabf,base
AUTHOR
Alois P. Heinz, Mar 04 2023
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 April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)