A246246 Number of permutations of [n] with exactly one occurrence of the consecutive step pattern up, down, down.
3, 30, 270, 2322, 20772, 195372, 1958337, 20933154, 238789782, 2900868876, 37451986200, 512534035080, 7416327050415, 113185393797510, 1817654015037150, 30647027466113094, 541407973316966604, 10001886705503187732, 192877025408450517501, 3876090406516703418282
Offset: 4
Keywords
Links
- Alois P. Heinz and Vaclav Kotesovec, Table of n, a(n) for n = 4..300 (first 160 terms from Alois P. Heinz)
Crossrefs
Column k=1 of A242819.
Programs
-
Maple
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, expand( add(b(u-j, o+j-1, [1, 3, 1][t])*`if`(t=3, x, 1), j=1..u)+ add(b(u+j-1, o-j, 2), j=1..o))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0, 1)): seq([T(n)][2], n=4..20); # Vaclav Kotesovec, Aug 22 2014 after Alois P. Heinz
-
Mathematica
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}]]]; a[n_] := Coefficient[b[n, 0, 1], x, 1]; a /@ Range[4, 20] (* Jean-François Alcover, Dec 28 2020, after Maple *)
Formula
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