OFFSET
0,5
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
E. Deutsch and S. Elizalde, Cycle up-down permutations, arXiv:0909.5199 [math.CO], 2009.
FORMULA
E.g.f.: log( (1-sin(z))/(1-z) ) / (1-z).
a(n) = Sum(k*A186361(n,k), k>=0).
a(n) = n!*Sum(((j-1)!-E(j-1))/j!, j=1..n), where E(i)=A000111(i) are the Euler (or up-down) numbers.
a(n) ~ n! * (log(n) + gamma + log(1-sin(1))), where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Oct 02 2013
EXAMPLE
a(3) = 10 because the permutations (1)(2)(3), (12)(3), (13)(2), (1)(23), (132), and (123) have a total of 3 + 2 + 2 + 2 + 0 + 1 = 10 up-down cycles.
MAPLE
g := ln((1-sin(z))/(1-z))/(1-z): gser := series(g, z = 0, 25): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 22);
MATHEMATICA
CoefficientList[Series[Log[(1-Sin[x])/(1-x)]/(1-x), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 02 2013 *)
PROG
(PARI) x='x+O('x^30); concat(vector(3), Vec(serlaplace(log((1-sin(x))/(1-x))/(1-x)))) \\ G. C. Greubel, Aug 30 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Feb 28 2011
STATUS
approved