OFFSET
1,3
COMMENTS
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
G. Kreweras and J. Barraud, Anagrammes alternés, European Journal of Combinatorics,Volume 18, Issue 8, November 1997, Pages 887-891.
G. Kreweras and D. Dumont, Sur les anagrammes alternés, Discrete Mathematics, Volume 211, Issues 1-3, 28 January 2000, Pages 103-110.
FORMULA
G.f.: (1-Q(0))/x, where Q(k)= 1 - 1/2*(k+1)*(k+2)*x/(1 - 1/2*(k+1)*(k+2)*x/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, May 03 2013
G.f.: 1/Q(0), where Q(k) = 1 - (k+1)*(k+2)/2*x/(1 - (k+2)*(k+3)/2*x/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Nov 17 2013
PROG
(PARI) a000366(n)= {return((-1/2)^(n-2)*sum(k=0, n, binomial(n, k)*(1-2^(n+k+1))*bernfrac(n+k+1))); }
bi(n, k) = {if (matb[n, k] == 0, if (n==k, v=1, if (k==1, v = b(n), v = sum(i=1, n-k+1, b(i)*bi(n-i, k-1)); ); ); matb[n, k] = v; ); return (matb[n, k]); }
b(n) = {if (n==1, return(a000366(n+1)), return(a000366(n+1) - sum(i=2, n, bi(n, i)))); }
allb(m) = {matb = matrix(m, m); for (i=1, m, print1(b(i), ", "); ); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Nov 07 2012
STATUS
approved