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

%I #13 Feb 11 2021 02:44:12

%S 1,1,1,1,1,1,1,4,4,1,1,9,36,9,1,1,16,144,144,16,1,1,25,400,900,400,25,

%T 1,1,36,900,3600,3600,900,36,1,1,49,1764,11025,19600,11025,1764,49,1,

%U 1,64,3136,28224,78400,78400,28224,3136,64,1,1,81,5184,63504,254016,396900,254016,63504,5184,81,1

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

%C This triangle sequence is part of a class of triangles defined by T(n, k, q) = (n-k)^q * binomial(n-1, k-1)^q with T(n, 0) = T(n, n) = 1 and have row sums Sum_{k=0..n} T(n, k, q) = 2 - [n=0] + Sum_{k=1..n-1} k^q * binomial(n-1, k)^q. - _G. C. Greubel_, Feb 10 2021

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

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

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

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

%F Sum_{k=0..n} T(n, k) = 2 + A037966(n-1) - [n=0] = 2 + (n-1)^3*C_{n-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, 4, 4, 1;

%e 1, 9, 36, 9, 1;

%e 1, 16, 144, 144, 16, 1;

%e 1, 25, 400, 900, 400, 25, 1;

%e 1, 36, 900, 3600, 3600, 900, 36, 1;

%e 1, 49, 1764, 11025, 19600, 11025, 1764, 49, 1;

%e 1, 64, 3136, 28224, 78400, 78400, 28224, 3136, 64, 1;

%e 1, 81, 5184, 63504, 254016, 396900, 254016, 63504, 5184, 81, 1;

%t (* First program *)

%t c[n_]:= If[n<2, 1, Product[(i-1)^2, {i,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_, q_]:= If[k==0 || k==n, 1, (n-k)^q*Binomial[n-1, k-1]^q];

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

%o (Sage)

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

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

%o (Magma)

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

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

%Y Cf. A000108, A037966.

%Y Cf. A155865 (q=1), this sequence (q=2), A174127 (q=3).

%K nonn,tabl,easy

%O 0,8

%A _Roger L. Bagula_, Mar 09 2010

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