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!)
A295974 Number of length-n permutations avoiding descent patterns aba and bab. 3

%I #26 Dec 28 2017 07:56:22

%S 1,1,2,6,14,52,204,1010,5466,34090,233026,1765836,14534404,129916550,

%T 1248875862,12872804422,141470905326,1652327596652,20430973234388,

%U 266683791698634,3664052636652962,52859944626536554,798893924217099426,12622926284124944660

%N Number of length-n permutations avoiding descent patterns aba and bab.

%C The descent pattern of a permutation is the sign of the first difference of the permutation, with "a" denoting a rise (+1) and "b" denoting a descent (-1). For example, the permutation 364125 has descent pattern abbaa.

%H Alois P. Heinz, <a href="/A295974/b295974.txt">Table of n, a(n) for n = 0..479</a>

%H Richard Ehrenborg and JiYoon Jung, <a href="https://doi.org/10.1016/j.aam.2012.08.004">Descent pattern avoidance</a>, Adv. Appl. Math. 49 (3-5) (2012), 375-390.

%H Richard Ehrenborg and JiYoon Jung, <a href="https://arxiv.org/abs/1312.2027">Descent pattern avoidance</a>, arXiv preprint:1312.2027 [math.CO], 6 Dec 2013.

%F Ehrenborg and Jung prove that a(n) ~ 0.8908970548...*(0.6869765032...)^(n-3)*n!.

%e For n = 4 the 10 permutations NOT counted are 1324, 1423, 2143, 2314, 2413, 3142, 3241, 3412, 4132, 4231.

%p b:= proc(u, o, t, h) option remember;

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

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

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

%p end:

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

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Dec 01 2017

%t b[u_, o_, t_, h_] := b[u, o, t, h] = If[u + o == 0, 1, If[t == 0, Sum[b[u - j, j - 1, 1, 1], {j, 1, u}], Sum[If[h == 3, 0, b[u - j, o + j - 1, {1, 3, 1}[[t]], 2]], {j, 1, u}] + Sum[If[t == 3, 0, b[u + j - 1, o - j, 2, {1, 3, 1}[[h]]]], {j, 1,o}]]];

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

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

%Y Column k=0 of A295987.

%Y Cf. A296054.

%K nonn

%O 0,3

%A _Jeffrey Shallit_, Dec 01 2017

%E a(13)-a(23) from _Alois P. Heinz_, Dec 01 2017

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 7 11:26 EDT 2024. Contains 375012 sequences. (Running on oeis4.)