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.

A294219 Number T(n,k) of ascent sequences of length n where the maximum of 0 and all letter multiplicities equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 9, 4, 1, 0, 1, 26, 20, 5, 1, 0, 1, 82, 97, 30, 6, 1, 0, 1, 276, 496, 191, 42, 7, 1, 0, 1, 1014, 2686, 1259, 310, 56, 8, 1, 0, 1, 4006, 15481, 8784, 2416, 470, 72, 9, 1, 0, 1, 17046, 94843, 65012, 19787, 4141, 677, 90, 10, 1
Offset: 0

Views

Author

Alois P. Heinz, Oct 25 2017

Keywords

Examples

			T(4,1) = 1: 0123.
T(4,2) = 9: 0011, 0012, 0101, 0102, 0110, 0112, 0120, 0121, 0122.
T(4,3) = 4: 0001, 0010, 0100, 0111.
T(4,4) = 1: 0000.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,     1;
  0, 1,     3,     1;
  0, 1,     9,     4,     1;
  0, 1,    26,    20,     5,     1;
  0, 1,    82,    97,    30,     6,    1;
  0, 1,   276,   496,   191,    42,    7,   1;
  0, 1,  1014,  2686,  1259,   310,   56,   8,  1;
  0, 1,  4006, 15481,  8784,  2416,  470,  72,  9,  1;
  0, 1, 17046, 94843, 65012, 19787, 4141, 677, 90, 10, 1;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A057427.
Row sums give A022493.
Cf. A294220.

Programs

  • Maple
    b:= proc(n, i, t, p, k) option remember; `if`(n=0, 1,
          add(`if`(coeff(p, x, j)=k, 0, b(n-1, j, t+
              `if`(j>i, 1, 0), p+x^j, k)), j=1..t+1))
        end:
    A:= (n, k)-> b(n, 0$3, k):
    T:= (n, k)-> A(n, k)-`if`(k=0, 0, A(n, k-1)):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    b[n_, i_, t_, p_, k_] := b[n, i, t, p, k] = If[n == 0, 1, Sum[If[ Coefficient[p, x, j] == k, 0, b[n - 1, j, t + If[j > i, 1, 0], p + x^j, k]], {j, t + 1}]];
    A[n_, k_] :=  b[n, 0, 0, 0, k];
    T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 29 2020, after Maple *)

Formula

T(n,k) = A294220(n,k) - A294220(n,k-1) for k>0, T(n,0) = A294220(n,k) = A000007(n).