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.

A128320 Triangle, read by rows, where T(n,k) equals the dot product of the vector of terms in row n that are to the right of T(n,k) with the vector of terms in column k that are above T(n,k) for n>k+1>0, with the odd numbers in the secondary diagonal and all 1's in the main diagonal.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 17, 8, 5, 1, 98, 41, 12, 7, 1, 622, 234, 73, 16, 9, 1, 4512, 1602, 418, 113, 20, 11, 1, 35373, 11976, 3110, 650, 161, 24, 13, 1, 300974, 98541, 23920, 5242, 930, 217, 28, 15, 1, 2722070, 866942, 207549, 41304, 8094, 1258, 281, 32, 17, 1
Offset: 0

Views

Author

Paul D. Hanna, Feb 25 2007

Keywords

Examples

			Illustrate the recurrence by:
  T(n,k) = [T(n,k+1),T(n,k+2), ..,T(n,n)]*[T(k,k),T(k+1,k),..,T(n-1,k)]:
  T(3,0) = [8,5,1]*[1,1,4]~ = 8*1 + 5*1 + 1*4 = 17;
  T(4,1) = [12,7,1]*[1,3,8]~ = 12*1 + 7*3 + 1*8 = 41;
  T(5,1) = [73,16,9,1]*[1,3,8,41]~ = 73*1 + 16*3 + 9*8 + 1*41 = 234;
  T(6,2) = [113,20,11,1]*[1,5,12,73]~ = 113*1 + 20*5 + 11*12 + 1*73 = 418.
Triangle begins:
         1;
         1,       1;
         4,       3,       1;
        17,       8,       5,      1;
        98,      41,      12,      7,     1;
       622,     234,      73,     16,     9,     1;
      4512,    1602,     418,    113,    20,    11,    1;
     35373,   11976,    3110,    650,   161,    24,   13,   1;
    300974,   98541,   23920,   5242,   930,   217,   28,  15,  1;
   2722070,  866942,  207549,  41304,  8094,  1258,  281,  32, 17,  1;
  26118056, 8139602, 1885166, 377757, 65088, 11762, 1634, 353, 36, 19, 1;
		

Crossrefs

Columns k: A128321 (k=0), A128322 (k=1), A128323 (k=2).
Sums: A128324 (row sums).
Variant of: A115080.

Programs

  • Magma
    function T(n,k) // T = A128320
       if k eq n then return 1;
       elif k eq n-1 then return 2*n-1;
       else return (&+[T(n, k+j+1)*T(k+j, k): j in [0..n-k-1]]);
       end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jun 25 2024
    
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==n-1, 2*n-1, Sum[T[n,k+j+1] *T[k+j,k], {j,0,n-k-1}]]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 25 2024 *)
  • PARI
    {T(n,k)=if(n==k,1, if(n==k+1,2*n-1, sum(i=0,n-k-1, T(n,k+i+1)*T(k+i,k))))};
    for(n=0, 12, for(k=0, n, print1(T(n, k), ", ")); print(""))
    
  • SageMath
    @CachedFunction
    def T(n,k): # T = A128320
        if k==n: return 1
        elif k==n-1: return 2*n-1
        else: return sum(T(n, k+j+1)*T(k+j, k) for j in range(n-k))
    flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jun 25 2024

Formula

T(n,k) = Sum_{j=0..n-1-k} T(n,k+j+1)*T(k+j,k) for n > k+1 > 0, with T(n,n) = 1 and T(n, n-1) = 2*n-1 for k >= 0.