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!)
A177519 Number of permutations of 1..n avoiding adjacent step pattern up, down, down, up. 3

%I #26 Apr 20 2022 09:11:34

%S 1,1,2,6,24,109,588,3654,26125,209863,1876502,18441367,197776850,

%T 2297242583,28739304385,385195455471,5507210188401,83657067537498,

%U 1345556172013026,22844387886649418,408258252653717337,7660885499702743124,150600621665021781932

%N Number of permutations of 1..n avoiding adjacent step pattern up, down, down, up.

%H Alois P. Heinz, <a href="/A177519/b177519.txt">Table of n, a(n) for n = 0..458</a>

%F a(n) ~ c * d^n * n!, where d = 0.89356257576899599804435763285311831354458355576519..., c = 1.593348415562339201282264582915828860634166516332738... . - _Vaclav Kotesovec_, Aug 29 2014

%p b:= proc(u, o, t) option remember; `if`(u+o=0, 1,

%p `if`(t<3, add(b(u+j-1, o-j, 1), j=1..o), 0)+

%p add(b(u-j, o+j-1, `if`(t in [0,3], 0, t+1)), j=1..u))

%p end:

%p a:= n-> b(n, 0, 0):

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Oct 07 2013

%t b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, If[t < 3,

%t Sum[b[u + j - 1, o - j, 1], {j, 1, o}], 0] +

%t Sum[b[u - j, o + j - 1, If[MemberQ[{0, 3}, t], 0, t+1]], {j, 1, u}]];

%t a[n_] := b[n, 0, 0];

%t Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Apr 20 2022, after _Alois P. Heinz_ *)

%Y Column k=0 of A230695.

%Y Column k=9 of A242784.

%K nonn

%O 0,3

%A _R. H. Hardin_, May 10 2010

%E a(17)-a(22) from _Alois P. Heinz_, Oct 07 2013

%E a(0)=1 from _Alois P. Heinz_, Apr 20 2022

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 September 14 16:47 EDT 2024. Contains 375929 sequences. (Running on oeis4.)