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

%I #19 Apr 20 2022 09:31:57

%S 1,1,2,6,24,111,612,3906,28701,236527,2167862,21824925,239861934,

%T 2854894485,36602472117,502718236303,7365503262033,114653301213668,

%U 1889769527067410,32877891905367530,602116339324675145,11578253045158664158,233244225298760907868

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

%H Alois P. Heinz, <a href="/A177521/b177521.txt">Table of n, a(n) for n = 0..456</a>

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

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

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

%p add(b(u-j, o+j-1, `if`(irem(t, 2)=0, 0, 2)), 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, If[t == 2, 3, 1]], {j, 1, o}] , 0] +

%t Sum[b[u - j, o + j - 1, If[EvenQ[t], 0, 2]], {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 Columns k=11,13 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 August 10 17:16 EDT 2024. Contains 375058 sequences. (Running on oeis4.)