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.

A257608 Triangle read by rows: T(n,k) = t(n-k, k); t(n,m) = f(m)*t(n-1,m) + f(n)*t(n,m-1), where f(x) = 9*x + 1.

Original entry on oeis.org

1, 1, 1, 1, 20, 1, 1, 219, 219, 1, 1, 2218, 8322, 2218, 1, 1, 22217, 220222, 220222, 22217, 1, 1, 222216, 5006247, 12332432, 5006247, 222216, 1, 1, 2222215, 105340629, 530539235, 530539235, 105340629, 2222215, 1, 1, 22222214, 2123693776, 19700767514, 39259903390, 19700767514, 2123693776, 22222214, 1
Offset: 0

Views

Author

Dale Gerdemann, May 03 2015

Keywords

Examples

			Triangle begins as:
  1;
  1,       1;
  1,      20,         1;
  1,     219,       219,         1;
  1,    2218,      8322,      2218,         1;
  1,   22217,    220222,    220222,     22217,         1;
  1,  222216,   5006247,  12332432,   5006247,    222216,       1;
  1, 2222215, 105340629, 530539235, 530539235, 105340629, 2222215, 1;
		

Crossrefs

Cf. A084949 (row sums), A257619.
Similar sequences listed in A256890.

Programs

  • Mathematica
    T[n_, k_, a_, b_]:= T[n, k, a, b]= If[k<0 || k>n, 0, If[k==0 || k==n, 1, (a*(n-k)+b)*T[n-1, k-1, a, b] + (a*k+b)*T[n-1, k, a, b]]];
    Table[T[n,k,9,1], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 20 2022 *)
  • Sage
    def T(n,k,a,b): # A257608
        if (k<0 or k>n): return 0
        elif (k==0 or k==n): return 1
        else: return  (a*k+b)*T(n-1,k,a,b) + (a*(n-k)+b)*T(n-1,k-1,a,b)
    flatten([[T(n,k,9,1) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 20 2022

Formula

T(n, k) = t(n-k, k), where t(n,k) = f(k)*t(n-1, k) + f(n)*t(n, k-1), and f(n) = 9*n + 1.
Sum_{k=0..n} T(n, k) = A084949(n).
T(n, k) = (a*k + b)*T(n-1, k) + (a*(n-k) + b)*T(n-1, k-1), with T(n, 0) = T(n, n) = 1, a = 9, and b = 1. - G. C. Greubel, Mar 20 2022