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.

A218579 Triangle read by rows: T(n,k) is the number of ascent sequences of length n with last zero at position k-1.

This page as a plain text file.
%I A218579 #19 Feb 18 2015 03:42:34
%S A218579 1,1,1,2,1,2,5,2,3,5,15,5,8,10,15,53,15,26,32,38,53,217,53,99,122,142,
%T A218579 164,217,1014,217,433,537,619,704,797,1014,5335,1014,2143,2683,3069,
%U A218579 3464,3876,4321,5335,31240,5335,11854,15015,17063,19140,21294,23522,25905,31240
%N A218579 Triangle read by rows: T(n,k) is the number of ascent sequences of length n with last zero at position k-1.
%C A218579 Row sums are A022493.
%C A218579 First column and the diagonal is A022493(n-1).
%H A218579 Alois P. Heinz, <a href="/A218579/b218579.txt">Rows n = 1..100, flattened</a>
%e A218579 Triangle starts:
%e A218579 [ 1]      1;
%e A218579 [ 2]      1,    1;
%e A218579 [ 3]      2,    1,     2;
%e A218579 [ 4]      5,    2,     3,     5;
%e A218579 [ 5]     15,    5,     8,    10,    15;
%e A218579 [ 6]     53,   15,    26,    32,    38,    53;
%e A218579 [ 7]    217,   53,    99,   122,   142,   164,   217;
%e A218579 [ 8]   1014,  217,   433,   537,   619,   704,   797,  1014;
%e A218579 [ 9]   5335, 1014,  2143,  2683,  3069,  3464,  3876,  4321,  5335;
%e A218579 [10]  31240, 5335, 11854, 15015, 17063, 19140, 21294, 23522, 25905, 31240;
%e A218579 ...
%p A218579 b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
%p A218579       add(b(n-1, j, t+`if`(j>i, 1, 0), max(-1, k-1)),
%p A218579              j=`if`(k>=0, 0, 1)..`if`(k=0, 0, t+1)))
%p A218579     end:
%p A218579 T:= (n, k)-> b(n-1, 0, 0, k-2):
%p A218579 seq(seq(T(n,k), k=1..n), n=1..10);  # _Alois P. Heinz_, Nov 16 2012
%t A218579 b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, Sum[b[n-1, j, t + If[j>i, 1, 0], Max[-1, k-1]], {j, If[k >= 0, 0, 1], If[k == 0, 0, t+1]}]]; T[n_, k_] := b[n-1, 0, 0, k-2]; Table[Table[T[n, k], {k, 1, n}], {n, 1, 10}] // Flatten (* _Jean-François Alcover_, Feb 18 2015, after _Alois P. Heinz_ *)
%Y A218579 Cf. A022493 (number of ascent sequences).
%Y A218579 Cf. A218580 (ascent sequences with first occurrence of the maximal value at position k-1), A218581 (ascent sequences with last occurrence of the maximal value at position k-1).
%Y A218579 Cf. A137251 (ascent sequences with k ascents), A218577 (ascent sequences with maximal element k), A175579 (ascent sequences with k zeros).
%K A218579 nonn,tabl
%O A218579 1,4
%A A218579 _Joerg Arndt_, Nov 03 2012