login
Triangle read by rows: T(n,k) = binomial(n-1,k-1)*binomial(n,k-1)/k + binomial(n-1,k)*binomial(n,k)/(k+1) (1 <= k <= n). In other words, to each entry of the Narayana triangle (A001263) add the entry on its right.
2

%I #23 Feb 08 2022 02:15:22

%S 1,2,1,4,4,1,7,12,7,1,11,30,30,11,1,16,65,100,65,16,1,22,126,280,280,

%T 126,22,1,29,224,686,980,686,224,29,1,37,372,1512,2940,2940,1512,372,

%U 37,1,46,585,3060,7812,10584,7812,3060,585,46,1,56,880,5775,18810,33264,33264,18810,5775,880,56,1

%N Triangle read by rows: T(n,k) = binomial(n-1,k-1)*binomial(n,k-1)/k + binomial(n-1,k)*binomial(n,k)/(k+1) (1 <= k <= n). In other words, to each entry of the Narayana triangle (A001263) add the entry on its right.

%C Sum of entries in row n = 2*Cat(n)-1, where Cat(n) are the Catalan numbers (A000108).

%C Row sums = A131428 starting (1, 3, 9, 27, 83, ...). - _Gary W. Adamson_, Aug 31 2007

%H G. C. Greubel, <a href="/A118976/b118976.txt">Rows n = 1..100 of triangle, flattened</a>

%F G.f.: A001263(x, y)*(x + x*y) + x*y. - _Vladimir Kruchinin_, Oct 21 2020

%e First few rows of the triangle:

%e 1;

%e 2, 1;

%e 4, 4, 1;

%e 7, 12, 7, 1;

%e 11, 30, 30, 11, 1;

%e 16, 65, 100, 65, 16, 1;

%e ...

%e Row 4 of the triangle = (7, 12, 7, 1), derived from row 4 of the Narayana triangle, (1, 6, 6, 1): = ((1+6), (6+6), (6+1), (1)).

%p T:=(n,k)->binomial(n-1,k-1)*binomial(n,k-1)/k+binomial(n-1,k) *binomial(n,k)/ (k+1): for n from 1 to 12 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form

%p # Alternatively:

%p gf := 1 - ((1/2)*(x + 1)*(sqrt((x*y + y - 1)^2 - 4*y^2*x) + x*y + y - 1))/(y*x):

%p sery := series(gf, y, 10): coeffy := n -> expand(coeff(sery, y, n)):

%p seq(print(seq(coeff(coeffy(n), x, k), k=1..n)), n=1..8); # _Peter Luschny_, Oct 21 2020

%t With[{B=Binomial}, Table[B[n-1,k-1]*B[n,k-1]/k + B[n-1,k]*B[n,k]/(k+1), {n,12}, {k,n}]//Flatten] (* _G. C. Greubel_, Aug 12 2019 *)

%o (PARI) T(n,k) = b=binomial; b(n-1,k-1)*b(n,k-1)/k + b(n-1,k)*b(n,k)/(k+1);

%o for(n=1,12, for(k=1,n, print1(T(n,k), ", "))) \\ _G. C. Greubel_, Aug 12 2019

%o (Magma) B:=Binomial; [B(n-1,k-1)*B(n,k-1)/k + B(n-1,k)*B(n,k)/(k+1): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Aug 12 2019

%o (Sage)

%o def T(n, k):

%o b=binomial

%o return b(n-1,k-1)*b(n,k-1)/k + b(n-1,k)*b(n,k)/(k+1)

%o [[T(n, k) for k in (1..n)] for n in (1..12)] # _G. C. Greubel_, Aug 12 2019

%o (GAP) B:=Binomial; Flat(List([1..12], n-> List([1..n], k-> B(n-1,k-1)*B(n,k-1)/k + B(n-1,k)*B(n,k)/(k+1) ))); # _G. C. Greubel_, Aug 12 2019

%Y Cf. A001263, A034856, A000108, A131428.

%K nonn,tabl

%O 1,2

%A _Gary W. Adamson_, May 07 2006

%E Edited by _N. J. A. Sloane_, Nov 29 2006