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.

A176483 Triangle, read by rows, defined by T(n, k) = b(n) - b(k) - b(n-k) + 1, where b(n) = 5*b(n-1) - 4*b(n-2) + 3*b(n-3) - 2*b(n-4) - b(n-5) and b(0) = 0, b(1) = 1, b(2) = 5, b(3) = 21, b(4) = 88.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 16, 16, 1, 1, 67, 79, 67, 1, 1, 281, 344, 344, 281, 1, 1, 1176, 1453, 1504, 1453, 1176, 1, 1, 4921, 6093, 6358, 6358, 6093, 4921, 1, 1, 20594, 25511, 26671, 26885, 26671, 25511, 20594, 1, 1, 86185, 106775, 111680, 112789, 112789, 111680, 106775, 86185, 1
Offset: 0

Views

Author

Roger L. Bagula, Apr 18 2010

Keywords

Comments

Row sums are {1, 2, 6, 34, 215, 1252, 6764, 34746, 172439, 834860, 3967727, ...}.

Examples

			Triangle begins as:
  1;
  1,     1;
  1,     4,      1;
  1,    16,     16,      1;
  1,    67,     79,     67,      1;
  1,   281,    344,    344,    281,      1;
  1,  1176,   1453,   1504,   1453,   1176,      1;
  1,  4921,   6093,   6358,   6358,   6093,   4921,      1;
  1, 20594,  25511,  26671,  26885,  26671,  25511,  20594,     1;
  1, 86185, 106775, 111680, 112789, 112789, 111680, 106775, 86185, 1;
...
T(3,2) = b(3) - b(2) - b(3 - 2) + 1 = 21 - 5 - 1 + 1 = 16 [b(1) = 1, b(2) = 5, b(3) = 21]. - _Indranil Ghosh_, Feb 17 2017
		

Crossrefs

Cf. A095263.

Programs

  • Mathematica
    b[0]:=0; b[1]:=1; b[2]:=5; b[3]:=21; b[4]:=88;
    b[n_]:= 5*b[n-1] -4*b[n-2] +3*b[n-3] -2*b[n-4] -b[n-5];
    T[n_, m_]:= b[n] -b[m] -b[n-m] +1;
    Table[T[n, m], {n,0,10}, {m,0,n}]//Flatten (* modified by G. C. Greubel, May 06 2019 *)
  • PARI
    {b(n) = if(n==0, 0, if(n==1, 1, if(n==2, 5, if(n==3, 21, if(n==4, 88, 5*b(n-1) -4*b(n-2) +3*b(n-3) -2*b(n-4) -b(n-5))))))};
    {T(n, k) = b(n) -b(k) -b(n-k) +1};
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, May 06 2019
    
  • Sage
    def b(n):
        if (n==0): return 0
        elif (n==1): return 1
        elif (n==2): return 5
        elif (n==3): return 21
        elif (n==4): return 88
        else: return 5*b(n-1) -4*b(n-2) +3*b(n-3) -2*b(n-4) -b(n-5)
    def T(n, k): return b(n) - b(k) - b(n-k) + 1
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 06 2019

Formula

Let b(n) = 5*b(n-1) - 4*b(n-2) + 3*b(n-3) - 2*b(n-4) - b(n-5), with b(0) = 0, b(1) = 1, b(2) = 5, b(3) = 21, b(4) = 88, then T(n, k) = b(n) - b(k) - b(n-k) + 1.

Extensions

Edited by G. C. Greubel, May 06 2019