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.
%I A163181 #14 Feb 21 2013 07:56:47 %S A163181 1,1,2,1,1,3,6,7,6,3,1,1,4,10,20,31,40,44,40,31,20,10,4,1,1,5,15,35, %T A163181 70,121,185,255,320,365,381,365,320,255,185,121,70,35,15,5,1,1,6,21, %U A163181 56,126,252,456,756,1161,1666,2247,2856,3431,3906,4221,4332,4221,3906,3431 %N A163181 T(n,k) is the number of weak compositions of k into n parts no greater than (n-1) for n>=1, 0<=k<=n(n-1). %C A163181 T(n,k) is the number of length n sequences on an alphabet of {0,1,2,...,n-1} that have a sum of k. Equivalently T(n,k) is the number of functions f:{1,2,...,n}->{0,1,2,...,n-1} such that Sum(f(i)=k, i=1...n). %C A163181 Row n is also row n of the array of q-nomial coefficients. - _Matthew Vandermast_, Oct 31 2010 %H A163181 Alois P. Heinz, <a href="/A163181/b163181.txt">Rows n = 1..32, flattened</a> %F A163181 O.g.f. for row n is ((1-x^n)/(1-x))^n. For k<=(n-1), T(n,k) = C(n+k-1,k). %e A163181 T(3,4) = 6 because there are 6 ternary sequences of length three that sum to 4: [0, 2, 2], [1, 1, 2], [1, 2, 1], [2, 0, 2], [2, 1, 1], [2, 2, 0]. %p A163181 b:= proc(n, k, l) option remember; `if`(k=0, 1, %p A163181 `if`(l=0, 0, add(b(n, k-j, l-1), j=0..min(n-1, k)))) %p A163181 end: %p A163181 T:= (n, k)-> b(n, k, n): %p A163181 seq(seq(T(n, k), k=0..n*(n-1)), n=1..8); # _Alois P. Heinz_, Feb 21 2013 %t A163181 (*warning very inefficient*) Table[Distribution[Map[Total, Strings[Range[n], n]]], {n, 1, 6}]//Grid %t A163181 nn=100;Table[CoefficientList[Series[Sum[x^i,{i,0,n-1}]^n,{x,0,nn}],x],{n,1,10}]//Grid (* _Geoffrey Critzer_, Feb 21 2013*) %Y A163181 The maximum of row n is in column k=n(n-1)/2 = A000217(n-1). %Y A163181 For q-nomial arrays, see A000012, A007318, A027907, A008287, A035343, A063260, A063265, A171890. See also A181567. - _Matthew Vandermast_, Oct 31 2010 %K A163181 nonn,tabf %O A163181 1,3 %A A163181 _Geoffrey Critzer_, Jul 22 2009