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.

A091598 Triangle read by rows: T(n,0) = A078008(n), T(n,m) = T(n-1,m-1) + T(n-1,m).

Original entry on oeis.org

1, 0, 1, 2, 1, 1, 2, 3, 2, 1, 6, 5, 5, 3, 1, 10, 11, 10, 8, 4, 1, 22, 21, 21, 18, 12, 5, 1, 42, 43, 42, 39, 30, 17, 6, 1, 86, 85, 85, 81, 69, 47, 23, 7, 1, 170, 171, 170, 166, 150, 116, 70, 30, 8, 1, 342, 341, 341, 336, 316, 266, 186, 100, 38, 9, 1, 682, 683, 682, 677, 652, 582, 452, 286, 138, 47, 10, 1
Offset: 0

Views

Author

Paul Barry, Jan 23 2004

Keywords

Comments

A Jacobsthal-Pascal triangle.

Examples

			Triangle starts as:
   1;
   0,  1;
   2,  1,  1;
   2,  3,  2,  1;
   6,  5,  5,  3,  1;
  10, 11, 10,  8,  4,  1;
  22, 21, 21, 18, 12,  5, 1;
  42, 43, 42, 39, 30, 17, 6, 1; ...
		

Crossrefs

Columns include A078008, A001045, A000975, A011377. Row sums give A084219.
Cf. A091597.

Programs

  • Mathematica
    T[n_, k_]:= If[k==0, (2^n + 2*(-1)^n)/3, If[k<0 || k>n, 0, T[n-1, k-1] + T[n-1, k]]]; Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 04 2019 *)
  • PARI
    {T(n,k) = if(k==0, (2^n + 2*(-1)^n)/3, if(k<0 || k>n, 0, T(n-1,k-1) + T(n-1,k)))}; \\ G. C. Greubel, Jun 04 2019
    
  • Sage
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==0): return (2^n + 2*(-1)^n)/3
        else: return T(n-1, k-1) + T(n-1, k)
    [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Jun 04 2019

Formula

k-th column has e.g.f. ((1-x)/(1-x-x^2))*(x/(1-x))^k.