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!)
A177521 Number of permutations of 1..n avoiding adjacent step pattern up, down, up, up. 2
1, 1, 2, 6, 24, 111, 612, 3906, 28701, 236527, 2167862, 21824925, 239861934, 2854894485, 36602472117, 502718236303, 7365503262033, 114653301213668, 1889769527067410, 32877891905367530, 602116339324675145, 11578253045158664158, 233244225298760907868 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) ~ c * d^n * n!, where d = 0.91568163084580807076940792182223499091165..., c = 1.44100339681864767911275854344010332196608... . - Vaclav Kotesovec, Aug 29 2014
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, `if`(t<3,
add(b(u+j-1, o-j, `if`(t=2, 3, 1)), j=1..o), 0)+
add(b(u-j, o+j-1, `if`(irem(t, 2)=0, 0, 2)), j=1..u))
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, If[t < 3,
Sum[b[u + j - 1, o - j, If[t == 2, 3, 1]], {j, 1, o}] , 0] +
Sum[b[u - j, o + j - 1, If[EvenQ[t], 0, 2]], {j, 1, u}]];
a[n_] := b[n, 0, 0];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Apr 20 2022, after Alois P. Heinz *)
CROSSREFS
Columns k=11,13 of A242784.
Sequence in context: A342284 A174195 A274378 * A152322 A308726 A168490
KEYWORD
nonn
AUTHOR
R. H. Hardin, May 10 2010
EXTENSIONS
a(17)-a(22) from Alois P. Heinz, Oct 07 2013
a(0)=1 from Alois P. Heinz, Apr 20 2022
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 July 13 02:50 EDT 2024. Contains 374265 sequences. (Running on oeis4.)