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.

A131113 T(n,k) = 5*binomial(n,k) - 4*I(n,k), where I is the identity matrix; triangle T read by rows (n >= 0 and 0 <= k <= n).

Original entry on oeis.org

1, 5, 1, 5, 10, 1, 5, 15, 15, 1, 5, 20, 30, 20, 1, 5, 25, 50, 50, 25, 1, 5, 30, 75, 100, 75, 30, 1, 5, 35, 105, 175, 175, 105, 35, 1, 5, 40, 140, 280, 350, 280, 140, 40, 1, 5, 45, 180, 420, 630, 630, 420, 180, 45, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 15 2007

Keywords

Comments

Row sums = A048487: (1, 6, 16, 36, 76, 156, ...).

Examples

			Triangle T(n,k) (with rows n >= 0 and columns k = 0..n) begins:
  1;
  5,  1;
  5, 10,  1;
  5, 15, 15,  1;
  5, 20, 30,  20,  1;
  5, 25, 50,  50, 25,  1;
  5, 30, 75, 100, 75, 30, 1;
  ...
		

Crossrefs

Programs

  • GAP
    T:= function(n,k)
        if k=n then return 1;
        else return 5*Binomial(n,k);
        fi;  end;
    Flat(List([0..10], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Nov 18 2019
  • Magma
    [k eq n select 1 else 5*Binomial(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Nov 18 2019
    
  • Maple
    seq(seq(`if`(k=n, 1, 5*binomial(n,k)), k=0..n), n=0..10); # G. C. Greubel, Nov 18 2019
  • Mathematica
    Table[If[k==n, 1, 5*Binomial[n, k]], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Nov 18 2019 *)
  • PARI
    T(n,k) = if(k==n, 1, 5*binomial(n,k)); \\ G. C. Greubel, Nov 18 2019
    
  • Sage
    def T(n, k):
        if k == n: return 1
        else: return 5*binomial(n, k)
    [[T(n, k) for k in (0..n)] for n in (0..10)]
    # G. C. Greubel, Nov 18 2019
    

Formula

T(n,k) = 5*A007318(n,k) - 4*I(n,k), where A007318 = Pascal's triangle and I = Identity matrix.
Bivariate o.g.f.: Sum_{n,k>=0} T(n,k)*x^n*y^k = (1 + 4*x - x*y)/((1 - x*y)*(1 - x - x*y)). - Petros Hadjicostas, Feb 20 2021