cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A050314 Triangle: a(n,k) = number of partitions of n whose xor-sum is k.

This page as a plain text file.
%I A050314 #28 Mar 27 2024 19:15:44
%S A050314 1,0,1,1,0,1,0,1,0,2,2,0,2,0,1,0,3,0,2,0,2,4,0,3,0,2,0,2,0,4,0,4,0,2,
%T A050314 0,5,6,0,5,0,4,0,6,0,1,0,8,0,6,0,8,0,6,0,2,10,0,9,0,11,0,8,0,2,0,2,0,
%U A050314 11,0,14,0,12,0,12,0,2,0,5,16,0,18,0,15,0,16,0,4,0,6,0,2,0,23,0,20,0,20,0,19,0,8,0,6,0,5
%N A050314 Triangle: a(n,k) = number of partitions of n whose xor-sum is k.
%H A050314 Alois P. Heinz, <a href="/A050314/b050314.txt">Rows n = 0..200, flattened</a>
%e A050314 Triangle: a(n,k) begins:
%e A050314    1;
%e A050314    0,  1;
%e A050314    1,  0,  1;
%e A050314    0,  1,  0,  2;
%e A050314    2,  0,  2,  0,  1;
%e A050314    0,  3,  0,  2,  0,  2;
%e A050314    4,  0,  3,  0,  2,  0,  2;
%e A050314    0,  4,  0,  4,  0,  2,  0,  5;
%e A050314    6,  0,  5,  0,  4,  0,  6,  0, 1;
%e A050314    0,  8,  0,  6,  0,  8,  0,  6, 0, 2;
%e A050314   10,  0,  9,  0, 11,  0,  8,  0, 2, 0, 2;
%e A050314    0, 11,  0, 14,  0, 12,  0, 12, 0, 2, 0, 5;
%e A050314   16,  0, 18,  0, 15,  0, 16,  0, 4, 0, 6, 0, 2;
%e A050314   ...
%p A050314 with(Bits):
%p A050314 b:= proc(n, i, k) option remember; `if`(n=0, x^k, `if`(i<1, 0,
%p A050314       add(b(n-i*j, i-1, `if`(j::even, k, Xor(i, k))), j=0..n/i)))
%p A050314     end:
%p A050314 T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 0)):
%p A050314 seq(T(n), n=0..20);  # _Alois P. Heinz_, Dec 01 2015
%t A050314 b[n_, i_, k_] := b[n, i, k] = If[n==0, x^k, If[i<1, 0, Sum[b[n-i*j, i-1, If[EvenQ[j], k, BitXor[i, k]]], {j, 0, n/i}]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, n, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* _Jean-François Alcover_, Jan 24 2016, after _Alois P. Heinz_ *)
%Y A050314 a(2n,0) = A048833(n). a(2n+1,1) = A050316(n). a(n,n) = A050315(n).
%Y A050314 Row sums give A000041.
%Y A050314 a(4n,2n) gives A370874.
%Y A050314 Cf. A307431, A307432.
%K A050314 nonn,tabl,base,look
%O A050314 0,10
%A A050314 _Christian G. Bower_, Sep 15 1999