login
Triangle A135225 + A007318 - A103451, read by rows.
3

%I #15 Mar 27 2022 19:03:07

%S 1,1,1,1,3,1,1,4,5,1,1,5,9,7,1,1,6,14,16,9,1,1,7,20,30,25,11,1,1,8,27,

%T 50,55,36,13,1,1,9,35,77,105,91,49,15,1,1,10,44,112,182,196,140,64,17,

%U 1,1,11,54,156,294,378,336,204,81,19,1

%N Triangle A135225 + A007318 - A103451, read by rows.

%C Row sums = A083329: (1, 2, 5, 11, 23, 47, 95, ...).

%H G. C. Greubel, <a href="/A135226/b135226.txt">Rows n = 0..100 of triangle, flattened</a>

%F T(n,k) = A135225(n,k) + A007318(n,k) - A103451(n,k) as infinite lower triangular matrices.

%F T(n,k) = ((n+k)/n)*binomial(n,k) with T(n,0) = T(n,n) = 1. - _G. C. Greubel_, Nov 20 2019

%e First few rows of the triangle:

%e 1;

%e 1, 1;

%e 1, 3, 1;

%e 1, 4, 5, 1;

%e 1, 5, 9, 7, 1;

%e 1, 6, 14, 16, 9, 1;

%e 1, 7, 20, 30, 25, 11, 1;

%e 1, 8, 27, 50, 55, 36, 13, 1;

%e ...

%p T:= proc(n, k) option remember;

%p if k=0 or k=n then 1

%p else ((n+k)/n)*binomial(n,k)

%p fi; end:

%p seq(seq(T(n, k), k=0..n), n=0..10); # _G. C. Greubel_, Nov 20 2019

%t T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, ((n+k)/n) Binomial[n, k]]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* _G. C. Greubel_, Nov 20 2019 *)

%o (PARI) T(n,k) = if(k==0 || k==n, 1, ((n+k)/n)*binomial(n,k)); \\ _G. C. Greubel_, Nov 20 2019

%o (Magma)

%o T:= func< n,k | k eq 0 or k eq n select 1 else ((n+k)/n)*Binomial(n,k) >;

%o [T(n,k): k in [0..n], n in [0..10]]; // _G. C. Greubel_, Nov 20 2019

%o (Sage)

%o @CachedFunction

%o def T(n,k):

%o if (k==0 or k==n): return 1

%o else: return ((n+k)/n)*binomial(n, k)

%o [[T(n,k) for k in (0..n)] for n in (0..10)] # _G. C. Greubel_, Nov 20 2019

%o (GAP)

%o T:= function(n,k)

%o if k=0 or k=n then return 1;

%o else return ((n+k)/n)*Binomial(n,k);

%o fi; end;

%o Flat(List([0..10], n-> List([0..n], k-> T(n,k) ))); # _G. C. Greubel_, Nov 20 2019

%Y Cf. A007318, A083329, A103451, A135225.

%K nonn,tabl

%O 0,5

%A _Gary W. Adamson_, Nov 23 2007

%E Corrected and extended by _Philippe Deléham_, Nov 14 2011