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.

A053538 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).

This page as a plain text file.
%I A053538 #49 Jun 28 2025 15:48:26
%S A053538 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 A053538 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 A053538 185,227,205,151,88,50,17,10,1,1,144,324,426,414,321,213,113,61,19,11,1,1
%N A053538 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 A053538 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 A053538 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 A053538 Mirror image of triangle in A208342. - _Philippe Deléham_, Mar 05 2012
%C A053538 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 A053538 The matrix inverse starts
%C A053538     1;
%C A053538    -1,   1;
%C A053538    -1,  -1,   1;
%C A053538     1,  -2,  -1,  1;
%C A053538     3,   1,  -3, -1,  1;
%C A053538     1,   6,   1, -4, -1,  1;
%C A053538    -7,   4,  10,  1, -5, -1,  1;
%C A053538   -13, -13,   8, 15,  1, -6, -1,  1;
%C A053538     3, -31, -23, 13, 21,  1, -7, -1, 1; - _R. J. Mathar_, Mar 15 2013
%C A053538 Also appears to be the number of subsets of {1..n} containing n with k maximal anti-runs of consecutive elements increasing by more than 1. For example, the subset {1,3,6,7,11,12} has maximal anti-runs ((1,3,6),(7,11),(12)) so is counted under a(12,3). For runs instead of anti-runs we get A202064. - _Gus Wiseman_, Jun 26 2025
%H A053538 Alois P. Heinz, <a href="/A053538/b053538.txt">Rows n = 0..140, flattened</a>
%H A053538 R. P. Grimaldi, <a href="https://web.archive.org/web/2024*/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 A053538 From _Philippe Deléham_, Mar 05 2012: (Start)
%F A053538 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 A053538 G.f.: 1/(1-(1+y)*x-(1-y)*x^2).
%F A053538 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 A053538 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 A053538 Triangle begins :
%e A053538    1;
%e A053538    1,  1;
%e A053538    2,  1,  1;
%e A053538    3,  3,  1, 1;
%e A053538    5,  5,  4, 1, 1;
%e A053538    8, 10,  7, 5, 1, 1;
%e A053538   13, 18, 16, 9, 6, 1, 1;
%e A053538 ...
%e A053538 (0, 1, 1, -1, 0, 0, 0, ...) DELTA (1, 0, -1, 1, 0, 0, 0, ...) begins :
%e A053538   1;
%e A053538   0,  1;
%e A053538   0,  1,  1;
%e A053538   0,  2,  1,  1;
%e A053538   0,  3,  3,  1, 1;
%e A053538   0,  5,  5,  4, 1, 1;
%e A053538   0,  8, 10,  7, 5, 1, 1;
%e A053538   0, 13, 18, 16, 9, 6, 1, 1;
%p A053538 a:= (n, m)-> add(binomial(k, m)*binomial(n-k, k-m), k=0..n):
%p A053538 seq(seq(a(n,m), m=0..n), n=0..12);  # _Alois P. Heinz_, Sep 19 2013
%t A053538 Table[Sum[Binomial[k, m]*Binomial[n-k, k-m], {k,0,n}], {n,0,12}, {m,0,n}]
%o A053538 (PARI) {T(n,k) = sum(j=0,n, binomial(j,k)*binomial(n-j,j-k))}; \\ _G. C. Greubel_, May 16 2019
%o A053538 (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 A053538 (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 A053538 (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 A053538 Column k = 1 is A000045.
%Y A053538 Row sums are A000079.
%Y A053538 Column k = 2 is A010049.
%Y A053538 For runs instead of anti-runs we have A202064.
%Y A053538 For integer partitions see A268193, strict A384905, runs A116674.
%Y A053538 A034839 counts subsets by number of maximal runs.
%Y A053538 A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.
%Y A053538 A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.
%Y A053538 A384893 counts subsets by number of maximal anti-runs.
%Y A053538 Cf. A000071, A001629, A010027, A208342, A384177, A384879, A384889, A384890.
%K A053538 nonn,tabl
%O A053538 0,4
%A A053538 _Wouter Meeussen_, May 23 2001