|
|
A246246
|
|
Number of permutations of [n] with exactly one occurrence of the consecutive step pattern up, down, down.
|
|
2
|
|
|
3, 30, 270, 2322, 20772, 195372, 1958337, 20933154, 238789782, 2900868876, 37451986200, 512534035080, 7416327050415, 113185393797510, 1817654015037150, 30647027466113094, 541407973316966604, 10001886705503187732, 192877025408450517501, 3876090406516703418282
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
4,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) ~ c * (3*sqrt(3)/(2*Pi))^n * n! * n, where c = 0.6335500498606750386938465... = c0 * (c0-1)/3, and c0 = (1+exp(Pi/sqrt(3))) * sqrt(3) / (2*Pi). - Vaclav Kotesovec, Aug 22 2014
|
|
MAPLE
|
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, expand(
add(b(u-j, o+j-1, [1, 3, 1][t])*`if`(t=3, x, 1), j=1..u)+
add(b(u+j-1, o-j, 2), j=1..o)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0, 1)):
|
|
MATHEMATICA
|
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Expand[Sum[b[u - j, o + j - 1, {1, 3, 1}[[t]]]*If[t == 3, x, 1], {j, 1, u}] + Sum[b[u + j - 1, o - j, 2], {j, 1, o}]]];
a[n_] := Coefficient[b[n, 0, 1], x, 1];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|