A181289 Triangle read by rows: T(n,k) is the number of 2-compositions of n having length k (0 <= k <= n).
1, 0, 2, 0, 3, 4, 0, 4, 12, 8, 0, 5, 25, 36, 16, 0, 6, 44, 102, 96, 32, 0, 7, 70, 231, 344, 240, 64, 0, 8, 104, 456, 952, 1040, 576, 128, 0, 9, 147, 819, 2241, 3400, 2928, 1344, 256, 0, 10, 200, 1372, 4712, 9290, 11040, 7840, 3072, 512, 0, 11, 264, 2178, 9108, 22363
Offset: 0
Examples
Triangle starts: 1; 0, 2; 0, 3, 4; 0, 4, 12, 8; 0, 5, 25, 36, 16; 0, 6, 44, 102, 96, 32; 0, 7, 70, 231, 344, 240, 64; 0, 8, 104, 456, 952, 1040, 576, 128; 0, 9, 147, 819, 2241, 3400, 2928, 1344, 256; 0, 10, 200, 1372, 4712, 9290, 11040, 7840, 3072, 512; 0, 11, 264, 2178, 9108, 22363, 34332, 33488, 20224, 6912, 1024;
Links
- John Tyler Rascoe, Rows n = 0..100, flattened
- G. Castiglione, A. Frosini, E. Munarini, A. Restivo and S. Rinaldi, Combinatorial aspects of L-convex polyominoes, European J. Combin. 28 (2007), no. 6, 1724-1741.
- Y-h. Guo, Some n-Color Compositions, J. Int. Seq. 15 (2012) 12.1.2, eq. (11).
Crossrefs
Programs
-
Maple
T := proc (n, k) if k <= n then sum((-1)^j*2^(k-j)*binomial(k, j)*binomial(n+k-j-1, 2*k-1), j = 0 .. k) else 0 end if end proc: for n from 0 to 10 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form # Uses function PMatrix from A357368. PMatrix(10, n -> n + 1); # Peter Luschny, Oct 19 2022
-
Mathematica
Table[Sum[(-1)^j*2^(k - j) Binomial[k, j] Binomial[n + k - j - 1, 2 k - 1], {j, 0, k}], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Dec 11 2015 *)
-
PARI
T_xt(max_row) = {my(N=max_row+1, x='x+O('x^N), h=(1-x)^2/((1-x)^2 - t*x*(2-x))); vector(N, n, Vecrev(polcoeff(h, n-1)))} T_xt(10) \\ John Tyler Rascoe, Apr 05 2025
Formula
T(n,k) = Sum_{j=0..k} (-1)^j*2^(k-j)*binomial(k,j)*binomial(n+k-j-1, 2*k-1) (0 <= k <= n).
G.f.: G(t,x) = (1-x)^2/((1-x)^2 - t*x*(2-x)).
G.f. of column k = x^k*(2-x)^k/(1-x)^{2k} (k>=1) (we have a Riordan array).
Recurrences satisfied by the numbers u_{n,k}=T(n,k) can be found in the Castiglione et al. reference.
Sum_{k=0..n} k*T(n,k) = A181290(n).
T(n,k) = 2*T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k) - T(n-2,k-1), T(0,0)=1, T(1,0)=0, T(1,1)=2, T(2,0)=0, T(1,1)=3, T(2,2)=4, T(n,k)=0, if k < 0 or if k > n. - Philippe Deléham, Nov 29 2013
Comments