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.

A131240 T(n,k) = 2*A046854(n,k) - I.

Original entry on oeis.org

1, 2, 1, 2, 2, 1, 2, 4, 2, 1, 2, 4, 6, 2, 1, 2, 6, 6, 8, 2, 1, 2, 6, 12, 8, 10, 2, 1, 2, 8, 12, 20, 10, 12, 2, 1, 2, 8, 20, 20, 30, 12, 14, 2, 1, 2, 10, 20, 40, 30, 42, 14, 16, 2, 1, 2, 10, 30, 40, 70, 42, 56, 16, 18, 2, 1, 2, 12, 30, 70, 70, 112, 56, 72, 18, 20, 2, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 21 2007

Keywords

Comments

Row sums = A001595: (1, 3, 5, 9, 15, 25, 41, 67, ...).
A131241 = 3*A046854 - 2*I.

Examples

			First few rows of the triangle:
  1;
  2, 1;
  2, 2,  1;
  2, 4,  2, 1;
  2, 4,  6, 2,  1;
  2, 6,  6, 8,  2, 1;
  2, 6, 12, 8, 10, 2, 1;
  ...
		

Crossrefs

Programs

  • GAP
    T:= function(n,k)
        if k=n then return 1;
        else return 2*Binomial(Int((n+k)/2), k);
        fi;
      end;
    Flat(List([0..12], n-> List([0..n], k-> T(n,k)))); # G. C. Greubel, Jul 12 2019
  • Magma
    [k eq n select 1 else 2*Binomial(Floor((n+k)/2), k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    Table[If[k==n, 1, 2*Binomial[Floor[(n+k)/2], k]], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    T(n,k) = if(k==n, 1, 2*binomial((n+k)\2, k));
    
  • Sage
    def T(n, k):
        if (k==n): return 1
        else: return 2*binomial(floor((n+k)/2), k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jul 12 2019
    

Formula

T(n,k) = 2*A046854(n,k) - Identity matrix, where A046854 = Pascal's triangle with repeats by columns.

Extensions

More terms added by G. C. Greubel, Jul 12 2019