login
A191529
Number of dispersed Dyck paths of length n (i.e., Motzkin paths of length n with no (1,0) steps at positive heights) with no initial and no final (1,0)-steps.
4
1, 0, 1, 0, 2, 1, 6, 5, 20, 21, 70, 84, 252, 330, 924, 1287, 3432, 5005, 12870, 19448, 48620, 75582, 184756, 293930, 705432, 1144066, 2704156, 4457400, 10400600, 17383860, 40116600, 67863915, 155117520, 265182525, 601080390, 1037158320, 2333606220, 4059928950, 9075135300
OFFSET
0,5
FORMULA
a(2n) = binomial(2n-2,n-1) = A000984(n-1) (n>=1).
a(2n+1) = binomial(2n-1,n-2) = A002054(n-1) (n>=1).
G.f.: g(z)=1+(1-z)(1-q)/(1-2z+q), where q=sqrt(1-4z^2).
a(n) = binomial(n,floor(n/2)) - 2*binomial(n-1,floor((n-1)/2)) + binomial(n-2,floor((n-2)/2)) + 2*0^n. - Wesley Ivan Hurt, Sep 27 2014
D-finite with recurrence (n+1)*a(n) -n*a(n-1) +2*(-2*n+3)*a(n-2) +4*(n-4)*a(n-3)=0. - R. J. Mathar, Jul 26 2022
EXAMPLE
a(6)=6 because we have UDHHUD and the 5 Dyck paths of length 6: UDUDUD, UDUUDD, UUDDUD, UUDUDD, and UUUDDD; here U=(1,1), H=(1,0) and D=(1,-1).
MAPLE
a := proc (n) if `mod`(n, 2) = 0 then binomial(n-2, (1/2)*n-1) else binomial(n-2, (1/2)*n-5/2) end if end proc: 1, 0, seq(a(n), n = 2 .. 38);
A191529:=n->binomial(n, floor(n/2)) - 2*binomial(n-1, floor((n-1)/2)) + binomial(n-2, floor((n-2)/2)) + 2*0^n: seq(A191529(n), n=0..40); # Wesley Ivan Hurt, Sep 27 2014
MATHEMATICA
Join[{1}, Table[Binomial[n, Floor[n/2]] - 2 Binomial[n - 1, Floor[(n - 1)/2]] + Binomial[n - 2, Floor[(n - 2)/2]], {n, 40}]] (* Wesley Ivan Hurt, Sep 27 2014 *)
CROSSREFS
Sequence in context: A333958 A114852 A188048 * A095132 A028940 A376980
KEYWORD
nonn,easy
AUTHOR
Emeric Deutsch, Jun 07 2011
STATUS
approved