login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A307432
Number T(n,k) of partitions of n into parts whose bitwise AND equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
4
1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 3, 2, 1, 0, 0, 1, 5, 3, 1, 1, 0, 0, 1, 9, 4, 1, 0, 0, 0, 0, 1, 11, 6, 3, 0, 1, 0, 0, 0, 1, 18, 6, 3, 1, 1, 0, 0, 0, 0, 1, 27, 8, 3, 1, 1, 1, 0, 0, 0, 0, 1, 38, 11, 4, 0, 2, 0, 0, 0, 0, 0, 0, 1, 53, 13, 6, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1
OFFSET
0,12
LINKS
EXAMPLE
T(6,0) = 5: 11112, 1122, 123, 114, 24.
T(6,1) = 3: 111111, 1113, 15.
T(6,2) = 1: 222.
T(6,3) = 1: 33.
T(6,6) = 1: 6.
Triangle T(n,k) begins:
1;
0, 1;
0, 1, 1;
1, 1, 0, 1;
1, 2, 1, 0, 1;
3, 2, 1, 0, 0, 1;
5, 3, 1, 1, 0, 0, 1;
9, 4, 1, 0, 0, 0, 0, 1;
11, 6, 3, 0, 1, 0, 0, 0, 1;
18, 6, 3, 1, 1, 0, 0, 0, 0, 1;
27, 8, 3, 1, 1, 1, 0, 0, 0, 0, 1;
...
MAPLE
b:= proc(n, i, k) option remember; `if`(n=0, x^k, `if`(i<1, 0,
b(n, i-1, k)+b(n-i, min(n-i, i), Bits[And](i, k))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(
b(n$2, `if`(n=0, 0, 2^ilog2(2*n)-1))):
seq(T(n), n=0..14);
CROSSREFS
Column k=0 gives A307435.
Row sums give A000041.
Main diagonal gives A000012.
Cf. A050314 (the same for XOR), A307431 (the same for OR).
Sequence in context: A048983 A301505 A301504 * A256140 A321391 A244003
KEYWORD
nonn,tabl,look,base
AUTHOR
Alois P. Heinz, Apr 08 2019
STATUS
approved