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.

A238125 Triangle read by rows: T(n,k) gives the number of ballot sequences of length n having exactly k flat steps, n>=0, 0<=k<=n.

This page as a plain text file.
%I A238125 #25 Jan 07 2015 04:40:14
%S A238125 1,1,0,1,1,0,2,1,1,0,4,3,2,1,0,9,8,6,2,1,0,22,24,17,9,3,1,0,59,70,57,
%T A238125 29,13,3,1,0,170,224,191,108,49,17,4,1,0,516,744,663,399,201,69,23,4,
%U A238125 1,0,1658,2588,2415,1573,802,322,104,28,5,1,0,5583,9317,9108,6249,3343,1408,510,137,35,5,1,0
%N A238125 Triangle read by rows: T(n,k) gives the number of ballot sequences of length n having exactly k flat steps, n>=0, 0<=k<=n.
%C A238125 Also number of standard Young tableaux with n cells and exactly k successions. A succession is a pair of cells (v, v+1) lying in the same row.
%C A238125 Columns k=0-10 give: A237770, A238126, A238127, A241774, A241775, A241776, A241777, A241778, A241779, A241780, A241781.
%C A238125 T(2n,n) gives A241785.
%C A238125 Row sums are A000085.
%H A238125 Joerg Arndt and Alois P. Heinz, <a href="/A238125/b238125.txt">Rows n = 0..45, flattened</a>
%e A238125 Triangle starts:
%e A238125 00:     1;
%e A238125 01:     1,     0;
%e A238125 02:     1,     1,     0;
%e A238125 03:     2,     1,     1,     0;
%e A238125 04:     4,     3,     2,     1,     0;
%e A238125 05:     9,     8,     6,     2,     1,    0;
%e A238125 06:    22,    24,    17,     9,     3,    1,    0;
%e A238125 07:    59,    70,    57,    29,    13,    3,    1,   0;
%e A238125 08:   170,   224,   191,   108,    49,   17,    4,   1,   0;
%e A238125 09:   516,   744,   663,   399,   201,   69,   23,   4,   1,  0;
%e A238125 10:  1658,  2588,  2415,  1573,   802,  322,  104,  28,   5,  1, 0;
%e A238125 11:  5583,  9317,  9108,  6249,  3343, 1408,  510, 137,  35,  5, 1, 0;
%e A238125 12: 19683, 34924, 35695, 25642, 14368, 6440, 2411, 751, 189, 42, 6, 1, 0;
%e A238125 ...
%p A238125 b:= proc(n, v, l) option remember; `if`(n<1, 1, expand(
%p A238125       add(`if`(i=1 or l[i-1]>l[i], `if`(i=v, x, 1)*
%p A238125       b(n-1, i, subsop(i=l[i]+1, l)), 0), i=1..nops(l))+
%p A238125       b(n-1, nops(l)+1, [l[], 1])))
%p A238125     end:
%p A238125 T:= n-> seq(coeff(b(n-1, 1, [1]), x, i), i=0..n):
%p A238125 seq(T(n), n=0..12);
%t A238125 b[n_, v_, l_List] := b[n, v, l] = If[n<1, 1, Sum[If[i == 1 || l[[i-1]] > l[[i]], If[i == v, x, 1]*b[n-1, i, ReplacePart[l, i -> l[[i]]+1]], 0], {i, 1, Length[l]}] + b[n-1, Length[l]+1, Append[l, 1]]]; T[n_] := Table[Coefficient[b[n-1, 1, {1}], x, i], {i, 0, n}]; Table[T[n], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, Jan 07 2015, translated from Maple *)
%K A238125 nonn,tabl
%O A238125 0,7
%A A238125 _Joerg Arndt_ and _Alois P. Heinz_, Feb 21 2014