cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A118976 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.

This page as a plain text file.
%I A118976 #23 Feb 08 2022 02:15:22
%S A118976 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 A118976 126,22,1,29,224,686,980,686,224,29,1,37,372,1512,2940,2940,1512,372,
%U A118976 37,1,46,585,3060,7812,10584,7812,3060,585,46,1,56,880,5775,18810,33264,33264,18810,5775,880,56,1
%N A118976 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 A118976 Sum of entries in row n = 2*Cat(n)-1, where Cat(n) are the Catalan numbers (A000108).
%C A118976 Row sums = A131428 starting (1, 3, 9, 27, 83, ...). - _Gary W. Adamson_, Aug 31 2007
%H A118976 G. C. Greubel, <a href="/A118976/b118976.txt">Rows n = 1..100 of triangle, flattened</a>
%F A118976 G.f.: A001263(x, y)*(x + x*y) + x*y. - _Vladimir Kruchinin_, Oct 21 2020
%e A118976 First few rows of the triangle:
%e A118976    1;
%e A118976    2,  1;
%e A118976    4,  4,   1;
%e A118976    7, 12,   7,  1;
%e A118976   11, 30,  30, 11,  1;
%e A118976   16, 65, 100, 65, 16, 1;
%e A118976 ...
%e A118976 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 A118976 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 A118976 # Alternatively:
%p A118976 gf := 1 - ((1/2)*(x + 1)*(sqrt((x*y + y - 1)^2 - 4*y^2*x) + x*y + y - 1))/(y*x):
%p A118976 sery := series(gf, y, 10): coeffy := n -> expand(coeff(sery, y, n)):
%p A118976 seq(print(seq(coeff(coeffy(n), x, k), k=1..n)), n=1..8); # _Peter Luschny_, Oct 21 2020
%t A118976 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 A118976 (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 A118976 for(n=1,12, for(k=1,n, print1(T(n,k), ", "))) \\ _G. C. Greubel_, Aug 12 2019
%o A118976 (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 A118976 (Sage)
%o A118976 def T(n, k):
%o A118976     b=binomial
%o A118976     return b(n-1,k-1)*b(n,k-1)/k + b(n-1,k)*b(n,k)/(k+1)
%o A118976 [[T(n, k) for k in (1..n)] for n in (1..12)] # _G. C. Greubel_, Aug 12 2019
%o A118976 (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 A118976 Cf. A001263, A034856, A000108, A131428.
%K A118976 nonn,tabl
%O A118976 1,2
%A A118976 _Gary W. Adamson_, May 07 2006
%E A118976 Edited by _N. J. A. Sloane_, Nov 29 2006