login
A177544
Number of permutations of {1,...,n} avoiding adjacent step pattern up, down, up, down, up, up.
2
1, 1, 2, 6, 24, 120, 720, 4885, 37840, 329400, 3182400, 33778800, 391590750, 4915323791, 66442003448, 962278914330, 14866633343040, 244014015391725, 4240899164064012, 77799960323395327, 1502369690026049320, 30462229695574890900, 647071778569768101485
OFFSET
0,3
LINKS
FORMULA
a(n) ~ c * d^n * n!, where d = 0.96553264441829855042601163560012935129948..., c = 1.245410138868090155003662557978590938375... . - 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, 1, 5, 1, 5][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 2, 4, 2, 6, 7][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 30 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, 1, 5, 1, 5}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 2, 4, 2, 6, 7}[[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
Columns k=43,53 of A242784.
Sequence in context: A147737 A177539 A177546 * A177540 A068201 A189848
KEYWORD
nonn
AUTHOR
R. H. Hardin, May 10 2010
EXTENSIONS
a(17)-a(22) from Alois P. Heinz, Oct 30 2013
STATUS
approved