|
|
A071077
|
|
Number of permutations that avoid the generalized pattern 1234-5.
|
|
4
|
|
|
1, 1, 2, 6, 24, 119, 705, 4857, 38142, 336291, 3289057, 35337067, 413698248, 5241768017, 71465060725, 1043175024243, 16231998346794, 268207096127991, 4690005160446721, 86528908665043683, 1679764981327051508, 34226671269330933413, 730361830628447403029
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
E.g.f.: exp(int(A(y), y=0..x)), where A(y) = 1/(Sum_{i>=0} y^{4*i}/(4*i)! - Sum_{i>=0} y^{4*i+1}/(4*i+1)!).
Let b(n) = A117158(n) = number of permutations of [n] that avoid the consecutive pattern 1234. Then a(n) = Sum_{i = 0..n-1} binomial(n-1,i)*b(i)*a(n-1-i) with a(0) = b(0) = 1. [See the recurrence for A_n and B_n in the proof of Theorem 13 in Kitaev's papers.] - Petros Hadjicostas, Oct 31 2019
|
|
MAPLE
|
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(
`if`(t=2 and o>j, 0, b(u+j-1, o-j, t+1)), j=1..o)+
add(b(u-j, o+j-1, 0), j=1..u))
end:
a:= n-> b(n, 0$2):
|
|
MATHEMATICA
|
b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1, Sum[If[t == 2 && o>j, 0, b[u+j-1, o-j, t+1]], {j, 1, o}] + Sum[b[u-j, o+j-1, 0], {j, 1, u}]];
a[n_] := b[n, 0, 0];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,changed
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|