|
|
A177551
|
|
Number of permutations of {1,...,n} avoiding adjacent step pattern up, up, down, up, up, up.
|
|
2
|
|
|
1, 1, 2, 6, 24, 120, 720, 5006, 39776, 355536, 3530880, 38581456, 459905790, 5938902464, 82590382604, 1230586598456, 19557934834104, 330265974019619, 5905113439990368, 111448391640387360, 2214092715361273978, 46185648021443324656, 1009303225985497077402
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) ~ c * d^n * n!, where d = 0.993326320961568877764783962159580548643374705129260577..., c = 1.0404765828695886736964990440705643676428197038942922... . - Vaclav Kotesovec, Jan 17 2015
|
|
MAPLE
|
b:= proc(u, o, t) option remember; `if`(t>6, 0, `if`(u+o+t<7, (u+o)!,
add(b(u-j, o+j-1, [1, 1, 4, 1, 1, 4][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 3, 3, 5, 6, 7][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
|
|
MATHEMATICA
|
b[u_, o_, t_] := b[u, o, t] = If[t > 6, 0, If[u + o + t < 7, (u + o)!,
Sum[b[u - j, o + j - 1, {1, 1, 4, 1, 1, 4}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 3, 3, 5, 6, 7}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|