|
|
A186360
|
|
Number of up-down cycles in all permutations of {1,2,...,n}. A cycle (b(1), b(2), ...) is said to be up-down if, when written with its smallest element in the first position, it satisfies b(1)<b(2)>b(3)<... .
|
|
3
|
|
|
0, 1, 3, 10, 42, 215, 1306, 9203, 73896, 666449, 6672426, 73447207, 881720276, 11465066353, 160533297198, 2408198818951, 38533084860528, 655081834141121, 11791682879883154, 224044379597455367, 4480916680834220172, 94099620668706861137, 2070196606209604069110
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
a(n) = Sum(k*A186358(n,k), k=0..n).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = n!*Sum(E(j-1)/j!, j=1..n), where E(i) = A000111(i) are the Euler (or up-down) numbers.
E.g.f.: -log(1-sin z)/(1-z).
|
|
EXAMPLE
|
a(3) = 10 because the permutations (1)(2)(3), (12)(3), (13)(2), (1)(23), (123), and (132) have a total of 3 + 2 + 2 + 2 + 0 + 1 = 10 up-down cycles.
|
|
MAPLE
|
g := -ln(1-sin(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), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 08 2013 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|