A142070 Triangle T(n,k) read by rows: the coefficient [x^k] of the polynomial Product_{i=1..n} (i+1)*x-i in row n>=0 and column 0<=k<=n.
1, -1, 2, 2, -7, 6, -6, 29, -46, 24, 24, -146, 329, -326, 120, -120, 874, -2521, 3604, -2556, 720, 720, -6084, 21244, -39271, 40564, -22212, 5040, -5040, 48348, -197380, 444849, -598116, 479996, -212976, 40320, 40320, -432144, 2014172, -5335212, 8788569, -9223012, 6023772, -2239344, 362880
Offset: 0
Examples
Triangle begins as: 1; -1, 2; 2, -7, 6; -6, 29, -46, 24; 24, -146, 329, -326, 120; -120, 874, -2521, 3604, -2556, 720; 720, -6084, 21244, -39271, 40564, -22212, 5040; -5040, 48348, -197380, 444849, -598116, 479996, -212976, 40320; 40320, -432144, 2014172, -5335212, 8788569, -9223012, 6023772, -2239344, 362880;
Links
- G. C. Greubel, Rows n = 0..50 of the triangle, flattened
Programs
-
Magma
A142070:= func< n,k | (-1)^(n-k)*(&+[(-1)^j*Binomial(j,n-k)*StirlingFirst(n+1,n-j+1): j in [0..n]]) >; [A142070(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Feb 24 2022
-
Maple
A142070 := proc(n,k) local x,i ; mul( (i+1)*x-i,i=1..n) ; expand(%) ; coeff(%,x,k) ; end proc:
-
Mathematica
(* First program *) p[x_, n_]:= Product[(i+1)*x - i, {i, n}]; Table[CoefficientList[p[x, n], x], {n,0,10}]//Flatten (* Second program *) T[n_, k_]:= T[n, k]= Sum[(-1)^j*Binomial[j+n-k, n-k]*StirlingS1[n+1,k-j+1], {j, 0, k}]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 24 2022 *)
-
PARI
row(n) = Vecrev(prod(j=1, n, (1+j)*x - j)); \\ Michel Marcus, Feb 24 2022
-
Sage
def A142070(n,k): return (-1)^(n-k)*sum(binomial(j+n-k, n-k)*stirling_number1(n+1, k-j+1) for j in (0..k)) flatten([[A142070(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Feb 24 2022
Formula
T(n, k) = [x^k]( Product_{j=1..n} ((1+j)*x - j) ).
Sum_{k=0..n} T(n, k) = 1.
From G. C. Greubel, Feb 24 2022: (Start)
T(n, k) = (-1)^(n-k) * Sum_{j=0..n} (-1)^j*binomial(j,n-k)*Stirling1(n+1, n-j+1).
T(n, k) = Sum_{j=0..k} (-1)^j*binomial(j+n-k,n-k)*Stirling1(n+1, k-j+1).
T(n, 0) = (-1)^n * n!.
T(n, n) = (n+1)!. (End)
Comments