login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A177520 Number of permutations of 1..n avoiding adjacent step pattern up, down, up, down. 3
1, 1, 2, 6, 24, 104, 528, 3296, 23168, 179712, 1573632, 15207424, 158880768, 1801996288, 22088716288, 289379395584, 4040899657728, 60045059489792, 944460646318080, 15670973219667968, 273813250221277184, 5024207327266603008, 96554813072964845568 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) ~ c * d^n * n!, where d = 0.87361286073825385348141673848..., c = 1.678751353034864037734331900009... . - Vaclav Kotesovec, Aug 28 2014
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(u+j-1, o-j, `if`(t=2, 3, 1)), j=1..o) +`if`(t<3,
add(b(u-j, o+j-1, `if`(t=1, 2, 0)), j=1..u), 0))
end:
a:= n-> b(n, 0, 0):
seq(a(n), n=0..30); # Alois P. Heinz, Oct 07 2013
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1,
Sum[b[u + j - 1, o - j, If[t == 2, 3, 1]], {j, 1, o}] + If[t < 3,
Sum[b[u - j, o + j - 1, If[t == 1, 2, 0]], {j, 1, u}], 0]];
a[n_] := b[n, 0, 0];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Apr 20 2022, after Alois P. Heinz *)
CROSSREFS
Column k=0 of A230797.
Column k=10 of A242784.
Sequence in context: A230797 A128652 A152316 * A152326 A152330 A152319
KEYWORD
nonn
AUTHOR
R. H. Hardin, May 10 2010
EXTENSIONS
a(17)-a(22) from Alois P. Heinz, Oct 07 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:06 EDT 2024. Contains 371967 sequences. (Running on oeis4.)