%I #27 Oct 14 2024 02:33:05
%S 1,1,3,1,9,6,1,21,30,10,1,45,114,70,15,1,93,390,370,135,21,1,189,1266,
%T 1750,915,231,28,1,381,3990,7810,5535,1911,364,36,1,765,12354,33670,
%U 31515,14091,3556,540,45,1,1533,37830,141970,172935,97671,30940,6084,765,55
%N Rectangular array T(n,k) = binomial(n+1,2)*(n^k - (n-1)^k) read by antidiagonals.
%C T(n,k) is the sum of the elements in the image sets of all functions f:{1,2,...,k}->{1,2,...,n}.
%C Equivalently, the sum of the distinct entries in each length k sequence on {1,2,...,n}.
%H G. C. Greubel, <a href="/A178831/b178831.txt">Antidiagonals n = 1..100, flattened</a>
%F E.g.f. for row n: binomial(n+1,2)*exp((n-1)*x)*(exp(x) - 1).
%e Array begins
%e 1, 1, 1, 1, 1, 1, ...
%e 3, 9, 21, 45, 93, 189, ...
%e 6, 30, 114, 390, 1266, 3990, ...
%e 10, 70, 370, 1750, 7810, 33670, ...
%e 15, 135, 915, 5535, 31515, 172935, ...
%e 21, 231, 1911, 14091, 97671, 651651, ...
%t Table[Range[7]! Rest[CoefficientList[Series[Binomial[n+1,2] Exp[(n-1)x](Exp[x]-1),{x,0,7}],x]],{n,1,7}]//Grid
%t T[n_, k_]:= Binomial[n+2, 2]*((n+1)^k -n^k); Table[T[k, n-k], {n, 1, 10}, {k, 0, n-1}] (* _G. C. Greubel_, Jan 22 2019 *)
%o (PARI) {T(n, k) = binomial(n+2, 2)*((n+1)^k -(n)^k)};
%o for(n=1,10, for(k=0,n-1, print1(T(k,n-k), ", "))) \\ _G. C. Greubel_, Jan 22 2019
%o (Magma) [[Binomial(k+2,2)*((k+1)^(n-k) -k^(n-k)): k in [0..n-1]]: n in [1..10]]; // _G. C. Greubel_, Jan 22 2019
%o (Sage) [[binomial(k+2,2)*((k+1)^(n-k) -k^(n-k)) for k in (0..n-1)] for n in (1..10)] # _G. C. Greubel_, Jan 22 2019
%o (GAP) T:=Flat(List([1..10], n->List([0..n-1], k-> Binomial(k+2, 2)*( (k+1)^(n-k) -k^(n-k)) ))); # _G. C. Greubel_, Jan 22 2019
%Y Cf. A068156 the case for n=2.
%K nonn,tabl,easy
%O 1,3
%A _Geoffrey Critzer_, Dec 27 2010
%E Terms a(29) onward added by _G. C. Greubel_, Jan 22 2019