%I #15 Dec 28 2020 09:53:24
%S 3,30,270,2322,20772,195372,1958337,20933154,238789782,2900868876,
%T 37451986200,512534035080,7416327050415,113185393797510,
%U 1817654015037150,30647027466113094,541407973316966604,10001886705503187732,192877025408450517501,3876090406516703418282
%N Number of permutations of [n] with exactly one occurrence of the consecutive step pattern up, down, down.
%H Alois P. Heinz and Vaclav Kotesovec, <a href="/A246246/b246246.txt">Table of n, a(n) for n = 4..300</a> (first 160 terms from Alois P. Heinz)
%F a(n) ~ c * (3*sqrt(3)/(2*Pi))^n * n! * n, where c = 0.6335500498606750386938465... = c0 * (c0-1)/3, and c0 = (1+exp(Pi/sqrt(3))) * sqrt(3) / (2*Pi). - _Vaclav Kotesovec_, Aug 22 2014
%p b:= proc(u, o, t) option remember; `if`(u+o=0, 1, expand(
%p add(b(u-j, o+j-1, [1, 3, 1][t])*`if`(t=3, x, 1), j=1..u)+
%p add(b(u+j-1, o-j, 2), j=1..o)))
%p end:
%p T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0, 1)):
%p seq([T(n)][2], n=4..20); # _Vaclav Kotesovec_, Aug 22 2014 after Alois P. Heinz
%t b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Expand[Sum[b[u - j, o + j - 1, {1, 3, 1}[[t]]]*If[t == 3, x, 1], {j, 1, u}] + Sum[b[u + j - 1, o - j, 2], {j, 1, o}]]];
%t a[n_] := Coefficient[b[n, 0, 1], x, 1];
%t a /@ Range[4, 20] (* _Jean-François Alcover_, Dec 28 2020, after Maple *)
%Y Column k=1 of A242819.
%K nonn
%O 4,1
%A _Alois P. Heinz_, Aug 20 2014