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.
%I A238121 #34 Sep 26 2023 11:34:19 %S A238121 1,1,0,2,0,0,3,1,0,0,5,5,0,0,0,7,16,3,0,0,0,11,43,21,1,0,0,0,15,99, %T A238121 101,17,0,0,0,0,22,215,373,145,9,0,0,0,0,30,430,1174,836,146,4,0,0,0, %U A238121 0,42,834,3337,3846,1324,112,1,0,0,0,0,56,1529,8642,15002,8786,1615,66,0,0,0,0,0,77,2765,21148,52132,47013,15403,1582,32,0,0,0,0,0 %N A238121 Triangle read by rows: T(n,k) gives the number of ballot sequences of length n having exactly k descents, n>=0, 0<=k<=n. %C A238121 Also number of standard Young tableaux such that there are k pairs of cells (v,v+1) with v+1 lying in a row above v. %C A238121 Columns k=0-10 give: A000041, A241794, A241795, A241796, A241797, A241798, A241799, A241800, A241801, A241802, A241803. %C A238121 T(2n,n) gives A241804. %C A238121 T(2n+1,n) gives A241805. %C A238121 Row sums are A000085. %C A238121 T(n*(n+1)/2,n*(n-1)/2) = 1. %C A238121 A238122 is another version with zeros omitted. %H A238121 Joerg Arndt and Alois P. Heinz, <a href="/A238121/b238121.txt">Rows n = 0..50, flattened</a> %e A238121 Triangle starts: %e A238121 1; %e A238121 1, 0; %e A238121 2, 0, 0; %e A238121 3, 1, 0, 0; %e A238121 5, 5, 0, 0, 0; %e A238121 7, 16, 3, 0, 0, 0; %e A238121 11, 43, 21, 1, 0, 0, 0; %e A238121 15, 99, 101, 17, 0, 0, 0, 0; %e A238121 22, 215, 373, 145, 9, 0, 0, 0, 0; %e A238121 30, 430, 1174, 836, 146, 4, 0, 0, 0, 0; %e A238121 42, 834, 3337, 3846, 1324, 112, 1, 0, 0, 0, 0; %e A238121 56, 1529, 8642, 15002, 8786, 1615, 66, 0, 0, 0, 0, 0; %e A238121 77, 2765, 21148, 52132, 47013, 15403, 1582, 32, 0, 0, 0, 0, 0; %e A238121 101, 4792, 48713, 164576, 214997, 112106, 21895, 1310, 14, 0, 0, 0, 0, 0; %e A238121 ... %e A238121 The T(5,1) = 16 ballot sequences of length n=5 with k=1 descent are (dots for zeros): %e A238121 01: [ . . . 1 . ] %e A238121 02: [ . . 1 . . ] %e A238121 03: [ . . 1 . 1 ] %e A238121 04: [ . . 1 . 2 ] %e A238121 05: [ . . 1 1 . ] %e A238121 06: [ . . 1 2 . ] %e A238121 07: [ . . 1 2 1 ] %e A238121 08: [ . 1 . . . ] %e A238121 09: [ . 1 . . 1 ] %e A238121 10: [ . 1 . . 2 ] %e A238121 11: [ . 1 . 1 2 ] %e A238121 12: [ . 1 . 2 3 ] %e A238121 13: [ . 1 2 . . ] %e A238121 14: [ . 1 2 . 1 ] %e A238121 15: [ . 1 2 . 3 ] %e A238121 16: [ . 1 2 3 . ] %p A238121 b:= proc(n, v, l) option remember; `if`(n<1, 1, expand( %p A238121 add(`if`(i=1 or l[i-1]>l[i], `if`(i<v, x, 1)* %p A238121 b(n-1, i, subsop(i=l[i]+1, l)), 0), i=1..nops(l))+ %p A238121 b(n-1, nops(l)+1, [l[], 1]))) %p A238121 end: %p A238121 T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n-1, 1, [1])): %p A238121 seq(T(n), n=0..14); %t A238121 b[n_, v_, l_] := 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_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][b[n-1, 1, {1}]]; Table[T[n], {n, 0, 14}] // Flatten (* _Jean-François Alcover_, Jan 06 2015, translated from Maple *) %K A238121 nonn,tabl %O A238121 0,4 %A A238121 _Joerg Arndt_ and _Alois P. Heinz_, Feb 21 2014