|
|
A246247
|
|
Number of permutations of [n] with exactly two occurrences of the consecutive step pattern up, down, down.
|
|
2
|
|
|
99, 2214, 38394, 591543, 8826246, 131367258, 1989555210, 30951663300, 497599843140, 8291940960690, 143459287215300, 2578465192541220, 48147387009459165, 933704978071539690, 18794023286090727870, 392361396798154377681, 8489006744706293477274
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
7,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) ~ c * (3*sqrt(3)/(2*Pi))^n * n! * n^2, where c = 0.10205535828170995196503... = c0 * (c0-1)^2 / 18, 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, 2];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|