OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..450
Sergey Kitaev, Partially Ordered Generalized Patterns, preprint.
Sergey Kitaev, Partially Ordered Generalized Patterns, Discrete Math. 298 (2005), no. 1-3, 212-229.
FORMULA
E.g.f.: exp(int(A(y), y=0..x)), where A(y) = 1/(Sum_{i>=0} y^{5*i}/(5*i)! - Sum_{i>=0} y^{5*i+1}/(5*i+1)!).
Let b(n) = A177523(n) = number of permutations of [n] that avoid the consecutive pattern 12345. 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, Nov 01 2019
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(
`if`(t=3 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):
seq(a(n), n=0..25); # Alois P. Heinz, Nov 14 2015
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1, Sum[If[t == 3 && 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];
a /@ Range[0, 25] (* Jean-François Alcover, Nov 02 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Sergey Kitaev, May 26 2002
EXTENSIONS
More terms from Vladeta Jovovic, May 28 2002
STATUS
approved