login
Triangle: a(n,m) = ways to place p balls in n slots with m in the rightmost p slots, 0<=p<=n, 0<=m<=n, summed over p, a(n,m)= Sum_{k=0..n} binomial(k,m)*binomial(n-k,k-m), (see program line).
6

%I #40 Mar 10 2023 10:09:44

%S 1,1,1,2,1,1,3,3,1,1,5,5,4,1,1,8,10,7,5,1,1,13,18,16,9,6,1,1,21,33,31,

%T 23,11,7,1,1,34,59,62,47,31,13,8,1,1,55,105,119,101,66,40,15,9,1,1,89,

%U 185,227,205,151,88,50,17,10,1,1,144,324,426,414,321,213,113,61,19,11,1,1

%N Triangle: a(n,m) = ways to place p balls in n slots with m in the rightmost p slots, 0<=p<=n, 0<=m<=n, summed over p, a(n,m)= Sum_{k=0..n} binomial(k,m)*binomial(n-k,k-m), (see program line).

%C Riordan array (1/(1-x-x^2), x(1-x)/(1-x-x^2)). Row sums are A000079. Diagonal sums are A006053(n+2). - _Paul Barry_, Nov 01 2006

%C Subtriangle of the triangle given by (0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - _Philippe Deléham_, Mar 05 2012

%C Mirror image of triangle in A208342. - _Philippe Deléham_, Mar 05 2012

%C A053538 is jointly generated with A076791 as an array of coefficients of polynomials u(n,x): initially, u(1,x)=v(1,x)=1, for n>1, u(n,x) = x*u(n-1,x) + v(n-1,x) and v(n,x) = u(n-1,x) + v(n-1,x). See the Mathematica section at A076791. - _Clark Kimberling_, Mar 08 2012

%C The matrix inverse starts

%C 1;

%C -1, 1;

%C -1, -1, 1;

%C 1, -2, -1, 1;

%C 3, 1, -3, -1, 1;

%C 1, 6, 1, -4, -1, 1;

%C -7, 4, 10, 1, -5, -1, 1;

%C -13, -13, 8, 15, 1, -6, -1, 1;

%C 3, -31, -23, 13, 21, 1, -7, -1, 1; - _R. J. Mathar_, Mar 15 2013

%H Alois P. Heinz, <a href="/A053538/b053538.txt">Rows n = 0..140, flattened</a>

%H R. P. Grimaldi, <a href="https://www.fq.math.ca/Papers1/55-2/Grimaldi02172017.pdf">Extraordinary subsets: a generalization</a>, Fib. Quart., 55 (No. 3, 2017), 114-122. See Table 1.

%F From _Philippe Deléham_, Mar 05 2012: (Start)

%F T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) - T(n-2,k-1), T(0,0) = T(1,0) = T(1,1) = 1 and T(n,k) = 0 if k<0 or if k>n.

%F G.f.: 1/(1-(1+y)*x-(1-y)*x^2).

%F Sum_{k, 0<=k<=n} T(n,k)*x^k = A077957(n), A000045(n+1), A000079(n), A001906(n+1), A007070(n), A116415(n), A084326(n+1), A190974(n+1), A190978(n+1), A190984(n+1), A190990(n+1), A190872(n+1) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively. (End)

%e n=4; Table[binomial[k, j]binomial[n-k, k-j], {k, 0, n}, {j, 0, n}] splits {1, 4, 6, 4, 1} into {{1, 0, 0, 0, 0}, {3, 1, 0, 0, 0}, {1, 4, 1, 0, 0}, {0, 0, 3, 1, 0}, {0, 0, 0, 0, 1}} and this gives summed by columns {5, 5, 4, 1, 1}

%e Triangle begins :

%e 1;

%e 1, 1;

%e 2, 1, 1;

%e 3, 3, 1, 1;

%e 5, 5, 4, 1, 1;

%e 8, 10, 7, 5, 1, 1;

%e 13, 18, 16, 9, 6, 1, 1;

%e ...

%e (0, 1, 1, -1, 0, 0, 0, ...) DELTA (1, 0, -1, 1, 0, 0, 0, ...) begins :

%e 1;

%e 0, 1;

%e 0, 1, 1;

%e 0, 2, 1, 1;

%e 0, 3, 3, 1, 1;

%e 0, 5, 5, 4, 1, 1;

%e 0, 8, 10, 7, 5, 1, 1;

%e 0, 13, 18, 16, 9, 6, 1, 1;

%p a:= (n, m)-> add(binomial(k, m)*binomial(n-k, k-m), k=0..n):

%p seq(seq(a(n,m), m=0..n), n=0..12); # _Alois P. Heinz_, Sep 19 2013

%t Table[Sum[Binomial[k, m]*Binomial[n-k, k-m], {k,0,n}], {n,0,12}, {m,0,n}]

%o (PARI) {T(n,k) = sum(j=0,n, binomial(j,k)*binomial(n-j,j-k))}; \\ _G. C. Greubel_, May 16 2019

%o (Magma) [[(&+[Binomial(j,k)*Binomial(n-j,j-k): j in [0..n]]): k in [0..n]]: n in [0..12]]; // _G. C. Greubel_, May 16 2019

%o (Sage) [[sum(binomial(j,k)*binomial(n-j,j-k) for j in (0..n)) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, May 16 2019

%o (GAP) Flat(List([0..12], n-> List([0..n], k-> Sum([0..n], j-> Binomial(j,k)*Binomial(n-j,j-k)) ))); # _G. C. Greubel_, May 16 2019

%Y Cf. A000045, A000079, A208342.

%K nonn,tabl

%O 0,4

%A _Wouter Meeussen_, May 23 2001