120 Combinatorics of Compositions and Words
The corresponding values for n =0,...,20 are 1, 1, 2, 4, 7, 13, 24, 44,
82, 153, 284, 528, 981, 1820, 3378, 6270, 11638, 21608, 40121, 74494 and
138317. Note that the first time the pattern 121 can occur is for n =4,asthe
composition 121.
In [92], the two patterns 212 and 121 were not treated individually, but
as part of the patterns peak and valley, as were the patterns 213
st
∼ 312 and
132
st
∼ 231. We will now look at families that generalize these patterns, namely
the patterns τ = pτ
(p +1),where τ
is a pattern with letters in [p − 1], and
ν =1ν
2, where ν
is a pattern with letters in {3, 4,...}.
Theorem 4.39 Let τ = pτ
(p+1) and ν =1ν
2,whereτ
and ν
are patterns
of length − 2 in [p − 1] and {3, 4,...}, respectively. Then
C
τ
A
(x, y, q)=
1
1 −
d
i=1
x
a
i
y
i−1
j=1
1+x
a
j
y
−1
(q − 1)
α∈B
j−1
x
ord ( α)
,
where B
j−1
is the set of all compositions α = a
i
1
···a
i
−2
with parts in A
j−1
such that α is order-isomorphic to τ
,and
C
ν
A
(x, y, q)=
1
1 −
d
i=1
x
a
i
y
d
j=i+1
1+x
a
j
y
−1
(q − 1)
α∈
¯
B
j+1
x
ord ( α)
,
where
¯
B
j+1
is the set of all compositions α = a
i
1
···a
i
−2
with parts in
¯
A
j
such that α is order-isomorphic to ν
.
The proof of Theorem 4.39 is similar to that of Theorem 4.37 and is left for
the interested reader.
Example 4.40 We can now obtain results on the individual 3-letter patterns
213 and 132. In both cases, the patterns τ
and ν
consist of a single part, and
therefore, ord(α)=α.Forτ = 213 and ν = 132, this gives
α∈B
j−1
x
ord ( α)
=
1≤α≤j−1
x
α
and
α∈
¯
B
j+1
x
ord ( α)
=
α≥j+1
x
α
,
respectively. Applying Theorem 4.39 for τ = 213 with A = N, y =1,and
q =0gives
C
213
N
(x, 1, 0) =
1
1 −
i≥1
x
i
i−1
j=1
(1 − x
j
(x − x
j
)/(1 − x))
,
and the sequence for the number of compositions of n that avoid 213 for n =
0, 1,...,20 is given by 1, 1, 2, 4, 8, 16, 31, 61, 119, 232, 452, 881, 1716,
© 2010 by Taylor and Francis Group, LLC