login
Triangle T(n, k) = binomial(n, k)*( n!/k! if floor(n/2) >= k otherwise n!/(n-k)! ), read by rows.
1

%I #7 Sep 08 2022 08:45:51

%S 1,1,1,2,4,2,6,18,18,6,24,96,72,96,24,120,600,600,600,600,120,720,

%T 4320,5400,2400,5400,4320,720,5040,35280,52920,29400,29400,52920,

%U 35280,5040,40320,322560,564480,376320,117600,376320,564480,322560,40320,362880,3265920,6531840,5080320,1905120,1905120,5080320,6531840,3265920,362880

%N Triangle T(n, k) = binomial(n, k)*( n!/k! if floor(n/2) >= k otherwise n!/(n-k)! ), read by rows.

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

%F T(n, k) = binomial(n, k)*( n!/k! if floor(n/2) >= k otherwise n!/(n-k)! ).

%F From _G. C. Greubel_, Nov 24 2021: (Start)

%F T(n, k) = binomial(n, k)^2*( (n-k)! if floor(n/2) >= k otherwise k! ).

%F T(n, 0) = T(n, n) = n!.

%F T(n, k) = T(n, n-k).

%F T(2*n, n) = (-1)^n*A295383(n). (End)

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 2, 4, 2;

%e 6, 18, 18, 6;

%e 24, 96, 72, 96, 24;

%e 120, 600, 600, 600, 600, 120;

%e 720, 4320, 5400, 2400, 5400, 4320, 720;

%e 5040, 35280, 52920, 29400, 29400, 52920, 35280, 5040;

%e 40320, 322560, 564480, 376320, 117600, 376320, 564480, 322560, 40320;

%t T[n_, k_]:= Binomial[n, k]*If[Floor[n/2]>=k, n!/k!, n!/(n-k)!];

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

%o (Magma)

%o A174298:= func< n,k | Floor(n/2) gt k select Factorial(n-k)*Binomial(n,k)^2 else Factorial(k)*Binomial(n,k)^2 >;

%o [A174298(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Nov 24 2021

%o (Sage)

%o def A174298(n,k): return binomial(n,k)^2*( factorial(n-k) if ((n//2) > k-1) else factorial(k))

%o flatten([[A174298(n,k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Nov 24 2021

%Y Cf. A295383.

%K nonn,tabl

%O 0,4

%A _Roger L. Bagula_, Mar 15 2010

%E Edited by _G. C. Greubel_, Nov 24 2021