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.

Showing 1-2 of 2 results.

A372868 Irregular triangle read by rows: T(n,k) is the number of flattened Catalan words of length n with exactly k runs of weak ascents, with 1 <= k <= ceiling(n/2).

Original entry on oeis.org

1, 2, 4, 1, 8, 6, 16, 24, 1, 32, 80, 10, 64, 240, 60, 1, 128, 672, 280, 14, 256, 1792, 1120, 112, 1, 512, 4608, 4032, 672, 18, 1024, 11520, 13440, 3360, 180, 1, 2048, 28160, 42240, 14784, 1320, 22, 4096, 67584, 126720, 59136, 7920, 264, 1, 8192, 159744, 366080, 219648, 41184, 2288, 26
Offset: 1

Views

Author

Stefano Spezia, May 15 2024

Keywords

Comments

With offset 0 for the variable k, T(n,k) is the number of flattened Catalan words of length n with exactly k peaks. In such case, T(4,1) = 6 corresponds to 6 flattened Catalan words of length 4 with 1 peak: 0010, 0100, 0110, 0101, 0120, and 0121. See Baril et al. at page 20.

Examples

			The irregular triangle begins:
    1;
    2;
    4,    1;
    8,    6;
   16,   24,    1;
   32,   80,   10;
   64,  240,   60,   1;
  128,  672,  280,  14;
  256, 1792, 1120, 112, 1;
  ...
T(4,2) = 6 since there are 6 flattened Catalan words of length 4 with 2 runs of weak ascents: 0010, 0100, 0101, 0110, 0120, and 0121.
		

Crossrefs

Cf. A000079, A001788, A002409, A003472, A007051 (row sums), A110654 (row lengths), A140325, A172242.

Programs

  • Mathematica
    T[n_,k_]:=SeriesCoefficient[(1-2x)*x*y/(1-4*x+4*x^2-x^2*y),{x,0,n},{y,0,k}]; Table[T[n,k],{n,14},{k,Ceiling[n/2]}] //Flatten (* or *)
    T[n_,k_]:=2^(n-2k+1)Binomial[n-1,2k-2]; Table[T[n,k],{n,14},{k,Ceiling[n/2]}]

Formula

G.f.: (1-2*x)*x*y/(1 - 4*x + 4*x^2 - x^2*y).
T(n,k) = 2^(n-2*k+1)*binomial(n-1, 2*k-2).
T(n,1) = A000079(n-1).
T(n,2) = A001788(n-2).
T(n,3) = A003472(n-1).
T(n,4) = A002409(n-7).
T(n,5) = A140325(n-9).
T(n,6) = A172242(n-1).
Sum_{k>=0} T(n,k) = A007051(n-1).

A372872 a(n) is the total number of runs of weak ascents over all flattened Catalan words of length n.

Original entry on oeis.org

1, 2, 6, 20, 67, 222, 728, 2368, 7653, 24602, 78730, 250956, 797159, 2524342, 7971612, 25110584, 78918985, 247518642, 774840974, 2421378052, 7554699531, 23535794702, 73222472416, 227512682160, 706073841197, 2188828907722, 6778308875538, 20970393083708, 64817578622383
Offset: 1

Views

Author

Stefano Spezia, May 15 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{8,-22,24,-9},{1,2,6,20},29]

Formula

From Baril et al.: (Start)
G.f.: x*(1 - 2*x)^3/(1 - 4*x + 3*x^2)^2.
a(n) = (27 - 9*n + (5 + n)*3^n)/36. (End)
E.g.f.: (exp(3*x)*(5 + 3*x) - 9*exp(x)*(x - 3) - 32)/36.
Showing 1-2 of 2 results.