login
Triangle T(n, k) = (n/2)*binomial(n-1, k-1)*binomial(n-1, k) with T(n, 0) = T(n, n) = 1, read by rows.
5

%I #5 Feb 11 2021 22:57:14

%S 1,1,1,1,1,1,1,3,3,1,1,6,18,6,1,1,10,60,60,10,1,1,15,150,300,150,15,1,

%T 1,21,315,1050,1050,315,21,1,1,28,588,2940,4900,2940,588,28,1,1,36,

%U 1008,7056,17640,17640,7056,1008,36,1,1,45,1620,15120,52920,79380,52920,15120,1620,45,1

%N Triangle T(n, k) = (n/2)*binomial(n-1, k-1)*binomial(n-1, k) with T(n, 0) = T(n, n) = 1, read by rows.

%H G. C. Greubel, <a href="/A174116/b174116.txt">Rows n = 0..100 of the triangle, flattened</a>

%F Let c(n) = Product_{j=2..n} binomial(j,2) for n > 1 otherwise 1 then the number triangle is given by T(n, k) = c(n)/(c(k)*c(n-k)).

%F From _G. C. Greubel_, Feb 11 2021: (Start)

%F T(n, k) = (n/2)*binomial(n-1, k-1)*binomial(n-1, k) with T(n, 0) = T(n, n) = 1.

%F T(n, k) = binomial(n-k+1, 2)*A001263(n, k) with T(n, 0) = T(n, n) = 1.

%F Sum_{k=0..n} T(n,k) = binomial(n, 2)*C_{n-1} + 2 - [n=0], where C_{n} are the Catalan numbers (A000108) and [] is the Iverson bracket. (End)

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 1, 1;

%e 1, 3, 3, 1;

%e 1, 6, 18, 6, 1;

%e 1, 10, 60, 60, 10, 1;

%e 1, 15, 150, 300, 150, 15, 1;

%e 1, 21, 315, 1050, 1050, 315, 21, 1;

%e 1, 28, 588, 2940, 4900, 2940, 588, 28, 1;

%e 1, 36, 1008, 7056, 17640, 17640, 7056, 1008, 36, 1;

%e 1, 45, 1620, 15120, 52920, 79380, 52920, 15120, 1620, 45, 1;

%t (* First program *)

%t c[n_]:= If[n<2, 1, Product[Binomial[j,2], {j, 2, n}]];

%t T[n_, k_]:= c[n]/(c[k]*c[n-k]);

%t Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten

%t (* Second program *)

%t T[n_, k_]:= If[k==0 || k==n, 1, (n/2)*Binomial[n-1, k-1]*Binomial[n-1, k]];

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

%o (Sage)

%o def T(n,k): return 1 if (k==0 or k==n) else (n/2)*binomial(n-1, k-1)*binomial(n-1, k)

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

%o (Magma)

%o T:= func< n,k | k eq 0 or k eq n select 1 else (n/2)*Binomial(n-1, k-1)*Binomial(n-1, k) >;

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

%Y Cf. A174117, A174119, A174124, A174125.

%Y Cf. A000108, A001263.

%K nonn,tabl

%O 0,8

%A _Roger L. Bagula_, Mar 08 2010

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