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.

Original entry on oeis.org

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, 126, 22, 1, 29, 224, 686, 980, 686, 224, 29, 1, 37, 372, 1512, 2940, 2940, 1512, 372, 37, 1, 46, 585, 3060, 7812, 10584, 7812, 3060, 585, 46, 1, 56, 880, 5775, 18810, 33264, 33264, 18810, 5775, 880, 56, 1
Offset: 1

Views

Author

Gary W. Adamson, May 07 2006

Keywords

Comments

Sum of entries in row n = 2*Cat(n)-1, where Cat(n) are the Catalan numbers (A000108).
Row sums = A131428 starting (1, 3, 9, 27, 83, ...). - Gary W. Adamson, Aug 31 2007

Examples

			First few rows of the triangle:
   1;
   2,  1;
   4,  4,   1;
   7, 12,   7,  1;
  11, 30,  30, 11,  1;
  16, 65, 100, 65, 16, 1;
...
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)).
		

Crossrefs

Programs

  • 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
  • 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
    
  • Maple
    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
    # Alternatively:
    gf := 1 - ((1/2)*(x + 1)*(sqrt((x*y + y - 1)^2 - 4*y^2*x) + x*y + y - 1))/(y*x):
    sery := series(gf, y, 10): coeffy := n -> expand(coeff(sery, y, n)):
    seq(print(seq(coeff(coeffy(n), x, k), k=1..n)), n=1..8); # Peter Luschny, Oct 21 2020
  • Mathematica
    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 *)
  • 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);
    for(n=1,12, for(k=1,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Aug 12 2019
    
  • Sage
    def T(n, k):
        b=binomial
        return b(n-1,k-1)*b(n,k-1)/k + b(n-1,k)*b(n,k)/(k+1)
    [[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Aug 12 2019
    

Formula

G.f.: A001263(x, y)*(x + x*y) + x*y. - Vladimir Kruchinin, Oct 21 2020

Extensions

Edited by N. J. A. Sloane, Nov 29 2006