%I #9 Jul 29 2024 06:22:40
%S 1,1,1,2,5,1,5,22,9,1,14,93,58,13,1,42,386,325,110,17,1,132,1586,1686,
%T 765,178,21,1,429,6476,8330,4746,1477,262,25,1,1430,26333,39796,27314,
%U 10654,2525,362,29,1,4862,106762,185517,149052,69930,20754,3973,478,33,1
%N A triangle related to A000108 (Catalan) and A000302 (powers of 4).
%H G. C. Greubel, <a href="/A046527/b046527.txt">Rows n = 0..50 of the triangle, flattened</a>
%F T(n, k) = binomial(n, k-1)*( 4^(n-k+1) - binomial(2*n, n)/binomial(2*(k-1), k-1) )/2, for n >= k >= 0, with T(n, 0) = A000108(n).
%F G.f. for column k: c(x)*(x/(1-4*x))^m, where c(x) = g.f. for Catalan numbers (A000108).
%e Triangle begins as:
%e 1;
%e 1, 1;
%e 2, 5, 1;
%e 5, 22, 9, 1;
%e 14, 93, 58, 13, 1;
%e 42, 386, 325, 110, 17, 1;
%e 132, 1586, 1686, 765, 178, 21, 1;
%e 429, 6476, 8330, 4746, 1477, 262, 25, 1;
%e 1430, 26333, 39796, 27314, 10654, 2525, 362, 29, 1;
%e 4862, 106762, 185517, 149052, 69930, 20754, 3973, 478, 33, 1;
%t T[n_, k_]:= If[k==0, CatalanNumber[n], (1/2)*Binomial[n,k-1]*(4^(n-k+ 1) -Binomial[2*n,n]/Binomial[2*(k-1),k-1])];
%t Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, Jul 28 2024 *)
%o (Magma)
%o A046527:= func< n,k | k eq 0 select Catalan(n) else (1/2)*Binomial(n, k-1)*(4^(n-k+1) - Binomial(2*n, n)/(k*Catalan(k-1))) >;
%o [A046527(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Jul 28 2024
%o (SageMath)
%o def A046527(n,k):
%o if k==0: return catalan_number(n)
%o else: return (1/2)*binomial(n, k-1)*(4^(n-k+1) - binomial(2*n, n)/binomial(2*(k-1), k-1))
%o flatten([[A046527(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Jul 28 2024
%Y Column sequences are: A000108 (k=0), A000346 (k=1), A018218 (k=2), A042941 (k=3), A042985 (k=4), A045505 (k=5), A045622 (k=6).
%Y Row sums: A046814.
%K easy,nonn,tabl
%O 0,4
%A _Wolfdieter Lang_