A307431 Number T(n,k) of partitions of n into parts whose bitwise OR equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
1, 0, 1, 0, 1, 1, 0, 1, 0, 2, 0, 1, 1, 2, 1, 0, 1, 0, 4, 0, 2, 0, 1, 1, 5, 0, 2, 2, 0, 1, 0, 7, 0, 2, 0, 5, 0, 1, 1, 8, 1, 2, 2, 6, 1, 0, 1, 0, 11, 0, 4, 0, 12, 0, 2, 0, 1, 1, 12, 0, 5, 4, 15, 0, 2, 2, 0, 1, 0, 15, 0, 5, 0, 28, 0, 2, 0, 5, 0, 1, 1, 17, 1, 5, 5, 35, 0, 2, 2, 6, 2
Offset: 0
Examples
T(6,1) = 1: 111111. T(6,2) = 1: 222. T(6,3) = 5: 11112, 1122, 1113, 123, 33. T(6,5) = 2: 114, 15. T(6,6) = 2: 24, 6. Triangle T(n,k) begins: 1; 0, 1; 0, 1, 1; 0, 1, 0, 2; 0, 1, 1, 2, 1; 0, 1, 0, 4, 0, 2; 0, 1, 1, 5, 0, 2, 2; 0, 1, 0, 7, 0, 2, 0, 5; 0, 1, 1, 8, 1, 2, 2, 6, 1; 0, 1, 0, 11, 0, 4, 0, 12, 0, 2; 0, 1, 1, 12, 0, 5, 4, 15, 0, 2, 2; ...
Links
- Alois P. Heinz, Rows n = 0..200, flattened
- Wikipedia, Bitwise operation
- Wikipedia, Partition (number theory)
Crossrefs
Programs
-
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[Or](i, k)))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 0)): seq(T(n), n=0..14);