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.

A296559 Triangle read by rows: T(n,k) is the number of compositions of n having k parts equal to 1 or 2 (0<=k<=n).

This page as a plain text file.
%I A296559 #19 Dec 16 2017 05:31:14
%S A296559 1,0,1,0,1,1,1,0,2,1,1,2,1,3,1,1,4,3,3,4,1,2,4,9,5,6,5,1,3,7,12,16,9,
%T A296559 10,6,1,4,13,18,28,26,16,15,7,1,6,19,36,42,55,41,27,21,8,1,9,29,60,82,
%U A296559 90,97,64,43,28,9,1,13,47,94,152,170,177,160,99,65,36,10,1,19,73,158,252,335,333,323,253,151,94,45,11,1
%N A296559 Triangle read by rows: T(n,k) is the number of compositions of n having k parts equal to 1 or 2 (0<=k<=n).
%C A296559 Sum of entries in row n = 2^{n-1} = A011782(n) (n>=1).
%C A296559 Sum(kT(n,k), k>=0) = (3n+5)*2^{n-4} = A106472(n-1) (n>=3).
%F A296559 G.f.: G(t,x) = (1-x)/(1 - (1 + t)x - (1 - t)x^3).
%e A296559 T(3,2) = 2 because we have [1,2],[2,1].
%e A296559 T(6,3) = 5 because we have [2,2,2],[1,1,1,3],[1,1,3,1],[1,3,1,1],[3,1,1,1].
%e A296559 Triangle begins:
%e A296559   1,
%e A296559   0, 1,
%e A296559   0, 1, 1,
%e A296559   1, 0, 2, 1,
%e A296559   1, 2, 1, 3, 1,
%e A296559   1, 4, 3, 3, 4, 1,
%e A296559   2, 4, 9, 5, 6, 5, 1,
%e A296559   3, 7, 12, 16, 9, 10, 6, 1,
%e A296559   4, 13, 18, 28, 26, 16, 15, 7, 1,
%e A296559   ...
%p A296559 g := (1-x)/(1-(1+t)*x-(1-t)*x^3): gser := simplify(series(g, x = 0, 17)): for n from 0 to 15 do p[n] := sort(expand(coeff(gser, x, n))) end do: for n from 0 to 15 do seq(coeff(p[n], t, j), j = 0 .. n) end do; # yields sequence in triangular form
%t A296559 nmax = 12;
%t A296559 s = Series[(1-x)/(1 - (1+t) x - (1-t) x^3), {x, 0, nmax}, {t, 0, nmax}];
%t A296559 T[n_, k_] := SeriesCoefficient[s, {x, 0, n}, {t, 0, k}];
%t A296559 Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Dec 16 2017 *)
%Y A296559 Cf. A011782, A105114, A105422, A106472.
%K A296559 nonn,tabl
%O A296559 0,9
%A A296559 _Emeric Deutsch_, Dec 15 2017