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.

A242153 Number T(n,k) of ascent sequences of length n with exactly k flat steps; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 2, 1, 0, 5, 6, 3, 1, 0, 16, 20, 12, 4, 1, 0, 61, 80, 50, 20, 5, 1, 0, 271, 366, 240, 100, 30, 6, 1, 0, 1372, 1897, 1281, 560, 175, 42, 7, 1, 0, 7795, 10976, 7588, 3416, 1120, 280, 56, 8, 1, 0, 49093, 70155, 49392, 22764, 7686, 2016, 420, 72, 9, 1, 0
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, May 05 2014

Keywords

Comments

In general, column k is asymptotic to Pi^(2*k-5/2) / (k! * 6^(k-2) * sqrt(3) * exp(Pi^2/12)) * (6/Pi^2)^n * n! * sqrt(n). - Vaclav Kotesovec, Aug 27 2014

Examples

			Triangle T(n,k) begins:
00:      1;
01:      1,     0;
02:      1,     1,     0;
03:      2,     2,     1,     0;
04:      5,     6,     3,     1,    0;
05:     16,    20,    12,     4,    1,    0;
06:     61,    80,    50,    20,    5,    1,   0;
07:    271,   366,   240,   100,   30,    6,   1,  0;
08:   1372,  1897,  1281,   560,  175,   42,   7,  1, 0;
09:   7795, 10976,  7588,  3416, 1120,  280,  56,  8, 1, 0;
10:  49093, 70155, 49392, 22764, 7686, 2016, 420, 72, 9, 1, 0;
...
The 15 ascent sequences of length 4 (dots denote zeros) with their number of flat steps are:
01:  [ . . . . ]   3
02:  [ . . . 1 ]   2
03:  [ . . 1 . ]   1
04:  [ . . 1 1 ]   2
05:  [ . . 1 2 ]   1
06:  [ . 1 . . ]   1
07:  [ . 1 . 1 ]   0
08:  [ . 1 . 2 ]   0
09:  [ . 1 1 . ]   1
10:  [ . 1 1 1 ]   2
11:  [ . 1 1 2 ]   1
12:  [ . 1 2 . ]   0
13:  [ . 1 2 1 ]   0
14:  [ . 1 2 2 ]   1
15:  [ . 1 2 3 ]   0
There are 5 sequences without flat steps, 6 with one flat step, etc., giving row [5, 6, 3, 1, 0] for n=4.
		

Crossrefs

Row sums give A022493.
T(2n,n) gives A242164.
Main diagonal and lower diagonals give: A000007, A000012, A000027(n+1), A002378(n+1), A134481(n+1), A130810(n+4).
Cf. A137251 (the same for ascents), A238858 (the same for descents).

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1, expand(add(
          `if`(j=i, x, 1) *b(n-1, j, t+`if`(j>i, 1, 0)), j=0..t+1)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, -1$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, Expand[Sum[If[j == i, x, 1]*b[n-1, j, t + If[j>i, 1, 0]], {j, 0, t+1}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][ b[n, -1, -1]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 06 2015, after Alois P. Heinz *)