%I #10 Sep 08 2022 08:45:41
%S 1,1,1,1,2,1,1,4,4,1,1,8,10,8,1,1,18,23,23,18,1,1,47,56,56,56,47,1,1,
%T 138,152,138,138,152,138,1,1,436,456,372,330,372,456,436,1,1,1438,
%U 1465,1111,847,847,1111,1465,1438,1,1,4871,4906,3586,2431,2002,2431,3586,4906,4871,1
%N Triangle, read by rows, T(n, k) = ((n-k)/(n+k))*binomial(n+k, n) + (k/(2*n-k))*binomial(2*n -k, n), with T(0,0) = 1.
%C Row sums are A068875(n): {1, 2, 4, 10, 28, 84, 264, 858, 2860, 9724, ...}.
%H G. C. Greubel, <a href="/A156006/b156006.txt">Rows n = 0..100 of triangle, flattened</a>
%F T(n, k) = ((n-k)/(n+k))*binomial(n+k, n) + (k/(2*n-k))*binomial(2*n -k, n), with T(0,0) = 1.
%F From _G. C. Greubel_, Dec 02 2019: (Start)
%F T(n, k) = ((n-k)/n)*binomial(n+k-1, k) + (k/(n-k))*binomial(2*n-k-1, n), with T(n,n) = 1.
%F Sum_{k=0..n} T(n, k) = A068875(n).
%F Sum_{k=1..n-1} T(n,k) = A128634(n), n >= 1. (End)
%e Triangle begins as:
%e 1;
%e 1, 1;
%e 1, 2, 1;
%e 1, 4, 4, 1;
%e 1, 8, 10, 8, 1;
%e 1, 18, 23, 23, 18, 1;
%e 1, 47, 56, 56, 56, 47, 1;
%e 1, 138, 152, 138, 138, 152, 138, 1;
%e 1, 436, 456, 372, 330, 372, 456, 436, 1;
%e 1, 1438, 1465, 1111, 847, 847, 1111, 1465, 1438, 1;
%e 1, 4871, 4906, 3586, 2431, 2002, 2431, 3586, 4906, 4871, 1;
%p seq(seq( `if`(k=n, 1, ((n-k)/n)*binomial(n+k-1, k) + (k/(n-k))*binomial(2*n-k-1, n)), k=0..n), n=0..10); # _G. C. Greubel_, Dec 02 2019
%t T[n_, k_]:= If[n==0, 1, ((n-k)/(n+k))*Binomial[n+k, n] + (k/(2*n-k))*Binomial[2*n -k, n]]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten
%o (PARI) T(n,k) = if(k==n, 1, ((n-k)/n)*binomial(n+k-1, k) + (k/(n-k))*binomial(2*n-k-1, n) ); \\ _G. C. Greubel_, Dec 02 2019
%o (Magma)
%o function T(n,k)
%o if k eq n then return 1;
%o else return ((n-k)/n)*Binomial(n+k-1, k) + (k/(n-k))*Binomial(2*n-k-1, n);
%o end if; return T; end function;
%o [T(n,k): k in [0..n], n in [0..10]]; // _G. C. Greubel_, Dec 02 2019
%o (Sage)
%o @CachedFunction
%o def T(n, k):
%o if (k==n): return 1
%o else: return ((n-k)/n)*binomial(n+k-1, k) + (k/(n-k))*binomial(2*n-k-1, n)
%o [[T(n, k) for k in (0..n)] for n in (0..10)] # _G. C. Greubel_, Dec 02 2019
%o (GAP)
%o T:= function(n,k)
%o if k=n then return 1;
%o else return ((n-k)/n)*Binomial(n+k-1, k) + (k/(n-k))*Binomial(2*n-k-1, n);
%o fi; end;
%o Flat(List([1..15], n-> List([1..n], k-> T(n,k) )));
%Y Cf. A009799, A068875, A128634.
%K nonn,tabl
%O 0,5
%A _Roger L. Bagula_, Feb 01 2009
%E Edited by _G. C. Greubel_, Dec 02 2019