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.
%I A307432 #19 Apr 08 2019 17:28:37 %S A307432 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, %T A307432 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, %U A307432 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 %N 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. %H A307432 Alois P. Heinz, <a href="/A307432/b307432.txt">Rows n = 0..200, flattened</a> %H A307432 Wikipedia, <a href="https://en.wikipedia.org/wiki/Bitwise operation">Bitwise operation</a> %H A307432 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_(number_theory)">Partition (number theory)</a> %e A307432 T(6,0) = 5: 11112, 1122, 123, 114, 24. %e A307432 T(6,1) = 3: 111111, 1113, 15. %e A307432 T(6,2) = 1: 222. %e A307432 T(6,3) = 1: 33. %e A307432 T(6,6) = 1: 6. %e A307432 Triangle T(n,k) begins: %e A307432 1; %e A307432 0, 1; %e A307432 0, 1, 1; %e A307432 1, 1, 0, 1; %e A307432 1, 2, 1, 0, 1; %e A307432 3, 2, 1, 0, 0, 1; %e A307432 5, 3, 1, 1, 0, 0, 1; %e A307432 9, 4, 1, 0, 0, 0, 0, 1; %e A307432 11, 6, 3, 0, 1, 0, 0, 0, 1; %e A307432 18, 6, 3, 1, 1, 0, 0, 0, 0, 1; %e A307432 27, 8, 3, 1, 1, 1, 0, 0, 0, 0, 1; %e A307432 ... %p A307432 b:= proc(n, i, k) option remember; `if`(n=0, x^k, `if`(i<1, 0, %p A307432 b(n, i-1, k)+b(n-i, min(n-i, i), Bits[And](i, k)))) %p A307432 end: %p A307432 T:= n-> (p-> seq(coeff(p, x, i), i=0..n))( %p A307432 b(n$2, `if`(n=0, 0, 2^ilog2(2*n)-1))): %p A307432 seq(T(n), n=0..14); %Y A307432 Column k=0 gives A307435. %Y A307432 Row sums give A000041. %Y A307432 Main diagonal gives A000012. %Y A307432 Cf. A050314 (the same for XOR), A307431 (the same for OR). %K A307432 nonn,tabl,look,base %O A307432 0,12 %A A307432 _Alois P. Heinz_, Apr 08 2019