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

%I #14 Apr 19 2022 11:01:58

%S 1,1,2,6,24,120,720,4908,38208,334368,3248640,34774112,405758208,

%T 5129918808,69849531936,1018876044528,15854497560576,262116761475488,

%U 4588408779868800,84784281517177940,1649073291620014880,33678805727832427224,720569710852319474016

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

%H Alois P. Heinz, <a href="/A177540/b177540.txt">Table of n, a(n) for n = 0..175</a>

%F a(n) ~ c * d^n * n!, where d = 0.97251576612005359341988641793523250275..., c = 1.18354011206219905745522624899424386... . - _Vaclav Kotesovec_, Jan 17 2015

%p b:= proc(u, o, t) option remember; `if`(t>6, 0, `if`(u+o+t<7, (u+o)!,

%p add(b(u-j, o+j-1, [1, 3, 4, 1, 3, 7][t]), j=1..u)+

%p add(b(u+j-1, o-j, [2, 2, 2, 5, 6, 2][t]), j=1..o)))

%p end:

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

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

%t b[u_, o_, t_] := b[u, o, t] = If[t > 6, 0, If[u + o + t < 7, (u + o)!,

%t Sum[b[u - j, o + j - 1, {1, 3, 4, 1, 3, 7}[[t]]], {j, 1, u}] +

%t Sum[b[u + j - 1, o - j, {2, 2, 2, 5, 6, 2}[[t]]], {j, 1, o}]]];

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

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

%Y Column k=38 of A242784.

%K nonn

%O 0,3

%A _R. H. Hardin_, May 10 2010

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

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 23 09:22 EDT 2024. Contains 371905 sequences. (Running on oeis4.)