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

%I #20 Apr 20 2022 09:03:37

%S 1,1,2,6,24,114,648,4284,32256,273616,2578352,26725776,302273664,

%T 3703441104,48865510848,690823736064,10417318281216,166907223390976,

%U 2831507368842752,50703852290781696,955742450175919104,18916030525704006144,392213482250102734848

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

%H Alois P. Heinz, <a href="/A177522/b177522.txt">Table of n, a(n) for n = 0..454</a>

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

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

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

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

%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,

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

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

%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=12 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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)