login
Number T(n,k) of partitions of n into distinct parts whose bitwise XOR equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
3

%I #18 Apr 11 2019 11:59:02

%S 1,0,1,0,0,1,0,0,0,2,0,0,1,0,1,0,1,0,0,0,2,1,0,0,0,1,0,2,0,0,0,0,0,0,

%T 0,5,0,0,0,0,1,0,4,0,1,0,1,0,0,0,4,0,1,0,2,1,0,1,0,5,0,0,0,1,0,2,0,0,

%U 0,4,0,2,0,1,0,0,0,5,1,0,5,0,0,0,2,0,1,0,4,0,2

%N Number T(n,k) of partitions of n into distinct parts whose bitwise XOR equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

%H Alois P. Heinz, <a href="/A307505/b307505.txt">Rows n = 0..360, flattened</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Bitwise operation">Bitwise operation</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_(number_theory)">Partition (number theory)</a>

%F T(n,k) = 0 if n+k is odd.

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 0, 0, 1;

%e 0, 0, 0, 2;

%e 0, 0, 1, 0, 1;

%e 0, 1, 0, 0, 0, 2;

%e 1, 0, 0, 0, 1, 0, 2;

%e 0, 0, 0, 0, 0, 0, 0, 5;

%e 0, 0, 0, 0, 1, 0, 4, 0, 1;

%e 0, 1, 0, 0, 0, 4, 0, 1, 0, 2;

%e 1, 0, 1, 0, 5, 0, 0, 0, 1, 0, 2;

%e ...

%p b:= proc(n, i, k) option remember; `if`(n=0, x^k, `if`(i<1, 0,

%p b(n, i-1, k)+b(n-i, min(n-i, i-1), Bits[Xor](i, k))))

%p end:

%p T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 0)):

%p seq(T(n), n=0..14);

%Y Bisection (even part) of column k=0 gives A307506.

%Y Row sums give A000009.

%Y Main diagonal gives A050315.

%Y Cf. A050314.

%K nonn,tabl,look,base

%O 0,10

%A _Alois P. Heinz_, Apr 11 2019