%I #31 Sep 08 2022 08:46:22
%S 1,0,-1,0,-1,2,0,-1,2,-6,0,-1,4,-6,24,0,-1,4,-12,24,-120,0,-1,6,-18,
%T 48,-120,720,0,-1,6,-24,72,-240,720,-5040,0,-1,8,-30,120,-360,1440,
%U -5040,40320,0,-1,8,-42,144,-600,2160,-10080,40320,-362880
%N T(n, k) = (-1)^k*k!*P(n, k), where P(n, k) is the number of partitions of n of length k. Triangle read by rows, 0 <= k <= n.
%H Alois P. Heinz, <a href="/A318144/b318144.txt">Rows n = 0..150, flattened</a> (first 45 rows from Peter Luschny)
%e [0] [1],
%e [1] [0, -1],
%e [2] [0, -1, 2],
%e [3] [0, -1, 2, -6],
%e [4] [0, -1, 4, -6, 24],
%e [5] [0, -1, 4, -12, 24, -120],
%e [6] [0, -1, 6, -18, 48, -120, 720],
%e [7] [0, -1, 6, -24, 72, -240, 720, -5040],
%e [8] [0, -1, 8, -30, 120, -360, 1440, -5040, 40320],
%e [9] [0, -1, 8, -42, 144, -600, 2160, -10080, 40320, -362880]
%p b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>1,
%p b(n, i-1), 0)+expand(b(n-i, min(n-i, i))*x))
%p end:
%p T:= n-> (p-> seq(i!*coeff(p, x, i)*(-1)^i, i=0..n))(b(n$2)):
%p seq(T(n), n=0..14); # _Alois P. Heinz_, Sep 18 2019
%t t[n_, k_] := (-1)^k k! (IntegerPartitions[n, {k}] // Length);
%t Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten
%t (* Second program: *)
%t b[n_, i_] := b[n, i] = If[n == 0, 1, If[i > 1,
%t b[n, i - 1], 0] + Expand[b[n - i, Min[n - i, i]]*x]];
%t T[n_] := Function[p, Table[i!*Coefficient[p, x, i]*(-1)^i, {i, 0, n}]][ b[n, n]];
%t T /@ Range[0, 14] // Flatten (* _Jean-François Alcover_, Jun 07 2021, after _Alois P. Heinz_ *)
%o (Sage)
%o from sage.combinat.partition import number_of_partitions_length
%o def A318144row(n):
%o return [(-1)^k*number_of_partitions_length(n, k)*factorial(k) for k in (0..n)]
%o for n in (0..9): print(A318144row(n))
%o (Magma) /* As triangle: */
%o [[(-1)^k*#Partitions(n,k)*Factorial(k): k in [0..n]]: n in [0..10]]; // _Bruno Berselli_, Aug 20 2018
%Y Row sums are A260845, absolute row sums are A101880.
%Y Cf. A008284, A072233, A178803.
%K sign,tabl
%O 0,6
%A _Peter Luschny_, Aug 20 2018