OFFSET
0,3
COMMENTS
Number of cycles of odd cardinality in all permutations of [n]. Example: a(3)=8 because among (1)(2)(3), (1)(23), (12)(3), (13)(2), (132), (123) we have eight cycles of odd length. - Emeric Deutsch, Aug 12 2004
a(n) is a function of the harmonic numbers. a(n) = n!*h(n) - n!/2 * h(floor(n/2)), where h(n) = Sum_{k=1..n} 1/k. - Gary Detlefs, Aug 06 2010
REFERENCES
I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, Exercise 3.3.13
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..30
B. A. Kuperschmidt, ... And free lunch for all.
B. A. Kuperschmidt, Journal of Nonlinear Mathematical Physics 2000 v. 7 no. 2, A Review of Bruce C. Berndt's Ramanujan's Notebooks parts I-V
FORMULA
E.g.f.: log((1+x) / (1-x)) / (2*(1-x)).
a(n) = n! * Sum_{k=0..n, k odd} 1/k.
a(n) = n!/2*(Psi(ceiling(n/2)+1/2)+gamma+2*log(2)). - Vladeta Jovovic, Oct 20 2003
a(n) = n!*Sum_{k=1..n} (-1)^(k+1)*2^(k-1)*binomial(n, k)/k. - Vladeta Jovovic, Aug 12 2005
a(n) = n*a(n-1) + ((-1)^(n+1)+1)/2*(n-1)!. - Gary Detlefs, Aug 06 2010
a(n) ~ n!/2 * (log(n) + gamma + log(2)), where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Oct 05 2013
a(2*n + 1) = A049034(n).
E.g.f.: arctanh(x)/(1 - x). - Ilya Gutkovskiy, Dec 19 2017
EXAMPLE
G.f. = x + 2*x^2 + 8*x^3 + 32*x^4 + 184*x^5 + 1104*x^6 + 8448*x^7 + ...
MATHEMATICA
nn = 20; Range[0, nn]! CoefficientList[
D[Series[(1 - x^2)^(-1/2) ((1 + x)/(1 - x))^(y/2), {x, 0, nn}], y] /. y -> 1, x] (* Geoffrey Critzer, Aug 27 2012 *)
a[ n_] := If[ n < 0, 0, n! Sum[ 1/k, {k, 1, n, 2}]]; (* Michael Somos, Jan 06 2015 *)
a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ Log[ (1 + x) / (1 - x)] / (2 (1 - x)), {x, 0, n}]]; (* Michael Somos, Jan 06 2015 *)
PROG
(PARI) {a(n) = if( n<1, 0, n! * polcoeff( log(1 + 2 / (-1 + 1 / (x + x * O(x^n)))) / (2 * (1-x)), n))};
(PARI) {a(n) = if( n<0, 0, n! * sum(k=1, n, (k%2)/k))}; /* Michael Somos, Sep 19 2006 */
(PARI) first(n) = x='x+O('x^n); Vec(serlaplace(atanh(x)/(1 - x)), -n) \\ Iain Fox, Dec 19 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael Somos, Mar 18 2003
STATUS
approved