OFFSET
2,2
COMMENTS
T(n,k) is the sum of the digits in all n-ary words of length k. That is, sequences of k digits taken on an alphabet of {0,1,2,...,n-1}.
Note the rectangle is indexed begining from n = 2 (binary sequences) which is A001787.
LINKS
G. C. Greubel, Antidiagonals n=2..101, flattened
FORMULA
E.g.f. for row n: binomial(n,2)*x*exp(n*x).
EXAMPLE
1,4,12,32,80,192,448,1024
3,18,81,324,1215,4374,15309,52488
6,48,288,1536,7680,36864,172032,786432
10,100,750,5000,31250,187500,1093750,6250000
15,180,1620,12960,97200,699840,4898880,33592320
MAPLE
T:= (n, k)-> binomial(n, 2)*k*n^(k-1):
seq(seq(T(n, 1+d-n), n=2..d), d=2..14); # Alois P. Heinz, Jan 17 2013
MATHEMATICA
Table[Range[8]! Rest[CoefficientList[Series[Binomial[n, 2]x Exp[n x], {x, 0, 8}], x]], {n, 2, 10}]//Grid
T[n_, k_]:= Binomial[n, 2]*k*n^(k-1); Table[T[k, n-k], {n, 2, 10}, {k, 2, n-1}]//Flatten (* G. C. Greubel, Jan 24 2019 *)
PROG
(PARI) {T(n, k) = binomial(n, 2)*k*n^(k-1)};
for(n=2, 10, for(k=2, n-1, print1(T(k, n-k), ", "))) \\ G. C. Greubel, Jan 24 2019
(Magma) [[Binomial(k, 2)*(n-k)*k^(n-k-1): k in [2..n-1]]: n in [3..10]]; // G. C. Greubel, Jan 24 2019
(Sage) [[binomial(k, 2)*(n-k)*k^(n-k-1) for k in (2..n-1)] for n in (3..10)] # G. C. Greubel, Jan 24 2019
(GAP) T:=Flat(List([3..10], n-> List([2..n-1], k-> Binomial(k, 2)*(n-k)* k^(n-k-1) ))); # G. C. Greubel, Jan 24 2019
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Geoffrey Critzer, Dec 26 2010
STATUS
approved