%I #11 Sep 08 2022 08:45:51
%S 1,1,1,1,12,1,1,24,24,1,1,40,960,40,1,1,60,2400,2400,60,1,1,84,5040,
%T 201600,5040,84,1,1,112,9408,564480,564480,9408,112,1,1,144,16128,
%U 1354752,81285120,1354752,16128,144,1,1,180,25920,2903040,243855360,243855360,2903040,25920,180,1
%N Triangle T(n, k, q) = n!*(n+1)!*q^k/((n-k)!(n-k+1)!) if floor(n/2) > k-1, otherwise n!*(n+1)!*q^(n-k)/(k!*(k+1)!) for q = 2, read by rows.
%H G. C. Greubel, <a href="/A174450/b174450.txt">Rows n = 0..50 of the triangle, flattened</a>
%F T(n, k, q) = n!*(n+1)!*q^k/((n-k)!(n-k+1)!) if floor(n/2) > k-1, otherwise n!*(n+1)!*q^(n-k)/(k!*(k+1)!) for q = 2.
%F T(n, n-k, q) = T(n, k, q).
%F From _G. C. Greubel_, Nov 29 2021: (Start)
%F T(2*n, n, q) = q^n*(2*n+1)!*Catalan(n) for q = 2.
%F T(n, k, q) = binomial(n, k)*binomial(n+1, k+1) * ( k!*(k+1)!*q^k/(n-k+1) if (floor(n/2) >= k), otherwise ((n-k)!)^2*q^(n-k) ), for q = 2. (End)
%e Triangle begins as:
%e 1;
%e 1, 1;
%e 1, 12, 1;
%e 1, 24, 24, 1;
%e 1, 40, 960, 40, 1;
%e 1, 60, 2400, 2400, 60, 1;
%e 1, 84, 5040, 201600, 5040, 84, 1;
%e 1, 112, 9408, 564480, 564480, 9408, 112, 1;
%e 1, 144, 16128, 1354752, 81285120, 1354752, 16128, 144, 1;
%e 1, 180, 25920, 2903040, 243855360, 243855360, 2903040, 25920, 180, 1;
%t T[n_, k_, q_]:= If[Floor[n/2]>k-1, n!*(n+1)!*q^k/((n-k)!*(n-k+1)!), n!*(n+1)!*q^(n-k)/(k!*(k+1)!)];
%t Table[T[n, k, 2], {n,0,12}, {k,0,n}]//Flatten
%o (Magma)
%o F:= Factorial; // T = A174450
%o T:= func< n,k,q | Floor(n/2) gt k-1 select F(n)*F(n+1)*q^k/(F(n-k)*F(n-k+1)) else F(n)*F(n+1)*q^(n-k)/(F(k)*F(k+1)) >;
%o [T(n,k,2): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Nov 29 2021
%o (Sage)
%o f=factorial
%o def A174450(n,k,q):
%o if ((n//2)>k-1): return f(n)*f(n+1)*q^k/(f(n-k)*f(n-k+1))
%o else: return f(n)*f(n+1)*q^(n-k)/(f(k)*f(k+1))
%o flatten([[A174450(n,k,2) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Nov 29 2021
%Y Cf. A174449 (q=1), this sequence (q=2), A174451 (q=3).
%Y Cf. A000108.
%K nonn,tabl,easy
%O 0,5
%A _Roger L. Bagula_, Mar 20 2010
%E Edited by _G. C. Greubel_, Nov 29 2021