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 A191521 #24 Feb 16 2021 13:41:59 %S A191521 1,1,2,2,1,3,3,3,6,1,4,12,4,4,18,12,1,5,30,30,5,5,40,60,20,1,6,60,120, %T A191521 60,6,6,75,200,150,30,1,7,105,350,350,105,7,7,126,525,700,315,42,1,8, %U A191521 168,840,1400,840,168,8,8,196,1176,2450,1960,588,56,1,9,252,1764,4410,4410,1764,252,9 %N A191521 Triangle read by rows: T(n,k) is the number of left factors of Dyck paths of length n that have k valleys (i.e., a (1,-1)-step followed by a (1,1)-step). %C A191521 Row n>=1 contains ceiling(n/2) entries. %C A191521 Sum of entries in row n is binomial(n, floor(n/2)) = A001405(n). %C A191521 Sum_{k>=0} k*T(n,k) = A191522(n). %H A191521 Alois P. Heinz, <a href="/A191521/b191521.txt">Rows n = 0..300, flattened</a> %F A191521 G.f.: G(t,z) = (1+t*z^2-z^2-Q)/(t*z*(t*z^2-1+2*z-z^2+Q)), where Q = sqrt(((1-z)^2-t*z^2)*((1+z)^2-t*z^2)). %F A191521 T(n,k) = 2*C(n/2,k)*C(n/2,k+1)*(n/2+1)/n, for even n, C((n+1)/2,k+1)*Sum_{j=1..(n+1)/2} (-1)^(j-1)*C((n+1)/2,k-j+1), for odd n, T(0,0)=1. - _Vladimir Kruchinin_, Jul 24 2019 %e A191521 T(4,1)=3 because we have U(DU)D, U(DU)U, and UU(DU), where U=(1,1) and D=(1,-1) (the valleys are shown between parentheses). %e A191521 Triangle starts: %e A191521 1; %e A191521 1; %e A191521 2; %e A191521 2, 1; %e A191521 3, 3; %e A191521 3, 6, 1; %e A191521 4, 12, 4; %e A191521 4, 18, 12, 1; %e A191521 ... %p A191521 Q := sqrt(((1-z)^2-t*z^2)*((1+z)^2-t*z^2)): G := (1+t*z^2-z^2-Q)/(t*z*(t*z^2-1+2*z-z^2+Q)): Gser := simplify(series(G, z = 0, 19)): for n from 0 to 16 do P[n] := sort(coeff(Gser, z, n)) end do: 1; for n to 16 do seq(coeff(P[n], t, k), k = 0 .. ceil((1/2)*n)-1) end do; # yields sequence in triangular form %p A191521 # second Maple program: %p A191521 b:= proc(x, y, t) option remember; expand(`if`(x=0, 1, %p A191521 `if`(y>0, b(x-1, y-1, z), 0)+b(x-1, y+1, 1)*t)) %p A191521 end: %p A191521 T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0, 1)): %p A191521 seq(T(n), n=0..30); # _Alois P. Heinz_, Mar 29 2017 %t A191521 T[n_, m_] := If [n == 0 && m == 0, 1, If[n == 0, 0, If[OddQ[n-1], (2* Binomial[n/2, m]*Binomial[n/2, m+1]*(n/2 + 1))/n, Binomial[(n+1)/2, m+1]*Sum[(-1)^(k-1)*Binomial[(n+1)/2, m-k+1], {k, 1, (n+1)/2}]]]]; %t A191521 Table[T[n, m], {n, 0, 16}, {m, 0, If[n <= 2, 0, Quotient[n-1, 2]]}] // Flatten (* _Jean-François Alcover_, Feb 16 2021, after _Vladimir Kruchinin_ *) %o A191521 (Maxima) %o A191521 T(n,m):=if n=0 and m=0 then 1 else if n=0 then 0 else if oddp(n-1) then (2*binomial(n/2,m)*binomial(n/2,m+1)*(n/2+1))/n else binomial((n+1)/2,m+1)*sum((-1)^(k-1)*binomial((n+1)/2,m-k+1),k,1,(n+1)/2); %o A191521 /* _Vladimir Kruchinin_, Jul 24 2019 */ %Y A191521 Cf. A001405, A124428, A191522. %K A191521 nonn,tabf %O A191521 0,3 %A A191521 _Emeric Deutsch_, Jun 05 2011