login
Number of permutations of [n] with exactly one occurrence of the generalized pattern 23-1.
2

%I #14 Sep 28 2020 07:53:38

%S 1,6,32,171,944,5444,32919,208816,1388240,9657929,70187054,531857288,

%T 4194927585,34379859346,292303350268,2574284790795,23450837821836,

%U 220681535036288,2142618638738279,21438586249394500,220827871704427308,2339281577294955745

%N Number of permutations of [n] with exactly one occurrence of the generalized pattern 23-1.

%H Alois P. Heinz, <a href="/A264460/b264460.txt">Table of n, a(n) for n = 3..500</a>

%e a(3) = 1: 231.

%e a(4) = 6: 1342, 2314, 2413, 2431, 3241, 4231.

%p b:= proc(u, o) option remember; `if`(u+o=0, 1, add(

%p b(u-j, o+j-1), j=1..u) +add(convert(series(

%p b(u+j-1, o-j)*x^u, x, 2), polynom), j=1..o))

%p end:

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

%p seq(a(n), n=3..25);

%t b[u_, o_] := b[u, o] = If[u+o == 0, 1, Sum[b[u-j, o+j-1], {j, 1, u}] + Sum[Series[b[u+j-1, o-j] x^u, {x, 0, 2}] // Normal, {j, 1, o}]];

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

%t a /@ Range[3, 25] (* _Jean-François Alcover_, Sep 28 2020, after Maple *)

%Y Column k=1 of A260670.

%K nonn

%O 3,2

%A _Alois P. Heinz_, Nov 14 2015