Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Sep 08 2022 08:45:28
%S 1,1,2,1,3,3,1,4,5,4,1,5,10,7,5,1,6,14,20,9,6,1,7,21,30,35,11,7,1,8,
%T 27,56,55,56,13,8,1,9,36,77,126,91,84,15,9,1,10,44,120,182,252,140,
%U 120,17,10,1,11,55,156,330,378,462,204,165,19,11
%N Triangle T(n,k) = |A053123(n/2+k/2,k)| for even n+k, T(n,k)= A082985((n+k-1)/2,k) for odd n+k; read by rows, 0<=k<=n.
%H G. C. Greubel, <a href="/A125175/b125175.txt">Rows n = 0..100 of triangle, flattened</a>
%F T(n,k) = binomial(n+1,k) if n+k even. T(n,k) = binomial(n-1,k)*(n+k)/(n-k) if n+k odd. - _R. J. Mathar_, Sep 08 2013
%e First few rows of the triangle are:
%e 1;
%e 1, 2;
%e 1, 3, 3;
%e 1, 4, 5, 4;
%e 1, 5, 10, 7, 5;
%e 1, 6, 14, 20, 9, 6;
%e 1, 7, 21, 30, 35, 11, 7;
%e 1, 8, 27, 56, 55, 56, 13, 8;
%e 1, 9, 36, 77, 126, 91, 84, 15, 9; ...
%p A125175 := proc(n,k)
%p if type(n+k,'even') then
%p binomial(n+1,k) ;
%p else
%p binomial(n-1,k)*(n+k)/(n-k) ;
%p end if;
%p end proc: # _R. J. Mathar_, Sep 08 2013
%t Table[If[EvenQ[n+k], Binomial[n+1, k], Binomial[n-1, k]*(n+k)/(n-k)], {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, Jun 05 2019 *)
%o (PARI) {T(n,k) = if((n+k)%2==0, binomial(n+1,k), binomial(n-1, k)* (n+k)/(n-k))}; \\ _G. C. Greubel_, Jun 05 2019
%o (Magma) [[ k eq n select n+1 else (n+k mod 2) eq 0 select Binomial(n+1,k) else Binomial(n-1, k)*(n+k)/(n-k): k in [0..n]]: n in [0..12]]; // _G. C. Greubel_, Jun 05 2019
%o (Sage)
%o def T(n, k):
%o if (mod(n+k,2)==0): return binomial(n+1,k)
%o else: return binomial(n-1, k)* (n+k)/(n-k)
%o [[T(n, k) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, Jun 05 2019
%Y Cf. A053123, A082985, A125176 (row sums).
%K nonn,tabl,easy
%O 0,3
%A _Gary W. Adamson_, Nov 22 2006