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.

A180281 Triangle read by rows: T(n,k) = number of arrangements of n indistinguishable balls in n boxes with the maximum number of balls in any box equal to k.

This page as a plain text file.
%I A180281 #43 Aug 28 2022 08:26:56
%S A180281 1,1,2,1,6,3,1,18,12,4,1,50,50,20,5,1,140,195,90,30,6,1,392,735,392,
%T A180281 147,42,7,1,1106,2716,1652,672,224,56,8,1,3138,9912,6804,2970,1080,
%U A180281 324,72,9,1,8952,35850,27600,12825,4950,1650,450,90,10,1,25652,128865,110715,54450,22022,7865,2420,605,110,11
%N A180281 Triangle read by rows: T(n,k) = number of arrangements of n indistinguishable balls in n boxes with the maximum number of balls in any box equal to k.
%C A180281 To clarify a slight ambiguity in the definition, the heaviest box in such an arrangement should contain exactly k balls. - _Gus Wiseman_, Sep 22 2016
%H A180281 Alois P. Heinz, <a href="/A180281/b180281.txt">Rows n = 1..200, flattened</a> (first 59 rows from R. H. Hardin)
%F A180281 Empirical: right half of table, T(n,k) = n*binomial(2*n-k-2,n-2) for 2*k > n; also, T(n,2) = Sum_{j=1..n} binomial(n,j)*binomial(n-j,j) = 2*A097861(n). - _Robert Gerbicz_ in the Sequence Fans Mailing List
%F A180281 From _Alois P. Heinz_, Aug 17 2018: (Start)
%F A180281 T(n,k) = [x^n] ((x^(k+1)-1)/(x-1))^n - ((x^k-1)/(x-1))^n.
%F A180281 T(n,k) = A305161(n,k) - A305161(n,k-1). (End)
%e A180281 The T(4,2)=18 arrangements are {0022, 0112, 0121, 0202, 0211, 0220, 1012, 1021, 1102, 1120, 1201, 1210, 2002, 2011, 2020, 2101, 2110, 2200}.
%e A180281 Triangle starts
%e A180281   1
%e A180281   1   2
%e A180281   1   6   3
%e A180281   1  18  12  4
%e A180281   1  50  50 20  5
%e A180281   1 140 195 90 30 6
%e A180281   ...
%p A180281 b:= proc(n, i, k) option remember; `if`(n=0, 1,
%p A180281       `if`(i=0, 0, add(b(n-j, i-1, k), j=0..min(n, k))))
%p A180281     end:
%p A180281 T:= (n, k)-> b(n$2, k)-b(n$2, k-1):
%p A180281 seq(seq(T(n,k), k=1..n), n=1..12);  # _Alois P. Heinz_, Aug 16 2018
%p A180281 # second Maple program:
%p A180281 T:= (n, k)-> coeff(series(((x^(k+1)-1)/(x-1))^n
%p A180281              -((x^k-1)/(x-1))^n, x, n+1), x, n):
%p A180281 seq(seq(T(n, k), k=1..n), n=1..12);  # _Alois P. Heinz_, Aug 17 2018
%t A180281 T[n_,k_]:=Select[Tuples[Range[0,k],n],And[Max[#]===k,Total[#]===n]&]; (* _Gus Wiseman_, Sep 22 2016 *)
%t A180281 SequenceForm@@@T[4,2] (* example *)
%t A180281 Join@@Table[Length[T[n,k]],{n,1,6},{k,1,n}] (* sequence *)
%t A180281 (* Second program: *)
%t A180281 b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, 0, Sum[b[n-j, i-1, k], {j, 0, Min[n, k]}]]];
%t A180281 T[n_, k_] := b[n, n, k] - b[n, n, k-1];
%t A180281 Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* _Jean-François Alcover_, Aug 28 2022, after _Alois P. Heinz_ *)
%Y A180281 Cf. A097861, A180282, A180291.
%Y A180281 Row sums give A088218.
%Y A180281 T(n,ceiling(n/2)) gives A318160.
%Y A180281 T(2n,n) gives A318161.
%Y A180281 T(2n-1,n) gives A318161.
%K A180281 nonn,tabl
%O A180281 1,3
%A A180281 _R. H. Hardin_, Aug 24 2010