OFFSET
0,3
COMMENTS
a(n) = Sum Stirling1(n,k)*k where the sum is taken over even k for even n and odd k for odd n.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
FORMULA
a(n) = Sum_{k=1..n, 2|(n+k)} k*Stirling1(n,k).
E.g.f.: ((1+x)*log(1+x)-log(1-x)/(1-x))/2. - Vaclav Kotesovec, May 30 2013
a(n) ~ n! * (log(n) + gamma)/2, where gamma is Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, May 30 2013
EXAMPLE
a(3) = 5 because the even permutations of [3]: (1)(2)(3), (1,2,3), (1,3,2) have a total of 5 cycles.
MAPLE
with(combinat):
a:= n-> add(`if`(irem(n+k, 2)=0, k*stirling1(n, k), 0), k=1..n):
seq(a(n), n=0..25); # Alois P. Heinz, May 29 2013
MATHEMATICA
nn = 20; Range[0, nn]! CoefficientList[Series[D[Cosh[y Log[(1 - x^2)^(-1/2)]] Exp[y Log[((1 + x)/(1 - x))^(1/2)]], y] /. y -> 1, {x, 0, nn}], x]
With[{nmax = 30}, CoefficientList[Series[((1+x)*Log[1+x]-Log[1-x]/(1-x))/2, {x, 0, nmax}], x]*Range[0, nmax]!] (* G. C. Greubel, Sep 04 2018 *)
PROG
(PARI) x='x+O('x^30); concat([0], Vec(serlaplace( ((1+x)*log(1+x)-log(1-x)/(1-x))/2 ))) \\ G. C. Greubel, Sep 04 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Geoffrey Critzer, May 29 2013
STATUS
approved