%I #30 Mar 10 2020 11:55:46
%S 1,1,2,6,21,90,450,2619,17334,129114,1067661,9713682,96393726,
%T 1036348587,11998603710,148842430470,1969461102357,27688474234602,
%U 412166988789642,6476330295597051,107117619952992966,1860296912926495938,33845967939906741213,643778989807702357314
%N Number of permutations of 1..n avoiding adjacent step pattern up, down, down.
%C Suppose j<i, k<j and k<m. To avoid ijkm means not to have four consecutive letters such that the first letter is larger than the second one, the second letter is larger than the third one, and the fourth letter is larger than the third one.
%H Alois P. Heinz, <a href="/A177479/b177479.txt">Table of n, a(n) for n = 0..464</a>
%H S. Kitaev, <a href="https://doi.org/10.1016/j.dam.2006.09.011">Introduction to partially ordered patterns</a>, Discrete Applied Mathematics 155 (2007), 929-944.
%F E.g.f.: (exp(3*x/2) + 2*cos(sqrt(3)*x/2)) / (3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2)). - _Vaclav Kotesovec_, Aug 23 2014
%F a(n) ~ n! * (1+exp(Pi/sqrt(3))) * 3^(3*n/2+1/2) / (2*Pi)^(n+1). - _Vaclav Kotesovec_, Aug 23 2014
%p b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
%p add(b(u+j-1, o-j, 1), j=1..o)+ `if`(t<2,
%p add(b(u-j, o+j-1, `if`(t=0, 0, 2)), 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 FullSimplify[Rest[CoefficientList[Series[(E^(3*x/2) + 2*Cos[Sqrt[3]*x/2]) / (3*Cos[Sqrt[3]*x/2] - Sqrt[3]*Sin[Sqrt[3]*x/2]), {x, 0, 20}], x] * Range[0, 20]!]] (* _Vaclav Kotesovec_, Aug 23 2014 *)
%Y Column k=0 of A242819.
%Y Columns k=4,6 of A242784.
%K nonn
%O 0,3
%A Submitted independently by Signy Olafsdottir (signy06(AT)ru.is), May 09 2010 (9 terms) and _R. H. Hardin_, May 10 2010 (17 terms)
%E a(18)-a(23) from _Alois P. Heinz_, Oct 06 2013