login
Triangle T(n, k) = Product_{j=1..k} Product_{i=0..j-1} ( 1 - (n-k+1)*(i+1) ) with T(n, 0) = 1 and T(n, n) = n!, read by rows.
8

%I #10 Feb 26 2021 03:00:45

%S 1,1,1,1,-1,2,1,-2,-3,6,1,-3,-20,45,24,1,-4,-63,1600,4725,120,1,-5,

%T -144,14553,1408000,-4465125,720,1,-6,-275,72576,50426145,

%U -17346560000,-46414974375,5040,1,-7,-468,257125,694987776,-3319805256075,-3633063526400000,6272287562165625,40320

%N Triangle T(n, k) = Product_{j=1..k} Product_{i=0..j-1} ( 1 - (n-k+1)*(i+1) ) with T(n, 0) = 1 and T(n, n) = n!, read by rows.

%C Row sums are: {1, 2, 2, 2, 47, 6379, -3042000, -63711030894, 2635904925794297,

%C 27927233169645980904169, 1028241148994588972886080924800, ...}.

%H G. C. Greubel, <a href="/A156693/b156693.txt">Rows n = 0..30 of the triangle, flattened</a>

%F Let the square array t(n, k) be given by t(n, k) = Product_{j=1..n} Product_{i=0..j-1} ( 1 - (k+1)*(i +1) ) with t(n, 0) = n!. The number triangle, T(n, k), is the downward antidiagonals, i.e. T(n, k) = t(k, n-k).

%F T(n, k) = (-(n-k+1))^binomial(k+1, 2)*Product_{j=1..k} Pochhammer( (n-k)/(n-k+1), j) with T(n, 0) = 1 and T(n, n) = n!. - _G. C. Greubel_, Feb 25 2021

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, -1, 2;

%e 1, -2, -3, 6;

%e 1, -3, -20, 45, 24;

%e 1, -4, -63, 1600, 4725, 120;

%e 1, -5, -144, 14553, 1408000, -4465125, 720;

%e 1, -6, -275, 72576, 50426145, -17346560000, -46414974375, 5040;

%t (* First program *)

%t t[n_, k_]= If[k==0, n!, Product[1 -(i+1)*(k+1), {j,n}, {i,0,j-1}]];

%t Table[t[k, n-k], {n,0,10}, {k,0,n}]//Flatten (* modified by _G. C. Greubel_, Feb 25 2021 *)

%t (* Second program *)

%t T[n_, k_, p_, q_]:= If[k==0, 1, If[k==n, n!, (-p*(n-k+1))^Binomial[k+1,2]*Product[ Pochhammer[(q*(n-k+1) -1)/(p*(n-k+1)), j], {j, k}]]];

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

%o (Sage)

%o @CachedFunction

%o def T(n,k,p,q):

%o if (k==0): return 1

%o elif (k==n): return factorial(n)

%o else: return (-p*(n-k+1))^binomial(k+1, 2)*product( rising_factorial( (q*(n-k+1)-1)/(p*(n-k+1)), j) for j in (1..k))

%o flatten([[T(n,k,1,1) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Feb 25 2021

%o (Magma)

%o function T(n,k,p,q)

%o if k eq 0 then return 1;

%o elif k eq n then return Factorial(n);

%o else return (&*[1 - (n-k+1)*(p*m+q): m in [0..j-1], j in [1..k]]);

%o end if; return T;

%o end function;

%o [T(n,k,1,1): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Feb 25 2021

%Y Cf. A156690, A156691, A156692.

%Y Cf. A156699, A156730.

%K sign,tabl

%O 0,6

%A _Roger L. Bagula_, Feb 13 2009

%E Edited by _G. C. Greubel_, Feb 25 2021