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 A238122 #25 Sep 26 2023 11:35:50 %S A238122 1,1,2,3,1,5,5,7,16,3,11,43,21,1,15,99,101,17,22,215,373,145,9,30,430, %T A238122 1174,836,146,4,42,834,3337,3846,1324,112,1,56,1529,8642,15002,8786, %U A238122 1615,66,77,2765,21148,52132,47013,15403,1582,32,101,4792,48713,164576,214997,112106,21895,1310,14 %N A238122 Irregular triangle read by rows: T(n,k) gives the number of ballot sequences of length n having k descents, n>=0, 0<=k<=A083920(n-1). %C A238122 Same as A238121, with zeros omitted. %C A238122 Columns k=0-10 give: A000041, A241794, A241795, A241796, A241797, A241798, A241799, A241800, A241801, A241802, A241803. %C A238122 T(2n,n) gives A241804. %C A238122 T(2n+1,n) gives A241805. %C A238122 Row sums are A000085. %C A238122 T(n*(n+1)/2,n*(n-1)/2) = 1. %H A238122 Joerg Arndt and Alois P. Heinz, <a href="/A238122/b238122.txt">Rows n = 0..50, flattened</a> %e A238122 T(5,0) = 7: [1,1,1,1,1], [1,1,1,1,2], [1,1,1,2,2], [1,1,1,2,3], [1,1,2,2,3], [1,1,2,3,4], [1,2,3,4,5]. %e A238122 T(5,1) = 16: [1,1,1,2,1], [1,1,2,1,1], [1,1,2,1,2], [1,1,2,1,3], [1,1,2,2,1], [1,1,2,3,1], [1,1,2,3,2], [1,2,1,1,1], [1,2,1,1,2], [1,2,1,1,3], [1,2,1,2,3], [1,2,1,3,4], [1,2,3,1,1], [1,2,3,1,2], [1,2,3,1,4], [1,2,3,4,1]. %e A238122 T(5,2) = 3: [1,2,1,2,1], [1,2,1,3,1], [1,2,1,3,2]. %e A238122 Triangle starts: %e A238122 00: 1; %e A238122 01: 1; %e A238122 02: 2; %e A238122 03: 3, 1; %e A238122 04: 5, 5; %e A238122 05: 7, 16, 3; %e A238122 06: 11, 43, 21, 1; %e A238122 07: 15, 99, 101, 17; %e A238122 08: 22, 215, 373, 145, 9; %e A238122 09: 30, 430, 1174, 836, 146, 4; %e A238122 10: 42, 834, 3337, 3846, 1324, 112, 1; %e A238122 11: 56, 1529, 8642, 15002, 8786, 1615, 66; %e A238122 12: 77, 2765, 21148, 52132, 47013, 15403, 1582, 32; %e A238122 13: 101, 4792, 48713, 164576, 214997, 112106, 21895, 1310, 14; %e A238122 14: 135, 8216, 108147, 484609, 874413, 672015, 215849, 26159, 932, 5; %e A238122 ... %p A238122 b:= proc(n, v, l) option remember; `if`(n<1, 1, expand( %p A238122 add(`if`(i=1 or l[i-1]>l[i], `if`(i<v, x, 1)* %p A238122 b(n-1, i, subsop(i=l[i]+1, l)), 0), i=1..nops(l))+ %p A238122 b(n-1, nops(l)+1, [l[], 1]))) %p A238122 end: %p A238122 T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n-1, 1, [1])): %p A238122 seq(T(n), n=0..14); %t A238122 b[n_, v_, l_List] := b[n, v, l] = If[n<1, 1, Expand[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, Exponent[p, x]}]][b[n-1, 1, {1}]]; Table[T[n], {n, 0, 14}] // Flatten (* _Jean-François Alcover_, Feb 11 2015, after Maple *) %K A238122 nonn,tabf %O A238122 0,3 %A A238122 _Joerg Arndt_ and _Alois P. Heinz_, Feb 21 2014