OFFSET
0,6
COMMENTS
a(n) = A167637(n,0).
FORMULA
G.f.: (1 + 2z - z^3 - sqrt(1 - 4z^2 - 2z^3 + z^6))/(2z(1 + z )).
a(n) = Sum_{i=0..n} Sum_{k=1..n-i} Sum_{j=0..i-k+1} (-1)^(n-j-1)*C(j,-k-j+i+1)*C(k+j-1,k-1)*C(2*k+j-2,k+j-1)*C(n-i-1,n-k-i))/k. - Vladimir Kruchinin, May 06 2018
D-finite with recurrence (n+1)*a(n) +a(n-1) +(-4*n+7)*a(n-2) +2*(-n+2)*a(n-3) +a(n-4) -a(n-5) +(n-7)*a(n-6)=0. - R. J. Mathar, Jul 24 2022
Conjecture: g.f. A(x) = 1 + (x^3)*exp(Sum_{n >= 1} g(n, x)*x^(2*n)/n), where g(n, x) = Sum_{k = 0..n} binomial(n, k)^2*(1 + x)^k. Cf. A129509. - Peter Bala, Sep 10 2024
EXAMPLE
a(5)=2 because we have UUUDDUUDDD and UUUUUDDDDD.
MAPLE
G := ((1+2*z-z^3-sqrt(1-4*z^2-2*z^3+z^6))*1/2)/(z*(1+z)): Gser := series(G, z = 0, 40): seq(coeff(Gser, z, n), n = 0 .. 38);
PROG
(Maxima)
a(n):=sum(sum(((sum((-1)^(n-j-1)*binomial(j, -k-j+i+1)*binomial(k+j-1, k-1)*binomial(2*k+j-2, k+j-1), j, 0, -k+i+1))*binomial(n-i-1, n-k-i))/k, k, 1, n-i), i, 0, n);
/* Vladimir Kruchinin, May 06 2018 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Nov 08 2009
STATUS
approved