login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 3

%I #24 Feb 16 2021 13:41:59

%S 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 60,6,6,75,200,150,30,1,7,105,350,350,105,7,7,126,525,700,315,42,1,8,

%U 168,840,1400,840,168,8,8,196,1176,2450,1960,588,56,1,9,252,1764,4410,4410,1764,252,9

%N 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 Row n>=1 contains ceiling(n/2) entries.

%C Sum of entries in row n is binomial(n, floor(n/2)) = A001405(n).

%C Sum_{k>=0} k*T(n,k) = A191522(n).

%H Alois P. Heinz, <a href="/A191521/b191521.txt">Rows n = 0..300, flattened</a>

%F 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 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 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 Triangle starts:

%e 1;

%e 1;

%e 2;

%e 2, 1;

%e 3, 3;

%e 3, 6, 1;

%e 4, 12, 4;

%e 4, 18, 12, 1;

%e ...

%p 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 # second Maple program:

%p b:= proc(x, y, t) option remember; expand(`if`(x=0, 1,

%p `if`(y>0, b(x-1, y-1, z), 0)+b(x-1, y+1, 1)*t))

%p end:

%p T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0, 1)):

%p seq(T(n), n=0..30); # _Alois P. Heinz_, Mar 29 2017

%t 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 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 (Maxima)

%o 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 /* _Vladimir Kruchinin_, Jul 24 2019 */

%Y Cf. A001405, A124428, A191522.

%K nonn,tabf

%O 0,3

%A _Emeric Deutsch_, Jun 05 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 17:51 EDT 2024. Contains 371797 sequences. (Running on oeis4.)