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.

A024462 Triangle T(n,k) read by rows, arising in enumeration of catafusenes.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 7, 3, 1, 8, 22, 24, 9, 1, 11, 46, 90, 81, 27, 1, 14, 79, 228, 351, 270, 81, 1, 17, 121, 465, 1035, 1323, 891, 243, 1, 20, 172, 828, 2430, 4428, 4860, 2916, 729, 1, 23, 232, 1344, 4914, 11718, 18144, 17496, 9477, 2187, 1, 26, 301, 2040, 8946, 26460, 53298, 71928, 61965, 30618, 6561
Offset: 0

Views

Author

N. J. A. Sloane, May 03 2000

Keywords

Examples

			Triangle begins (rows indexed by n >= 0 and columns by k >= 0):
   1;
   1,  1;
   1,  2,   1;
   1,  5,   7,   3;
   1,  8,  22,  24,    9;
   1, 11,  46,  90,   81,   27;
   1, 14,  79, 228,  351,  270,   81;
   1, 17, 121, 465, 1035, 1323,  891, 243;
   1, 20, 172, 828, 2430, 4428, 4860, 2916, 729;
   ...
		

Crossrefs

Cf. A038763.
Left-edge columns (essentially) include A016789 and A038764. Right-edge diagonal columns (essentially) include A000244, A038765, and A081892. Row sums are (essentially) A000302.

Programs

  • Maple
    ## The following Maple program gives the Taylor expansion of the bivariate g.f. of T(n,k) in powers of x:
    T := proc (x, y) 1+x*(y+1)+x^2*(y+1)^2/(1-x-3*y*x) end proc;
    expand(taylor(T(x, y), x = 0, 20)); ## Petros Hadjicostas, May 27 2019
  • Mathematica
    T[n_, 0]:= 1; T[n_, k_]:= If[k<0 || k>n, 0, If[n==1 && k==1, 1, If[n==2 && k==1, 2, If[k==n && n>=2, 3^(n-2), 3*T[n-1, k-1] + T[n-1, k]]]]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, May 30 2019 *)
  • PARI
    T(n,k)=if(n<0||k<0||k>n,0,if(n<3,[[1],[1,1],[1,2,1]][n+1][k+1],3*T(n-1,k-1)+T(n-1,k))) \\ Ralf Stephan, Jan 25 2005
    
  • Sage
    def T(n, k):
        if (k<0 and k>n): return 0
        elif (k==0): return 1
        elif (n==k==1): return 1
        elif (n==2 and k==1): return 2
        elif (n>=2 and k==n): return 3^(n-2)
        else: return 3*T(n-1, k-1) + T(n-1, k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 30 2019

Formula

T(n, k) = 3 * T(n-1, k-1) + T(n-1, k), starting with [1], [1, 1], [1, 2, 1].
From Petros Hadjicostas, May 27 2019: (Start)
T(n, k) = (n-2)!/(k! * (n-k)!) * (9*n*(n-1) - 4*k*(3*n-k-2)) * 3^(k-2) for n >= max(k, 2) and k >= 0. (See the top formula of p. 767 in Cyvin et al. (1996).)
Bivariate g.f.: Sum_{n, k >= 0} T(n, k) * x^n * y^k = 1 + x * (1 + y) + x^2 * (1 + y)^2/(1 - x - 3 * x * y).
(End)

Extensions

More terms from James Sellers, May 03 2000
Edited by Ralf Stephan, Jan 25 2005