login
Number of permutations of [n] with exactly two (possibly overlapping) occurrences of the generalized pattern 12-3.
2

%I #7 Nov 14 2015 08:03:43

%S 1,13,112,843,6089,43887,321357,2411686,18631631,148490575,1221894598,

%T 10382648734,91073271181,824221683639,7690752545310,73932347642395,

%U 731636916804531,7447376286108705,77913394499688645,837113596053971008,9229808681562243113

%N Number of permutations of [n] with exactly two (possibly overlapping) occurrences of the generalized pattern 12-3.

%H Alois P. Heinz, <a href="/A264451/b264451.txt">Table of n, a(n) for n = 4..500</a>

%e a(4) = 1: 1243.

%e a(5) = 13: 13254, 13524, 13542, 14235, 21354, 23154, 23514, 23541, 24135, 31254, 34125, 41253, 51243.

%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^(o-j), x, 3), polynom), j=1..o))

%p end:

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

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

%Y Column k=2 of A260665.

%K nonn

%O 4,2

%A _Alois P. Heinz_, Nov 14 2015