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.

A360634 Number T(n,k) of sets of nonempty words over binary alphabet with a total of n letters of which k are the first letter; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

This page as a plain text file.
%I A360634 #26 Dec 05 2023 19:46:30
%S A360634 1,1,1,1,3,1,2,6,6,2,2,11,16,11,2,3,18,37,37,18,3,4,28,73,100,73,28,4,
%T A360634 5,42,133,228,228,133,42,5,6,61,227,470,593,470,227,61,6,8,86,370,899,
%U A360634 1370,1370,899,370,86,8,10,119,580,1617,2894,3497,2894,1617,580,119,10
%N A360634 Number T(n,k) of sets of nonempty words over binary alphabet with a total of n letters of which k are the first letter; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
%H A360634 Alois P. Heinz, <a href="/A360634/b360634.txt">Rows n = 0..200, flattened</a>
%F A360634 T(n,k) = T(n,n-k).
%F A360634 Sum_{k=0..2n} (-1)^k*T(2n,k) = A200751(n). - _Alois P. Heinz_, Sep 09 2023
%e A360634 T(4,0) = 2: {bbbb}, {b,bbb}.
%e A360634 T(4,1) = 11: {abbb}, {babb}, {bbab}, {bbba}, {a,bbb}, {ab,bb}, {abb,b}, {b,bab}, {b,bba}, {ba,bb}, {a,b,bb}.
%e A360634 T(4,2) = 16: {aabb}, {abab}, {abba}, {baab}, {baba}, {bbaa}, {a,abb}, {a,bab}, {a,bba}, {aa,bb}, {aab,b}, {ab,ba}, {aba,b}, {b,baa}, {a,ab,b}, {a,b,ba}.
%e A360634 Triangle T(n,k) begins:
%e A360634    1;
%e A360634    1,   1;
%e A360634    1,   3,   1;
%e A360634    2,   6,   6,    2;
%e A360634    2,  11,  16,   11,    2;
%e A360634    3,  18,  37,   37,   18,    3;
%e A360634    4,  28,  73,  100,   73,   28,    4;
%e A360634    5,  42, 133,  228,  228,  133,   42,    5;
%e A360634    6,  61, 227,  470,  593,  470,  227,   61,   6;
%e A360634    8,  86, 370,  899, 1370, 1370,  899,  370,  86,   8;
%e A360634   10, 119, 580, 1617, 2894, 3497, 2894, 1617, 580, 119, 10;
%e A360634   ...
%p A360634 g:= proc(n, i, j) option remember; expand(`if`(j=0, 1, `if`(i<0, 0, add(
%p A360634       g(n, i-1, j-k)*x^(i*k)*binomial(binomial(n, i), k), k=0..j))))
%p A360634     end:
%p A360634 b:= proc(n, i) option remember; expand(`if`(n=0, 1,
%p A360634      `if`(i<1, 0, add(b(n-i*j, i-1)*g(i$2, j), j=0..n/i))))
%p A360634     end:
%p A360634 T:= (n, k)-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
%p A360634 seq(T(n), n=0..15);
%t A360634 g[n_, i_, j_] := g[n, i, j] = Expand[If[j == 0, 1, If[i < 0, 0, Sum[g[n, i - 1, j - k]*x^(i*k)*Binomial[Binomial[n, i], k], {k, 0, j}]]]];
%t A360634 b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1]*g[i, i, j], {j, 0, n/i}]]]];
%t A360634 T[n_] := CoefficientList[b[n, n], x];
%t A360634 Table[T[n], {n, 0, 15}] // Flatten (* _Jean-François Alcover_, Dec 05 2023, after _Alois P. Heinz_ *)
%Y A360634 Columns k=0-2 give: A000009, A095944, A360650.
%Y A360634 Row sums give A102866.
%Y A360634 T(2n,n) gives A360638.
%Y A360634 Cf. A055375 (the same for multisets), A200751, A208741.
%K A360634 nonn,tabl
%O A360634 0,5
%A A360634 _Alois P. Heinz_, Feb 14 2023