login
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

%I #22 Apr 25 2024 09:23:13

%S 1,-1,2,2,-7,6,-6,29,-46,24,24,-146,329,-326,120,-120,874,-2521,3604,

%T -2556,720,720,-6084,21244,-39271,40564,-22212,5040,-5040,48348,

%U -197380,444849,-598116,479996,-212976,40320,40320,-432144,2014172,-5335212,8788569,-9223012,6023772,-2239344,362880

%N 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.

%C This is essentially a signed version of A088996. - _Peter Bala_, Jan 09 2017

%H G. C. Greubel, <a href="/A142070/b142070.txt">Rows n = 0..50 of the triangle, flattened</a>

%F T(n, k) = [x^k]( Product_{j=1..n} ((1+j)*x - j) ).

%F Sum_{k=0..n} T(n, k) = 1.

%F From _G. C. Greubel_, Feb 24 2022: (Start)

%F T(n, k) = (-1)^(n-k) * Sum_{j=0..n} (-1)^j*binomial(j,n-k)*Stirling1(n+1, n-j+1).

%F T(n, k) = Sum_{j=0..k} (-1)^j*binomial(j+n-k,n-k)*Stirling1(n+1, k-j+1).

%F T(n, 0) = (-1)^n * n!.

%F T(n, n) = (n+1)!. (End)

%e Triangle begins as:

%e 1;

%e -1, 2;

%e 2, -7, 6;

%e -6, 29, -46, 24;

%e 24, -146, 329, -326, 120;

%e -120, 874, -2521, 3604, -2556, 720;

%e 720, -6084, 21244, -39271, 40564, -22212, 5040;

%e -5040, 48348, -197380, 444849, -598116, 479996, -212976, 40320;

%e 40320, -432144, 2014172, -5335212, 8788569, -9223012, 6023772, -2239344, 362880;

%p A142070 := proc(n,k)

%p local x,i ;

%p mul( (i+1)*x-i,i=1..n) ;

%p expand(%) ;

%p coeff(%,x,k) ;

%p end proc:

%t (* First program *)

%t p[x_, n_]:= Product[(i+1)*x - i, {i, n}];

%t Table[CoefficientList[p[x, n], x], {n,0,10}]//Flatten

%t (* Second program *)

%t T[n_, k_]:= T[n, k]= Sum[(-1)^j*Binomial[j+n-k, n-k]*StirlingS1[n+1,k-j+1], {j, 0, k}];

%t Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* _G. C. Greubel_, Feb 24 2022 *)

%o (Magma)

%o A142070:= func< n,k | (-1)^(n-k)*(&+[(-1)^j*Binomial(j,n-k)*StirlingFirst(n+1,n-j+1): j in [0..n]]) >;

%o [A142070(n,k): k in [0..n], n in [0..10]]; // _G. C. Greubel_, Feb 24 2022

%o (Sage)

%o 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))

%o flatten([[A142070(n, k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Feb 24 2022

%o (PARI) row(n) = Vecrev(prod(j=1, n, (1+j)*x - j)); \\ _Michel Marcus_, Feb 24 2022

%Y Cf. A048994, A088996.

%K sign,tabl,easy

%O 0,3

%A _Roger L. Bagula_ and _Gary W. Adamson_, Sep 15 2008