OFFSET
0,3
COMMENTS
The paths in F[n] need not end on the horizontal axis.
If f(z) is the generating function of the paths in F[n] (according to weight), and g(z) is the generating function of the those paths in F[n] that end on the horizontal axis, then f = g +z^2*gf. Also, g = (1 + zg)(1+z^2*g). Eliminating g from the above two equations, one obtains f(z).
LINKS
M. Bona and A. Knopfmacher, On the probability that certain compositions have the same number of parts, Ann. Comb., 14 (2010), 291-306.
FORMULA
G.f.: f(z)=2/[1-z-3z^2+sqrt((1+z+z^2)(1-3z+z^2))].
a(n) ~ sqrt(4935 + 2207*sqrt(5))* ((3 + sqrt(5))/2)^n / (sqrt(8*Pi)*n^(3/2)). - Vaclav Kotesovec, Mar 06 2016. Equivalently, a(n) ~ 5^(1/4) * phi^(2*n + 8) / (2*sqrt(Pi)*n^(3/2)), where phi = A001622 is the golden ratio. - Vaclav Kotesovec, Dec 06 2021
a(n) = Sum_{k=0..n} (k+1)*Sum_{i=0..n-k+1} C(i+1,n+1-i)*C(i+1,-i+n-k)/(i+1). - Vladimir Kruchinin, Jan 25 2019
D-finite with recurrence (n+2)*a(n) +(-4*n-5)*a(n-1) +(n-1)*a(n-2) +(4*n+5)*a(n-3) +(7*n-16)*a(n-4) +2*(n-1)*a(n-5) +2*(-n+4)*a(n-6)=0. - R. J. Mathar, Jul 24 2022
EXAMPLE
a(3)=6. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and U=(1,1), D=(1,-1), we have hhh, hH, Hh, UD, hU, and Uh.
MAPLE
f := 2/(1-z-3*z^2+sqrt((1+z+z^2)*(1-3*z+z^2))): fser := series(f, z = 0, 32): seq(coeff(fser, z, n), n = 0 .. 29);
MATHEMATICA
CoefficientList[Series[2/(1-x-3*x^2+Sqrt[(1+x+x^2)*(1-3*x+x^2)]), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 06 2016 *)
PROG
(Maxima)
a(n):=sum((k+1)*sum((binomial(i+1, n+1-i)*binomial(i+1, -i+n-k))/(i+1), i, 0, n-k+1), k, 0, n); /* Vladimir Kruchinin, Jan 25 2019 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Dec 16 2010
STATUS
approved