login
A177540
Number of permutations of {1,...,n} avoiding adjacent step pattern up, down, down, up, up, down.
2
1, 1, 2, 6, 24, 120, 720, 4908, 38208, 334368, 3248640, 34774112, 405758208, 5129918808, 69849531936, 1018876044528, 15854497560576, 262116761475488, 4588408779868800, 84784281517177940, 1649073291620014880, 33678805727832427224, 720569710852319474016
OFFSET
0,3
LINKS
FORMULA
a(n) ~ c * d^n * n!, where d = 0.97251576612005359341988641793523250275..., c = 1.18354011206219905745522624899424386... . - 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, 3, 4, 1, 3, 7][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 2, 2, 5, 6, 2][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 24 2013
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, 3, 4, 1, 3, 7}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 2, 2, 5, 6, 2}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)
CROSSREFS
Column k=38 of A242784.
Sequence in context: A177539 A177546 A177544 * A068201 A189848 A189285
KEYWORD
nonn
AUTHOR
R. H. Hardin, May 10 2010
EXTENSIONS
a(17)-a(22) from Alois P. Heinz, Oct 24 2013
STATUS
approved