This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Pattern avoidance in nonnesting permutations

Sergi Elizalde sergi.elizalde@dartmouth.edu Department of Mathematics, Dartmouth College, Hanover, NH, USA Amya Luo amya.l.luo.24@dartmouth.edu Department of Mathematics, Dartmouth College, Hanover, NH, USA
Abstract

Nonnesting permutations are permutations of the multiset {1,1,2,2,,n,n}\{1,1,2,2,\dots,n,n\} that avoid subsequences of the form abbaabba for any aba\neq b. These permutations have recently been studied in connection to noncrossing (also called quasi-Stirling) permutations, which are those that avoid subsequences of the form abababab, and in turn generalize the well-known Stirling permutations. Inspired by the work by Archer et al. on pattern avoidance in noncrossing permutations, we consider the analogous problem in the nonnesting case. We enumerate nonnesting permutations that avoid each set of two or more patterns of length 3, as well as those that avoid some sets of patterns of length 4. We obtain closed formulas and generating functions, some of which involve unexpected appearances of the Catalan and Fibonacci numbers. Our proofs rely on decompositions, recurrences, and bijections.

Keywords: nonnesting permutation, pattern avoidance, nonnesting matching

1 Introduction

Let [n]={1,2,,n}[n]=\{1,2,\dots,n\}, and let 𝒮n\mathcal{S}_{n} be the set of permutations of [n][n]. Denote by [n][n]={1,1,2,2,,n,n}[n]\sqcup[n]=\{1,1,2,2,\dots,n,n\} the multiset consisting of two copies of each integer between 11 and nn.

Given two words π=π1π2πm\pi=\pi_{1}\pi_{2}\dots\pi_{m} and σ=σ1σ2σk\sigma=\sigma_{1}\sigma_{2}\dots\sigma_{k} over the positive integers \mathbb{N}, we say that π\pi contains the pattern σ\sigma if there exist indices 1i1<i2<<ikm1\leq i_{1}<i_{2}<\dots<i_{k}\leq m such that the subsequence πi1πi2πik\pi_{i_{1}}\pi_{i_{2}}\dots\pi_{i_{k}} is in the same relative order as σ\sigma, that is,

  • πir<πis\pi_{i_{r}}<\pi_{i_{s}} if and only if σr<σs\sigma_{r}<\sigma_{s}, and

  • πir=πis\pi_{i_{r}}=\pi_{i_{s}} if and only if σr=σs\sigma_{r}=\sigma_{s},

for all r,s[k]r,s\in[k]. This subsequence is called an occurrence of σ\sigma. If π\pi does not contain σ\sigma, we say that π\pi avoids the pattern σ\sigma.

A Stirling permutation is a permutation π\pi of [n][n][n]\sqcup[n] that avoids the pattern 212212; equivalently, there do not exist indices 1i1<i2<i32n1\leq i_{1}<i_{2}<i_{3}\leq 2n such that πi2<πi1=πi3\pi_{i_{2}}<\pi_{i_{1}}=\pi_{i_{3}}. Stirling permutations were introduced by Gessel and Stanley in the 70s [8] in connection to certain generating functions for Stirling numbers of the second kind.

A quasi-Stirling permutation is a permutation π\pi of [n][n][n]\sqcup[n] that avoids the patterns 12121212 and 21212121; equivalently, there do not exist indices 1i1<i2<i3<i42n1\leq i_{1}<i_{2}<i_{3}<i_{4}\leq 2n such that πi1=πi3\pi_{i_{1}}=\pi_{i_{3}} and πi2=πi4\pi_{i_{2}}=\pi_{i_{4}}. Quasi-Stirling permutations were introduced by Archer et al. [1] as a generalization of Stirling permutations that arises in connection with labeled trees, and were further studied in [5].

One can view permutations π\pi of [n][n][n]\sqcup[n] as labeled matchings of [2n][2n], by placing an arc with label \ell between ii and jj if πi=πj=\pi_{i}=\pi_{j}=\ell. With this interpretation, a permutation of [n][n][n]\sqcup[n] is quasi-Stirling if and only if the corresponding matching is noncrossing, i.e., there are no two arcs (i1,i3)(i_{1},i_{3}) and (i2,i4)(i_{2},i_{4}) where i1<i2<i3<i4i_{1}<i_{2}<i_{3}<i_{4}. For this reason, quasi-Stirling permutations are also called noncrossing permutations in [6].

With this perspective, it is natural to consider permutations of [n][n][n]\sqcup[n] whose corresponding matching is nonnesting, i.e., there are no two arcs (i1,i4)(i_{1},i_{4}) and (i2,i3)(i_{2},i_{3}) where i1<i2<i3<i4i_{1}<i_{2}<i_{3}<i_{4}. They can be defined as permutations of [n][n][n]\sqcup[n] that avoid the patterns 12211221 and 21122112. Following [6], we call these nonnesting permutations, and we denote by 𝒞n\mathcal{C}_{n} the set of nonnesting permutations of [n][n][n]\sqcup[n]. For example, as shown in Figure 1, 1521352434𝒞51521352434\in\mathcal{C}_{5}, but 13241342𝒞413241342\notin\mathcal{C}_{4}, because the subsequence 24422442 is in the same relative order as 12211221. It is well known [14] that both noncrossing and nonnesting matchings of [2n][2n] are counted by the nnth Catalan number Cn=1n+1(2nn)C_{n}=\frac{1}{n+1}\binom{2n}{n}. Since there are n!n! ways to assign the labels to the arcs, it follows [6] that both the number noncrossing and the number of nonnesting permutations of [n][n][n]\sqcup[n] are given by

|𝒞n|=n!Cn=(2n)!(n+1)!.|\mathcal{C}_{n}|=n!C_{n}=\frac{(2n)!}{(n+1)!}.
115522113355224433441133224411334422
Figure 1: The permutation 15213524341521352434 is nonnesting, but the permutation 1324134213241342 is not.

In [1], Archer et al. consider quasi-Stirling permutations that avoid other patterns. Specifically, they enumerate quasi-Stirling (i.e. noncrossing) permutations that avoid any set of at least two elements from 𝒮3\mathcal{S}_{3}. The goal of this paper is to extend the results from [1] to the nonnesting case, by providing the enumeration of nonnesting permutations that avoid any set of at least two elements from 𝒮3\mathcal{S}_{3}, as well as those that avoid some patterns of length 4.

The known bijections between noncrossing and nonnesting matchings (see e.g. [3]), when extended to permutations of [n][n][n]\sqcup[n], do not generally behave well with respect to pattern avoidance. In particular, with the exception described in Remark 2.10, there is no straightforward way to translate the results from [1] to our setting. This is reflected in the fact that the enumeration formulas that we obtain in the nonnesting case are mostly different from those in [1, Fig. 6].

Additional motivation for the study of pattern-avoiding nonnesting permutations comes from Bernardi’s work on deformations of the braid arrangement [4]. He shows that certain configurations, called annotated 11-sketches, naturally index the regions of the Catalan arrangement, and that certain subsets of them index the regions of other important hyperplane arrangements. It turns out that annotated 11-sketches are precisely nonnesting permutations, and that the relevant subsets can be described as nonnesting permutations avoiding vincular patterns, which are patterns where some entries are required to be adjacent in an occurrence. For example, regions of the semiorder arrangement are indexed by permutations π𝒞n\pi\in\mathcal{C}_{n} with no subsequence πiπi+1πjπj+1\pi_{i}\pi_{i+1}\pi_{j}\pi_{j+1} such that πi=πj<πi+1=πj+1\pi_{i}=\pi_{j}<\pi_{i+1}=\pi_{j+1} (in vincular pattern notation, we say that π\pi avoids 12-1212\text{-}12), regions of the Shi arrangement are indexed by permutations π𝒞n\pi\in\mathcal{C}_{n} with no subsequence πiπjπj+1πk\pi_{i}\pi_{j}\pi_{j+1}\pi_{k} such that πi=πj<πj+1=πk\pi_{i}=\pi_{j}<\pi_{j+1}=\pi_{k} (we say that π\pi avoids 1-12-21\text{-}12\text{-}2), and regions of the Linial arrangement are indexed by permutations π𝒞n\pi\in\mathcal{C}_{n} that avoid both 12-1212\text{-}12 and 1-12-21\text{-}12\text{-}2. The numbers of regions of such hyperplane arrangements are well known, so one immediately deduces formulas for the number of nonnesting permutations avoiding these specific vincular patterns. This suggests the problem of enumerating nonnesting permutations that avoid other patterns. In this paper we will tackle this problem for the case of classical patterns, that is, with no adjacency requirements. In general, the number of permutations avoiding a vincular pattern is bounded from below by the number of permutations avoiding the corresponding classical pattern where the adjacency requirements have been removed.

In Section 2, we study nonnesting permutations that avoid sets of patterns of length 33, completing the enumeration for all sets Λ𝒮3\Lambda\subseteq\mathcal{S}_{3} consisting of at least 22 patterns, in analogy with the work in [1] for the noncrossing case. In Section 3, we enumerate nonnesting permutations avoiding several sets of patterns of length 44, which often require more complicated proofs. Our results include some unexpected new interpretations of the Catalan numbers. We conclude with a few conjectures in Section 4.

The proof techniques include bijections, generating functions (both ordinary and exponential), and decompositions of the permutations into smaller pieces obtained by analyzing their structure, which often give rise to recurrences or summation formulas.

Let us finish this section by introducing some notation. Given a set Λ\Lambda of finite words over \mathbb{N}, let 𝒞n(Λ)\mathcal{C}_{n}(\Lambda) denote the set of permutations in 𝒞n\mathcal{C}_{n} that avoid all the patterns in Λ\Lambda, and let its cardinality be cn(Λ)=|𝒞n(Λ)|c_{n}(\Lambda)=\left|\mathcal{C}_{n}(\Lambda)\right|. If Λ={σ,τ,}\Lambda=\{\sigma,\tau,\dots\}, we often write 𝒞n(σ,τ,)\mathcal{C}_{n}(\sigma,\tau,\dots) instead of 𝒞n({σ,τ,})\mathcal{C}_{n}(\{\sigma,\tau,\dots\}).

For any word α=α1α2αk\alpha=\alpha_{1}\alpha_{2}\dots\alpha_{k} over \mathbb{N}, define its reversal by αr=αkα2α1\alpha^{r}=\alpha_{k}\dots\alpha_{2}\alpha_{1}. If nn is the largest entry of α\alpha, define its complement αc\alpha^{c} to be the word whose iith entry is n+1αin+1-\alpha_{i} for all i[k]i\in[k]. The composition of these two operations gives the reverse-complement αrc\alpha^{rc}. Clearly, π\pi avoiding σ\sigma is equivalent to πr\pi^{r} avoiding σr\sigma^{r}, to πc\pi^{c} avoiding σc\sigma^{c}, and to πrc\pi^{rc} avoiding σrc\sigma^{rc}. In particular, the set 𝒞n\mathcal{C}_{n} is closed under the operations of reversal and complementation.

Denote by st(α)\operatorname{st}(\alpha) the standardization of α\alpha, which is obtained by replacing the copies of the smallest entry with 11, the copies of the second smallest entry with 22, and so on.

Denote by Set(α)\operatorname{Set}(\alpha) the set of different entries in α\alpha, without multiplicities. For example, we have Set(113232)={1,2,3}\operatorname{Set}(113232)=\{1,2,3\}. Given two sets AA and BB, we write A<BA<B to mean that a<ba<b for every aAa\in A and bBb\in B. Given two words α\alpha and β\beta, we write α<β\alpha<\beta to mean Set(α)<Set(β)\operatorname{Set}(\alpha)<\operatorname{Set}(\beta). We define other relations >>, \leq and \geq similarly. Note that ABA\leq B implies that |AB|1\left|A\cap B\right|\leq 1. Note also that these relations are not transitive or antisymmetric, since the empty word, which we denote by ε\varepsilon, trivially satisfies that εα\varepsilon\leq\alpha and εα\varepsilon\geq\alpha for any α\alpha.

If π𝒞n\pi\in\mathcal{C}_{n} avoids a pattern σ\sigma, then the permutation π𝒞n1\pi^{\prime}\in\mathcal{C}_{n-1} obtained by removing the two copies of nn from π\pi also avoids σ\sigma. In this case, we will say that π\pi^{\prime} generates π\pi.

2 Patterns of length 3

In this section we consider nonnesting permutations avoiding patterns of length 3. Applying reversal and complementation, the enumeration of 𝒞n(Λ)\mathcal{C}_{n}(\Lambda) for all Λ𝒮3\Lambda\subseteq\mathcal{S}_{3} with |Λ|2|\Lambda|\geq 2 can be reduced to the sets listed in Table 1, which serves as a summary of the results in this section.

Λ\Lambda Formula for cn(Λ)c_{n}(\Lambda) OEIS code Result in the paper
{112}\{112\} CnC_{n} A000108 Theorem 2.1
{121}\{121\} n!n! A000142 Theorem 2.2
{123,321}\{123,321\} 0, for n5n\geq 5 N/A Corollary 2.4
{123,231}\{123,231\} n2+5n62\dfrac{n^{2}+5n-6}{2}, for n2n\geq 2 A055999 Theorem 2.5
{132,213}\{132,213\} Fn2F_{n}^{2} A007598 Theorem 2.6
{132,231}\{132,231\} 2n2^{n}, for n2n\geq 2 A000079 Theorem 2.7
{132,312}\{132,312\} 43n24\cdot 3^{n-2}, for n2n\geq 2 A003946 Theorem 2.8
{123,213}\{123,213\} Theorem 2.9
{123,132,213}\{123,132,213\} OGF: 1x12x2x2+2x3\dfrac{1-x}{1-2x-2x^{2}+2x^{3}} A052528 Theorem 2.11
{123,213,312}\{123,213,312\} n+2n+2 , for n2n\geq 2 A000027 Theorem 2.12
{132,213,312}\{132,213,312\} Theorem 2.13
{123,231,312}\{123,231,312\} nn, for n3n\geq 3 A000027 Theorem 2.14
{123,213,231}\{123,213,231\} 4(n1)4(n-1), for n2n\geq 2 A008586 Theorem 2.15
{123,132,213,231}\{123,132,213,231\} 44, for n2n\geq 2 N/A Theorem 2.16
{123,132,231,312}\{123,132,231,312\} 22, for n3n\geq 3 N/A Theorem 2.17
{132,213,231,312}\{132,213,231,312\} Theorem 2.18
{123,132,213,231,312}\{123,132,213,231,312\} 11, for n3n\geq 3 N/A Theorem 2.19
Table 1: A summary of the enumeration of nonnesting permutations avoiding subsets of 𝒮3\mathcal{S}_{3} of size at least 2, as well as two classes of nonnesting permutations avoiding a single pattern. The formulas are valid for n1n\geq 1 unless otherwise stated. OEIS refers to the Online Encyclopedia of Integer Sequences [11], OGF stands for ordinary generating function, and FnF_{n} denotes the nnth Fibonacci number.

2.1 Avoiding one pattern

By reversal and complementation, the enumeration of nonnesting permutations avoiding a single pattern in 𝒮3\mathcal{S}_{3} reduces to the enumeration of the sets 𝒞n(123)\mathcal{C}_{n}(123) and 𝒞n(132)\mathcal{C}_{n}(132). After we stated these as open problems in a previous version of this article posted online, a functional equation for the generating function for cn(132)c_{n}(132) has been found very recently by Archer and Laudone [2]. We still do not have a formula for cn(123)c_{n}(123). For comparison, the enumeration of quasi-Stirling permutations avoiding a simgle pattern in 𝒮3\mathcal{S}_{3} was also left as an open problem in [1], and recently solved in [2] for the pattern 132132.

It is easier, however, to enumerate nonnesting permutations avoiding a pattern of length 3 with repeated letters. Disregarding the trivial case of the pattern 111111, which is avoided by all nonnesting permutations, reversal and complementation reduces this problem to the enumeration of the sets 𝒞n(112)\mathcal{C}_{n}(112) and 𝒞n(121)\mathcal{C}_{n}(121), which are treated below.

Theorem 2.1.

For all n1n\geq 1, we have cn(112)=Cnc_{n}(112)=C_{n}.

Proof.

For any 1i<jn1\leq i<j\leq n, the subsequence consisting of entries ii and jj in π𝒞n(112)\pi\in\mathcal{C}_{n}(112) must be either jjiijjii or jijijiji, since otherwise they would either create a nesting or an occurrence of 112112. It follows that, in the interpretation of nonnesting permutations as nonnesting matchings with labeled arcs, a permutation avoids 112112 if and only if the arcs are labeled so that their left endpoints (namely, the first occurrence of each value) appear in decreasing order. Thus, there is exactly one possible labeling of each nonnesting matching. It follows that cn(112)c_{n}(112) is simply the number of nonnesting matchings of [2n][2n], which is CnC_{n}. ∎

Theorem 2.2.

For all n1n\geq 1, we have cn(121)=n!c_{n}(121)=n!.

Proof.

For any 1i<jn1\leq i<j\leq n, the subsequence consisting of entries ii and jj in π𝒞n(121)\pi\in\mathcal{C}_{n}(121) must be either jjiijjii or iijjiijj, since otherwise they would either create a nesting or an occurrence of 121121. This forces repeated entries in π\pi to occur next to each other. Thus π\pi is obtained from a permutation in 𝒮n\mathcal{S}_{n} by simply duplicating each entry. This leaves n!n! possibilities. ∎

Note that 𝒞n(112)=𝒞n(122)\mathcal{C}_{n}(112)=\mathcal{C}_{n}(122), and that 𝒞n(121)=𝒞n(212)\mathcal{C}_{n}(121)=\mathcal{C}_{n}(212). The latter set is the intersection of nonnesting permutations and Stirling permutations.

2.2 Avoiding two patterns

We start with the simple case where the two avoided patterns are monotonic.

Theorem 2.3.

For all k,2k,\ell\geq 2 and n(k1)(1)+1n\geq(k-1)(\ell-1)+1, we have cn(12k,21)=0c_{n}(12\dots k,\ell\dots 21)=0.

Proof.

In any element of 𝒞n\mathcal{C}_{n}, the subsequence obtained by deleting one copy of each entry is a permutation in 𝒮n\mathcal{S}_{n}. By Erdős–Szekeres [7], if n(k1)(1)+1n\geq(k-1)(\ell-1)+1, every permutation in 𝒮n\mathcal{S}_{n} must contain either an increasing subsequence of length kk or a decreasing subsequence of length \ell, that is, one of the patterns 12k12\dots k or 21\ell\dots 21. It follows that cn(12k,21)=0c_{n}(12\dots k,\ell\dots 21)=0. ∎

The following result is an immediate consequence of the above theorem. It will save us some work when classifying nonnesting permutations avoiding larger sets of patterns.

Corollary 2.4.

For any Λ𝒮3\Lambda\subseteq\mathcal{S}_{3} such that {123,321}Λ\{123,321\}\subseteq\Lambda, we have cn(Λ)=0c_{n}(\Lambda)=0 for all n5n\geq 5.

Theorem 2.5.

For all n2n\geq 2, we have

cn(123,231)=n2+5n62.c_{n}(123,231)=\frac{n^{2}+5n-6}{2}.
Proof.

Let Λ={123,231}\Lambda=\{123,231\}. We can write π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) uniquely as π=α1β1γ\pi=\alpha 1\beta 1\gamma for some α,β,γ\alpha,\beta,\gamma. Since π\pi avoids 123123 and 231231, the words α\alpha, β\beta and γ\gamma must be weakly decreasing, and we must have αβ\alpha\geq\beta and βγ\beta\geq\gamma. In particular, |Set(α)Set(β)|1\left|\operatorname{Set}(\alpha)\cap\operatorname{Set}(\beta)\right|\leq 1 and |Set(β)Set(γ)|1\left|\operatorname{Set}(\beta)\cap\operatorname{Set}(\gamma)\right|\leq 1. Note also that, since π\pi is nonnesting, β\beta cannot have repeated entries, and Set(α)Set(γ)=\operatorname{Set}(\alpha)\cap\operatorname{Set}(\gamma)=\emptyset. It follows that β\beta must have length at most 22, leaving four cases:

  1. (1)

    π=α11γ\pi=\alpha 11\gamma,

  2. (2)

    π=αi1i1γ\pi=\alpha^{\prime}i1i1\gamma for some i{2,3,,n}i\in\{2,3,\dots,n\},

  3. (3)

    π=α1i1iγ\pi=\alpha 1i1i\gamma^{\prime} for some i{2,3,,n}i\in\{2,3,\dots,n\},

  4. (4)

    π=α(i+1)1(i+1)i1iγ\pi=\alpha^{\prime}(i+1)1(i+1)i1i\gamma^{\prime} for some i{2,3,,n1}i\in\{2,3,\dots,n-1\}.

In case (1), both α\alpha and γ\gamma must consist of decreasing sequences of double entries, and π\pi is uniquely determined by Set(γ)\operatorname{Set}(\gamma), since Set(α)={2,3,,n}Set(γ)\operatorname{Set}(\alpha)=\{2,3,\dots,n\}\setminus\operatorname{Set}(\gamma). Additionally, in order for π\pi to avoid 231231, the elements of Set(γ)\operatorname{Set}(\gamma) must be consecutive. Thus, either γ\gamma is empty, or Set(γ)={i+1,i+2,,j}\operatorname{Set}(\gamma)=\{i+1,i+2,\dots,j\} for some 1i<jn1\leq i<j\leq n. It follows that there are 1+(n2)1+\binom{n}{2} permutations in case (1).

In case (2), ii must be smaller than all the entries in α\alpha^{\prime} and larger than all the entries in γ\gamma. Thus, π\pi is determined by the choice of i{2,3,,n}i\in\{2,3,\dots,n\}, so there are n1n-1 permutations in this case. A similar argument shows that there are n1n-1 permutations in case (3).

In case (4), π\pi is determined by the choice of i{2,3,,n1}i\in\{2,3,\dots,n-1\}, so there are n2n-2 permutations in this case.

Adding the number of permutations in all four cases, we obtain

cn(Λ)=1+(n2)+(n1)+(n1)+(n2)=n2+5n62.c_{n}(\Lambda)=1+\binom{n}{2}+(n-1)+(n-1)+(n-2)=\frac{n^{2}+5n-6}{2}.\qed

We will use FnF_{n} to denote the nnth Fibonacci number, with the convention F0=F1=1F_{0}=F_{1}=1.

Theorem 2.6.

For all n0n\geq 0, we have cn(132,213)=Fn2c_{n}(132,213)=F_{n}^{2}.

Proof.

Let Λ={132,213}\Lambda=\{132,213\}. Writing permutations π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) as π=αnβnγ\pi=\alpha n\beta n\gamma for some words α,β,γ\alpha,\beta,\gamma, we can separate them into four cases:

  1. (1)

    α=β=ε\alpha=\beta=\varepsilon,

  2. (2)

    α=ε\alpha=\varepsilon and βε\beta\neq\varepsilon,

  3. (3)

    αε\alpha\neq\varepsilon and β=ε\beta=\varepsilon,

  4. (4)

    αε\alpha\neq\varepsilon and βε\beta\neq\varepsilon.

Denote the number of permutations in each case by an(1)a^{(1)}_{n}, an(2)a^{(2)}_{n}, an(3)a^{(3)}_{n} and an(4)a^{(4)}_{n}, respectively, so that cn(Λ)=an(1)+an(2)+an(3)+an(4)c_{n}(\Lambda)=a^{(1)}_{n}+a^{(2)}_{n}+a^{(3)}_{n}+a^{(4)}_{n}.

To obtain recurrence relations for these numbers, we consider the possible ways to generate a permutation in 𝒞n+1(Λ)\mathcal{C}_{n+1}(\Lambda) by inserting two entries n+1n+1 in a permutation in 𝒞n(Λ)\mathcal{C}_{n}(\Lambda) from each of the above four cases.

In case (1), there are four ways to insert two entries n+1n+1 in nnγnn\gamma without creating nestings or occurrences of 213213, namely (n+1)(n+1)nnγ(n+1)(n+1)nn\gamma, (n+1)n(n+1)nγ(n+1)n(n+1)n\gamma, nn(n+1)(n+1)γnn(n+1)(n+1)\gamma and n(n+1)n(n+1)γn(n+1)n(n+1)\gamma, yielding a permutation in each of cases (1), (2), (3) and (4), respectively.

In case (2), each permutation nβnγn\beta n\gamma generates two permutations (n+1)(n+1)nβnγ(n+1)(n+1)n\beta n\gamma and (n+1)n(n+1)βnγ(n+1)n(n+1)\beta n\gamma, which belong to cases (1) and (2), respectively.

In case (3), each permutation αnnγ\alpha nn\gamma generates two permutations (n+1)(n+1)αnnγ(n+1)(n+1)\alpha nn\gamma and αnn(n+1)(n+1)γ\alpha nn(n+1)(n+1)\gamma, which belong to cases (1) and (3), respectively.

In case (4), each permutation αnβnγ\alpha n\beta n\gamma generates one permutation (n+1)(n+1)αnβnγ(n+1)(n+1)\alpha n\beta n\gamma, in case (1). Indeed, inserting an n+1n+1 anywhere after the first entry of α\alpha and before the second nn would create a 132132, whereas inserting it anywhere after the second nn would create a 213213.

Keeping track of how many permutations in 𝒞n+1(Λ)\mathcal{C}_{n+1}(\Lambda) of each type are generated in each case, we conclude that

an+1(1)\displaystyle a^{(1)}_{n+1} =an(1)+an(2)+an(3)+an(4)=cn(Λ),\displaystyle=a^{(1)}_{n}+a^{(2)}_{n}+a^{(3)}_{n}+a^{(4)}_{n}=c_{n}(\Lambda),
an+1(2)\displaystyle a^{(2)}_{n+1} =an(1)+an(2),\displaystyle=a^{(1)}_{n}+a^{(2)}_{n},
an+1(3)\displaystyle a^{(3)}_{n+1} =an(1)+an(3),\displaystyle=a^{(1)}_{n}+a^{(3)}_{n},
an+1(4)\displaystyle a^{(4)}_{n+1} =an(1)=cn1(Λ),\displaystyle=a^{(1)}_{n}=c_{n-1}(\Lambda),

from where

cn+1(Λ)\displaystyle c_{n+1}(\Lambda) =an+1(1)+an+1(2)+an+1(3)+an+1(4)\displaystyle=a^{(1)}_{n+1}+a^{(2)}_{n+1}+a^{(3)}_{n+1}+a^{(4)}_{n+1}
=4an(1)+2an(2)+2an(3)+an(4)\displaystyle=4a^{(1)}_{n}+2a^{(2)}_{n}+2a^{(3)}_{n}+a^{(4)}_{n}
=2(an(1)+an(2)+an(3)+an(4))+2an(1)an(4)\displaystyle=2(a^{(1)}_{n}+a^{(2)}_{n}+a^{(3)}_{n}+a^{(4)}_{n})+2a^{(1)}_{n}-a^{(4)}_{n}
=2cn(Λ)+2cn1(Λ)cn2(Λ),\displaystyle=2c_{n}(\Lambda)+2c_{n-1}(\Lambda)-c_{n-2}(\Lambda),

with initial conditions c0(Λ)=c1(Λ)=1c_{0}(\Lambda)=c_{1}(\Lambda)=1. This is the same recurrence satisfied by the squared Fibonacci numbers:

Fn+12\displaystyle F_{n+1}^{2} =(Fn+Fn1)2\displaystyle=(F_{n}+F_{n-1})^{2}
=Fn2+2FnFn1+Fn12\displaystyle=F_{n}^{2}+2F_{n}F_{n-1}+F_{n-1}^{2}
=Fn2+(Fn1+Fn2)Fn1+Fn(FnFn2)+Fn12\displaystyle=F_{n}^{2}+(F_{n-1}+F_{n-2})F_{n-1}+F_{n}(F_{n}-F_{n-2})+F_{n-1}^{2}
=2Fn2+2Fn12+Fn2Fn1FnFn2\displaystyle=2F_{n}^{2}+2F_{n-1}^{2}+F_{n-2}F_{n-1}-F_{n}F_{n-2}
=2Fn2+2Fn12Fn22.\displaystyle=2F_{n}^{2}+2F_{n-1}^{2}-F_{n-2}^{2}.\qed
Theorem 2.7.

For all n2n\geq 2, we have cn(132,231)=2nc_{n}(132,231)=2^{n}.

Proof.

Let Λ={132,231}\Lambda=\{132,231\}. The formula clearly holds for n=2n=2, since c2(Λ)=4c_{2}(\Lambda)=4, so let us assume that n3n\geq 3. To generate an element in 𝒞n(Λ)\mathcal{C}_{n}(\Lambda) from π𝒞n1(Λ)\pi\in\mathcal{C}_{n-1}(\Lambda), the only locations to insert nn without creating an occurrence of 132132 or 231231 are at the very beginning or at the very end. If we also want to avoid nestings, both entries nn have to be inserted in the same location. This gives the recurrence cn(Λ)=2cn1(Λ)c_{n}(\Lambda)=2c_{n-1}(\Lambda), which implies cn(Λ)=2nc_{n}(\Lambda)=2^{n}. ∎

Theorem 2.8.

For all n2n\geq 2, we have cn(132,312)=43n2c_{n}(132,312)=4\cdot 3^{n-2}.

Proof.

Let Λ={132,312}\Lambda=\{132,312\}, and assume that n3n\geq 3. Any permutation in 𝒞n(Λ)\mathcal{C}_{n}(\Lambda) must end with 11 or nn, otherwise the last entry would be part of an occurrence of 132132 or 312312. Since complementation respects avoidance of Λ\Lambda, it gives a bijection between permutations in 𝒞n(Λ)\mathcal{C}_{n}(\Lambda) that end with nn, and those that end with 11. It follows that the number of permutations in each of the two cases is cn(Λ)/2c_{n}(\Lambda)/2.

If π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) ends with nn, we can write π=αnβn\pi=\alpha n\beta n. Avoidance of 132132 forces αβ\alpha\geq\beta, and the nonnesting condition prevents β\beta from having repeated entries. It follows that β=ε\beta=\varepsilon or β=1\beta=1. In the first case, α\alpha can be any element of 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda), so there are cn1(Λ)c_{n-1}(\Lambda) such permutations. In the second case, we can write π=α11α2n1n\pi=\alpha_{1}1\alpha_{2}n1n. Removing the two copies of nn gives a bijection between such permutations and the set of permutations in 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda) that end with a 11, so there are cn1(Λ)/2c_{n-1}(\Lambda)/2 such permutations.

We obtain the recurrence

cn(Λ)/2=cn1(Λ)+cn1(Λ)/2,c_{n}(\Lambda)/2=c_{n-1}(\Lambda)+c_{n-1}(\Lambda)/2,

from where cn(Λ)=3cn1(Λ)c_{n}(\Lambda)=3c_{n-1}(\Lambda). Using the initial condition c2(Λ)=4c_{2}(\Lambda)=4, the result follows. ∎

Theorem 2.9.

For all n2n\geq 2, we have cn(123,213)=43n2c_{n}(123,213)=4\cdot 3^{n-2}.

Proof.

Let Λ={123,213}\Lambda=\{123,213\}, and let n2n\geq 2. Write π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) as π=αnβnγ\pi=\alpha n\beta n\gamma. To avoid both 123123 and 213213, we must have |Set(α)Set(β)|1\left|\operatorname{Set}(\alpha)\cup\operatorname{Set}(\beta)\right|\leq 1. This condition, together with the fact that β\beta cannot have repeated letters to avoid a nesting, leaves four cases:

  1. (1)

    π=nnγ\pi=nn\gamma,

  2. (2)

    π=iinnγ\pi=iinn\gamma for some i[n1]i\in[n-1],

  3. (3)

    π=ininγ\pi=inin\gamma for some i[n1]i\in[n-1],

  4. (4)

    π=ninγ\pi=nin\gamma for some i[n1]i\in[n-1].

Denote the number of permutations in each case by an(1)a^{(1)}_{n}, an(2)a^{(2)}_{n}, an(3)a^{(3)}_{n} and an(4)a^{(4)}_{n}, respectively, so that cn(Λ)=an(1)+an(2)+an(3)+an(4)c_{n}(\Lambda)=a^{(1)}_{n}+a^{(2)}_{n}+a^{(3)}_{n}+a^{(4)}_{n}. To obtain recurrence relations, we look at the possible ways that a permutation in each of these cases could be generated by inserting two entries nn into a permutation in 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda).

In case (1), the word γ\gamma is an arbitrary permutation in 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda), so

an(1)=cn1(Λ).a^{(1)}_{n}=c_{n-1}(\Lambda). (1)

In case (2), after removing the entries nn, the permutation iiγii\gamma is an arbitrary permutation in 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda) starting with a double letter, that is, any permutation from cases (1) and (2). It follows that

an(2)=an1(1)+an1(2).a^{(2)}_{n}=a^{(1)}_{n-1}+a^{(2)}_{n-1}. (2)

The same is true in case (3), so an(3)=an(2)a^{(3)}_{n}=a^{(2)}_{n}.

In case (4), the word iγi\gamma obtained after removing the entries nn is an arbitrary permutation in 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda), so an(4)=cn1(Λ)a^{(4)}_{n}=c_{n-1}(\Lambda).

From equation (1) and the fact that an(1)=an(4)a^{(1)}_{n}=a^{(4)}_{n} and an(2)=an(3)a^{(2)}_{n}=a^{(3)}_{n}, we get

an(1)=cn1(Λ)=an1(1)+an1(2)+an1(3)+an1(4)=2an1(1)+2an1(2)a^{(1)}_{n}=c_{n-1}(\Lambda)=a^{(1)}_{n-1}+a^{(2)}_{n-1}+a^{(3)}_{n-1}+a^{(4)}_{n-1}=2a^{(1)}_{n-1}+2a^{(2)}_{n-1} (3)

for n3n\geq 3. Combining this with equation (2), we see that an(1)=2an(2)a^{(1)}_{n}=2a^{(2)}_{n} for n3n\geq 3. Using this fact in equation (3), we obtain

an(1)=2an1(1)+an1(1)=3an1(1)a^{(1)}_{n}=2a^{(1)}_{n-1}+a^{(1)}_{n-1}=3a^{(1)}_{n-1}

for n4n\geq 4, or equivalently,

cn1(Λ)=3cn2(Λ).c_{n-1}(\Lambda)=3c_{n-2}(\Lambda).

The stated result follows from this recurrence, using the initial condition c2(Λ)=4c_{2}(\Lambda)=4. ∎

Remark 2.10.

A natural bijection between noncrossing and nonnesting permutations of [n][n][n]\sqcup[n] is obtained by applying the bijection between noncrossing and nonnesting matchings described in [3], which preserves the left endpoints of the arcs, and labeling the arcs according to these left endpoints. It can be shown that avoidance of the pair of patterns {321,312}\{321,312\} is preserved by this bijection, and so Theorem 2.9 above is equivalent to [1, Thm. 4.4].

2.3 Avoiding three patterns

For avoidance of sets of three patterns of length 3, the case analysis is often similar to the proofs in the previous subsection.

Theorem 2.11.

The ordinary generating function (OGF) for nonnesting permutations that avoid {123,132,213}\{123,132,213\} is

n0cn(123,132,213)xn=1x12x2x2+2x3.\sum_{n\geq 0}c_{n}(123,132,213)\,x^{n}=\frac{1-x}{1-2x-2x^{2}+2x^{3}}.
Proof.

Let Λ={123,132,213}\Lambda=\{123,132,213\}, and let n2n\geq 2. Write π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) as π=αnβnγ\pi=\alpha n\beta n\gamma. As in the proof of Theorem 2.9, avoidance of 123123 and 213213 implies that Set(α)Set(β)\operatorname{Set}(\alpha)\cup\operatorname{Set}(\beta) is either empty or consists of one element, which must be n1n-1 in order for π\pi to also avoid 132132. We have the same four cases as in the proof of Theorem 2.9, but now we set i=n1i=n-1 in all of them.

In case (1), γ\gamma can be any permutation in 𝒞n1\mathcal{C}_{n-1}, and in each of cases (2) and (3), γ\gamma can be any permutation in 𝒞n2(Λ)\mathcal{C}_{n-2}(\Lambda). Let An(4)A^{(4)}_{n} be the set of permutations in case (4), and let an(4)=|An(4)|a^{(4)}_{n}=|A^{(4)}_{n}|. By the above decomposition,

cn(Λ)=cn1(Λ)+2cn2(Λ)+an(4).c_{n}(\Lambda)=c_{n-1}(\Lambda)+2c_{n-2}(\Lambda)+a^{(4)}_{n}. (4)

Removing the two copies of nn from πAn(4)\pi\in A^{(4)}_{n} produces a bijection between An(4)A^{(4)}_{n} and the set of permutations in 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda) that start with the largest entry, namely those from cases (1) or (4). Since the number of elements in 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda) in case (1) are counted by cn2(Λ)c_{n-2}(\Lambda), it follows that

an(4)=cn2(Λ)+an1(4).a^{(4)}_{n}=c_{n-2}(\Lambda)+a^{(4)}_{n-1}. (5)

Shifting the indices in equation (4) down by one and solving for an1(4)a^{(4)}_{n-1}, we get an1(4)=cn1(Λ)cn2(Λ)2cn3(Λ)a^{(4)}_{n-1}=c_{n-1}(\Lambda)-c_{n-2}(\Lambda)-2c_{n-3}(\Lambda). Substituting in equation (5), we obtain

an(4)=cn1(Λ)2cn3(Λ).a^{(4)}_{n}=c_{n-1}(\Lambda)-2c_{n-3}(\Lambda).

Finally, using this expression in equation (4) yields the recurrence

cn(Λ)=2cn1(Λ)+2cn2(Λ)2cn3(Λ)c_{n}(\Lambda)=2c_{n-1}(\Lambda)+2c_{n-2}(\Lambda)-2c_{n-3}(\Lambda)

for n3n\geq 3, with initial conditions c0(Λ)=c1(Λ)=1c_{0}(\Lambda)=c_{1}(\Lambda)=1 and c2(Λ)=4c_{2}(\Lambda)=4. This recurrence is equivalent to the stated generating function. ∎

The sequence cn(123,132,213)c_{n}(123,132,213) appears in [11] as sequence A052528, although with a very different interpretation. Specifically, as shown by Hoang and Mütze [9], it counts vertex-transitive cover graphs of lattice quotients of essential lattice congruences of the weak order on 𝒮n+1\mathcal{S}_{n+1}.

Theorem 2.12.

For all n2n\geq 2, we have cn(123,213,312)=n+2c_{n}(123,213,312)=n+2.

Proof.

Let Λ={123,213,312}\Lambda=\{123,213,312\}, and let n2n\geq 2. Write π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) as π=αnβnγ\pi=\alpha n\beta n\gamma. To avoid both 123123 and 213213, we must have |Set(α)Set(β)|1\left|\operatorname{Set}(\alpha)\cup\operatorname{Set}(\beta)\right|\leq 1. Additionally, to avoid 312, γ\gamma must be weakly decreasing, and βγ\beta\geq\gamma. Combined with the nonnesting condition, this leaves four possibilities:

π\displaystyle\pi =nn(n1)(n1)11,\displaystyle=nn(n-1)(n-1)\dots 11,
π\displaystyle\pi =n(n1)n(n1)(n2)(n2)(n3)(n3)11,\displaystyle=n(n-1)n(n-1)\,(n-2)(n-2)(n-3)(n-3)\dots 11,
π\displaystyle\pi =(n1)n(n1)n(n2)(n2)(n3)(n3)11, or\displaystyle=(n-1)n(n-1)n\,(n-2)(n-2)(n-3)(n-3)\dots 11,\text{ or}
π\displaystyle\pi =iinn(n1)(n1)(n2)(n2)ii^11\displaystyle=ii\,nn\,(n-1)(n-1)(n-2)(n-2)\dots\widehat{ii}\dots 11

for some i[n1]i\in[n-1], where we use ii^\widehat{ii} to indicate that we are skipping these entries. We conclude that

cn(Λ)=1+1+1+(n1)=n+2.c_{n}(\Lambda)=1+1+1+(n-1)=n+2.\qed
Theorem 2.13.

For all n2n\geq 2, we have cn(132,213,312)=n+2c_{n}(132,213,312)=n+2.

Proof.

Let n2n\geq 2, and write π𝒞n(132,213,312)\pi\in\mathcal{C}_{n}(132,213,312) as π=αnβnγ\pi=\alpha n\beta n\gamma. To avoid 213213, α\alpha and β\beta must be weakly increasing, and αβ\alpha\leq\beta. To avoid 312312, β\beta and γ\gamma must be weakly decreasing, and βγ\beta\geq\gamma. Additionally, for π\pi to avoid 132132, we must have αβ\alpha\geq\beta and α>γ\alpha>\gamma, where the strictness comes from the nonnesting condition. The requirement that β\beta is both weakly increasing and weakly decreasing, along with the nonnesting condition, implies that β\beta has length at most one.

If β=ε\beta=\varepsilon, the above conditions on α\alpha and γ\gamma imply that

π=ii(i+1)(i+1)nn(i1)(i1)(i2)(i2)11\pi=ii(i+1)(i+1)\dots nn\,(i-1)(i-1)(i-2)(i-2)\dots 11

for some i[n]i\in[n], giving nn different permutations.

If β\beta has length one, then the requirements αβ\alpha\leq\beta and αβ\alpha\geq\beta imply that α=ε\alpha=\varepsilon or α=β\alpha=\beta. Additionally, the condition βγ\beta\geq\gamma implies that β=n1\beta=n-1 in this case. Since γ\gamma is weakly decreasing, this leaves the two possibilities

π\displaystyle\pi =n(n1)n(n1)(n2)(n2)(n3)(n3)11,\displaystyle=n(n-1)n(n-1)\,(n-2)(n-2)(n-3)(n-3)\dots 11,
π\displaystyle\pi =(n1)n(n1)n(n2)(n2)(n3)(n3)11,\displaystyle=(n-1)n(n-1)n\,(n-2)(n-2)(n-3)(n-3)\dots 11,

for a total of n+2n+2 permutations. ∎

Theorem 2.14.

For all n3n\geq 3, we have cn(123,231,312)=nc_{n}(123,231,312)=n.

Proof.

Let n2n\geq 2, and write π𝒞n(123,231,312)\pi\in\mathcal{C}_{n}(123,231,312) as π=αnβnγ\pi=\alpha n\beta n\gamma. To avoid 123123, α\alpha and β\beta must be weakly decreasing, and αβ\alpha\geq\beta. To avoid 312312, β\beta and γ\gamma must be weakly decreasing, and βγ\beta\geq\gamma. To avoid 231231, we must have αβ\alpha\leq\beta, βγ\beta\leq\gamma, and α<γ\alpha<\gamma, using also the nonnesting condition.

If β=ε\beta=\varepsilon, the fact that α\alpha and γ\gamma are weakly decreasing, along with the inequality α<γ\alpha<\gamma, implies that

π=(i1)(i1)(i2)(i2)11nn(n1)(n1)ii\pi=(i-1)(i-1)(i-2)(i-2)\dots 11\,nn(n-1)(n-1)\dots ii

for some i[n]i\in[n], giving nn different permutations.

If βε\beta\neq\varepsilon, let ii be an entry in β\beta, and note that the nonnesting condition requires that the other copy of ii appears in α\alpha or γ\gamma. This forces Set(α)Set(β)Set(γ)={i}\operatorname{Set}(\alpha)\cup\operatorname{Set}(\beta)\cup\operatorname{Set}(\gamma)=\{i\}, because if some jij\neq i was in this set, then one of the conditions αβ\alpha\leq\beta, αβ\alpha\geq\beta, βγ\beta\leq\gamma, or βγ\beta\geq\gamma would be violated. This can only happen if n=2n=2, and π\pi must be one of the permutations 12121212 or 21212121 in this case. ∎

Theorem 2.15.

For all n2n\geq 2, we have cn(123,213,231)=4(n1)c_{n}(123,213,231)=4(n-1).

Proof.

Let Λ={123,213,231}\Lambda=\{123,213,231\} and let n3n\geq 3. Write π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) as π=αnβnγ\pi=\alpha n\beta n\gamma. As in the proof of Theorem 2.9, avoidance of 123123 and 213213 implies that Set(α)Set(β)\operatorname{Set}(\alpha)\cup\operatorname{Set}(\beta) is either empty or consists of one element, which must be 11 in order for π\pi to also avoid 231231. This leaves the four cases from the proof of Theorem 2.9, where now we set i=1i=1.

In case (1), γ\gamma can be any element of 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda), so there are cn1(Λ)c_{n-1}(\Lambda) permutations.

In cases (2) and (3), avoidance of 123123 forces γ\gamma to be weakly decreasing, resulting in the two permutations

π=11nn(n1)(n1)22,\displaystyle\pi=11nn(n-1)(n-1)\dots 22,
π=1n1n(n1)(n1)22.\displaystyle\pi=1n1n(n-1)(n-1)\dots 22.

In case (4), we can write π=n1nγ11γ2\pi=n1n\gamma_{1}1\gamma_{2}, where γ1γ2\gamma_{1}\gamma_{2} is weakly decreasing, since π\pi avoids 123123. The nonnesting condition prevents γ1\gamma_{1} from having repeated letters, so γ1=ε\gamma_{1}=\varepsilon or γ1=n1\gamma_{1}=n-1 (the latter assumes that n3n\geq 3), resulting in the two permutations

π=n1n1(n1)(n1)(n2)(n1)22,\displaystyle\pi=n1n1(n-1)(n-1)(n-2)(n-1)\dots 22,
π=n1n(n1)1(n1)(n2)(n2)22.\displaystyle\pi=n1n(n-1)1(n-1)\,(n-2)(n-2)\dots 22.

Combining all the cases, we obtain the recurrence

cn(Λ)=cn1(Λ)+4c_{n}(\Lambda)=c_{n-1}(\Lambda)+4

for n3n\geq 3. Using the initial condition c2(Λ)=4c_{2}(\Lambda)=4, the result follows. ∎

2.4 Avoiding four or five patterns

There are three cases of sets Λ𝒮3\Lambda\subseteq\mathcal{S}_{3} of size 4 and one case of size 5 that are not covered by Corollary 2.4. In all of them, the number of nonnesting permutations of [n][n][n]\sqcup[n] avoiding Λ\Lambda is constant for n3n\geq 3.

Theorem 2.16.

For all n2n\geq 2, we have cn(123,132,213,231)=4c_{n}(123,132,213,231)=4.

Proof.

Let Λ={123,132,213,231}\Lambda=\{123,132,213,231\}. For n3n\geq 3, any π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) must be of the form nnαnn\alpha, since the avoidance condition requires that in any subsequence πiπjπk\pi_{i}\pi_{j}\pi_{k} of distinct letters, πi\pi_{i} must be the largest. Therefore, cn(Λ)=cn1(Λ)c_{n}(\Lambda)=c_{n-1}(\Lambda) for n3n\geq 3. Since c2(Λ)=4c_{2}(\Lambda)=4, the result follows. ∎

Theorem 2.17.

For all n3n\geq 3, we have cn(123,132,231,312)=2c_{n}(123,132,231,312)=2.

Proof.

Let Λ={123,132,231,312}\Lambda=\{123,132,231,312\} and let n3n\geq 3. Avoidance of 132132 and 231231, together with the nonnesting condition, implies that any π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) must be of the form αnn\alpha nn or nnγnn\gamma. Additionally, avoidance of 123123 and 312312 forces α\alpha and γ\gamma to be weakly decreasing. Thus, for n3n\geq 3,

𝒞n(Λ)={(n1)(n1)(n2)(n2)11nn,nn(n1)(n1)11}.\mathcal{C}_{n}(\Lambda)=\{(n-1)(n-1)(n-2)(n-2)\dots 11nn,nn(n-1)(n-1)\dots 11\}.\qed
Theorem 2.18.

For all n3n\geq 3, we have cn(132,213,231,312)=2c_{n}(132,213,231,312)=2.

Proof.

Let Λ={132,213,231,312}\Lambda=\{132,213,231,312\}. Any subsequence of π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) of length 3 with distinct entries must be increasing or decreasing. Hence, for n3n\geq 3, we have 𝒞n(Λ)={1122nn,nn2211}\mathcal{C}_{n}(\Lambda)=\{1122\dots nn,nn\dots 2211\}. ∎

Theorem 2.19.

For all n3n\geq 3, we have cn(123,132,213,231,312)=1c_{n}(123,132,213,231,312)=1.

Proof.

Any subsequence of π𝒞n(123,132,213,231,312)\pi\in\mathcal{C}_{n}(123,132,213,231,312) of length 3 with distinct entries must be weakly decreasing. Hence, for n3n\geq 3, the only possibility is π=nn2211\pi=nn\dots 2211. ∎

3 Some patterns of length 4

In this section we give a few results about nonnesting permutations avoiding sets of patterns of length 4. We do not systematically analyze all sets, but rather we introduce some tools and provide a sample of results for which the enumeration sequences are interesting. We focus on patterns where one letter is repeated, and often appearing in adjacent positions. Tables 2 and 3 list sets Λ\Lambda of patterns with repeated letters (up to reversal and complementation) for which we have found a formula for cn(Λ)c_{n}(\Lambda). Patterns where the repeated letters are adjacent are colored according to the permutation in 𝒮3\mathcal{S}_{3}, up to reverse-complement, obtained when removing one of the repeated letters: red for 123123, orange for 321321, blue for 132132 and 213213, and violet for 231231 and 312312.

Λ\Lambda Formula for cn(Λ)c_{n}(\Lambda) OEIS code Result in the paper
{1223}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1223}}\} Cn2C_{n}^{2} A001246 Theorem 3.3
{1332}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332}\}
{σ,τ}\{\sigma,\tau\}, where
σ{1123,1223,1233}\sigma\in\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1223},{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1233}\},
τ{3321,3221,3211}\tau\in\{{\color[rgb]{1,.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,.5,0}3321},{\color[rgb]{1,.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,.5,0}3221},{\color[rgb]{1,.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,.5,0}3211}\}
0, for n5n\geq 5 N/A Theorem 3.5
{1223,1332}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1223},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332}\} 2n1Cn2^{n-1}C_{n} A003645 Theorem 3.3
{1332,2113}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2113}\}
{1332,2331}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2331}\}
{1332,3112}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3112}\}
{1123,1132}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132}\} Theorem 3.7
{1322,3122}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1322},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3122}\}
{1223,2331}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1223},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2331}\} ((n2)+1)Cn\displaystyle\left(\binom{n}{2}+1\right)C_{n} N/A Theorem 3.3
{1322,2231}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1322},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2231}\} (2nn)2n1\displaystyle\binom{2n}{n}-2^{n-1} A085781 Theorem 3.30
{1231,1321}\{1231,1321\} EGF:  23e2x\dfrac{2}{3-e^{2x}} A122704 Theorem 3.33
Table 2: A summary of our results enumerating nonnesting permutations avoiding some sets of one or two patterns patterns of length 4. EGF stands for exponential generating function.
Λ\Lambda Formula for cn(Λ)c_{n}(\Lambda) OEIS code Result in the paper
{1223,1332,2113}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1223},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2113}\} FnCnF_{n}C_{n} A098614 Theorem 3.3
{1123,1132,2133}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2133}\} Theorem 3.7
{1223,1332,2331}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1223},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2331}\} (2nn1)\displaystyle\binom{2n}{n-1} A001791 Theorem 3.3
{1332,2113,2331}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2113},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2331}\}
{1223,1332,3112}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1223},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3112}\}
{1223,2331,3112}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1223},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2331},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3112}\}
{1123,1132,2331}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2331}\} Theorem 3.7
{1123,1132,3122}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3122}\}
{1332,2213,2231}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2213},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2231}\}
{1123,1322,2331}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1322},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2331}\} Cn+11C_{n+1}-1 A001453 Theorem 3.9
{1132,2213,2231}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2213},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2231}\} Theorem 3.14
{1233,1322,3122}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1233},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1322},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3122}\} Theorem 3.21
{1322,2213,2231}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1322},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2213},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2231}\} Theorem 3.15
{1223,2231,3112}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1223},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2231},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3112}\} Theorem 3.23
{1123,1132,2311}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311}\} n3+9n210n6\dfrac{n^{3}+9n^{2}-10n}{6}, for n2n\geq 2 A060488 Theorem 3.10
{1123,1322,2311}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1322},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311}\} n3+6n27n+66\dfrac{n^{3}+6n^{2}-7n+6}{6} A027378 Theorem 3.11
{1132,2213,2311}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2213},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311}\} Theorem 3.16
{1233,1132,2311}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1233},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311}\} n2+n1n^{2}+n-1, for n3n\geq 3 A028387 Theorem 3.12
{1233,1322,2311}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1233},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1322},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311}\} n2n^{2} A000290 Theorem 3.13
{1322,2133,2311}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1322},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2133},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311}\} Theorem 3.20
{1123,2231,3312}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2231},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3312}\} Theorem 3.29
{1332,2133,2311}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1332},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2133},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311}\} 2n23n+22n^{2}-3n+2 A084849 Theorem 3.18
{1123,2331,3312}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2331},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3312}\} Theorem 3.26
{1132,2133,2311}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2133},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311}\} n2+n2n^{2}+n-2, for n2n\geq 2 A028552 Theorem 3.19
{1123,2311,3122}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3122}\} Theorem 3.25
{1123,1132,3312}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3312}\} 7n217n+142\dfrac{7n^{2}-17n+14}{2}, for n2n\geq 2
A140065
(values differ by 11)
Theorem 3.22
{1123,2311,3112}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3112}\} n3+3n2+8n126\dfrac{n^{3}+3n^{2}+8n-12}{6}, for n2n\geq 2
A341209
(values differ by 11)
Theorem 3.24
{1123,2311,3312}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1123},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2311},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3312}\} n2+7n102\dfrac{n^{2}+7n-10}{2}, for n2n\geq 2 A183905 Theorem 3.27
{1223,2231,3312}\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1223},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}2231},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3312}\} n3+2n3\dfrac{n^{3}+2n}{3} A006527 Theorem 3.28
{1132,3112,3121}\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}1132},{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}3112},3121\} 53n215\cdot 3^{n-2}-1, for n2n\geq 2 A198643 Theorem 3.31
{1231,1321,2113}\{1231,1321,{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}2113}\} OGF:  1+2x18x+4x26x\dfrac{1+2x-\sqrt{1-8x+4x^{2}}}{6x} A007564 Theorem 3.34
{1231,1321,2132,\{1231,1321,2132,
2312,3123,3213}2312,3123,3213\}
n!Fnn!F_{n} A005442 Theorem 3.32
Table 3: A summary of our results enumerating nonnesting permutations avoiding some sets of three or more patterns patterns of length 4.

To prove some of these formulas, it will be convenient to view permutations π𝒞n\pi\in\mathcal{C}_{n} as labeled nonnesting matchings of [2n][2n], where there is an arc between ii and jj with label \ell if πi=πj=\pi_{i}=\pi_{j}=\ell. The nonnesting condition guarantees that the order in which the left endpoints of the arcs appear is the same as the order in which their right endpoints appear, so there is a natural ordering of the arcs from left to right. The permutation in 𝒮n\mathcal{S}_{n} obtained when reading the labels of the arcs from left to right will be called the underlying permutation of π\pi, and denoted by π^\hat{\pi}. Note that π^\hat{\pi} is the subsequence of π\pi obtained by taking the left copy of each letter, or alternatively by taking the right copy of each letter. For example, if π=1521352434𝒞5\pi=1521352434\in\mathcal{C}_{5} (whose matching appears on the left of Figure 1), then its underlying permutation is π^=15234𝒮5\hat{\pi}=15234\in\mathcal{S}_{5}.

3.1 Patterns whose repeated letters are in the middle

In some cases, it is possible to describe pattern-avoiding nonnesting permutations by imposing restrictions on the underlying permutation, whereas the (unlabeled) nonnesting matching is arbitrary. When this happens, the resulting formulas have a factor of CnC_{n} to account for the possible nonnesting matchings.

The next lemma will be useful when avoiding patterns of length 44 with a repeated letter in the middle, as it translates this restriction to an avoidance condition on the underlying permutation.

Lemma 3.1.

Let π𝒞n\pi\in\mathcal{C}_{n}, let π^𝒮n\hat{\pi}\in\mathcal{S}_{n} be its underlying permutation, and let ijk𝒮3ijk\in\mathcal{S}_{3}. Then π\pi avoids ijjkijjk if and only if π^\hat{\pi} avoids ijkijk.

Proof.

If π\pi contains ijjkijjk, then the subsequence of π\pi consisting of the left copy of each letter must contain ijkijk. Conversely, if π^\hat{\pi} contains ijkijk, the nonnesting condition forces the right copy of (the letter playing the role of111When jj is an entry in a pattern, we will often refer to “copies of jj” in a permutation to mean copies of the letter playing the role of jj in an occurrence of the pattern.) jj to appear before the right copy of kk. It follows that π\pi contains ijjkijjk. ∎

For a set Σ𝒮3\Sigma\subseteq\mathcal{S}_{3}, we denote by 𝒮n(Σ)\mathcal{S}_{n}(\Sigma) the set of permutations in 𝒮n\mathcal{S}_{n} that avoid all the patterns in Σ\Sigma, and let sn(Σ)=|𝒮n(Σ)|s_{n}(\Sigma)=|\mathcal{S}_{n}(\Sigma)|. The next lemma reduces the enumeration of nonnesting permutations avoiding patterns of length 44 with a repeated letter in the middle to the enumeration of permutations in 𝒮n\mathcal{S}_{n} avoiding patterns of length 33, which was done by Simion and Schmidt [10, 12].

Lemma 3.2.

Let Σ𝒮3\Sigma\subseteq\mathcal{S}_{3}, and let Λ={σ1σ2σ2σ3:σΣ}\Lambda=\{\sigma_{1}\sigma_{2}\sigma_{2}\sigma_{3}:\sigma\in\Sigma\}. Then, for any n1n\geq 1, cn(Λ)=sn(Σ)Cnc_{n}(\Lambda)=s_{n}(\Sigma)\,C_{n}.

Proof.

Let σ𝒮3\sigma\in\mathcal{S}_{3}. By Lemma 3.1, π𝒞n\pi\in\mathcal{C}_{n} avoids σ1σ2σ2σ3\sigma_{1}\sigma_{2}\sigma_{2}\sigma_{3} if and only if the underlying permutation π^𝒮n\hat{\pi}\in\mathcal{S}_{n} avoids σ\sigma. Thus, π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) is determined by first choosing a nonnesting matching on [2n][2n], of which there are CnC_{n}, and then an underlying permutation π^𝒮n(Σ)\hat{\pi}\in\mathcal{S}_{n}(\Sigma), of which there are sn(Σ)s_{n}(\Sigma). ∎

Theorem 3.3.

For all n1n\geq 1, we have

  1. (a)

    cn(ijjk)=Cn2c_{n}(ijjk)=C_{n}^{2} for every ijk𝒮3ijk\in\mathcal{S}_{3},

  2. (b)

    cn(1223,1332)=cn(1332,2113)=cn(1332,2331)=cn(1332,3112)=2n1Cnc_{n}(1223,1332)=c_{n}(1332,2113)=c_{n}(1332,2331)=c_{n}(1332,3112)=2^{n-1}C_{n},

  3. (c)

    cn(1223,2331)=((n2)+1)Cnc_{n}(1223,2331)=\left(\binom{n}{2}+1\right)C_{n},

  4. (d)

    cn(1223,1332,2113)=FnCnc_{n}(1223,1332,2113)=F_{n}C_{n},

  5. (e)

    cn(1223,1332,2331)=cn(1332,2113,2331)=cn(1223,1332,3112)=cn(1223,2331,3112)=nCn=(2nn1)c_{n}(1223,1332,2331)=c_{n}(1332,2113,2331)=c_{n}(1223,1332,3112)=c_{n}(1223,2331,3112)=nC_{n}=\binom{2n}{n-1}.

Proof.

These results follow from Lemma 3.2, along with the following formulas:

  1. (a)

    sn(ijk)=Cns_{n}(ijk)=C_{n}, as shown in [10];

  2. (b)

    sn(123,132)=sn(132,213)=sn(132,231)=sn(132,312)=2n1s_{n}(123,132)=s_{n}(132,213)=s_{n}(132,231)=s_{n}(132,312)=2^{n-1}, as shown in [12, Prop. 7–10];

  3. (c)

    sn(123,231)=(n2)+1s_{n}(123,231)=\binom{n}{2}+1, as shown in [12, Prop. 11];

  4. (d)

    sn(123,132,213)=Fns_{n}(123,132,213)=F_{n}, by [12, Prop. 15];

  5. (e)

    sn(123,132,231)=sn(132,213,231)=sn(123,132,312)=sn(123,231,312)=ns_{n}(123,132,231)=s_{n}(132,213,231)=s_{n}(123,132,312)=s_{n}(123,231,312)=n, by [12, Prop. 16 and 16]. ∎

Lemma 3.1 would not hold if we replaced ijjkijjk with iijkiijk. For example, π=113232\pi=113232 contains 11231123 but its underlying permutation π^=132\hat{\pi}=132 avoids 123123. To enumerate permutations avoiding patterns where the repeated letter is not in the middle, the next lemma will be useful.

Lemma 3.4.

Let π𝒞n\pi\in\mathcal{C}_{n}, and let ijk𝒮3ijk\in\mathcal{S}_{3}. If π\pi avoids either iijkiijk or ijkkijkk, then π\pi avoids ijjkijjk.

Proof.

We prove the contrapositive statement. Suppose that π\pi contains ijjkijjk. Since π\pi is nonnesting, the other copy of ii must occur before the right copy of jj. This creates an occurrence of iijkiijk. A symmetric argument shows that π\pi also contains ijkkijkk. ∎

Theorem 3.5.

Let σ{1123,1223,1233}\sigma\in\{1123,1223,1233\} and τ{3321,3221,3211}\tau\in\{3321,3221,3211\}. Then, for all n5n\geq 5, we have cn(σ,τ)=0c_{n}(\sigma,\tau)=0.

Proof.

By Lemma 3.4, any π𝒞n(σ,τ)\pi\in\mathcal{C}_{n}(\sigma,\tau) must avoid 12231223 and 32213221. But then, by Lemma 3.1, its underlying permutation π^𝒮n\hat{\pi}\in\mathcal{S}_{n} must avoid 123123 and 321321. We know by Erdős–Szekeres [7] that sn(123,321)=0s_{n}(123,321)=0 for all n5n\geq 5. Therefore, cn(σ,τ)=0c_{n}(\sigma,\tau)=0 for all n5n\geq 5. ∎

The following lemma is a partial converse of Lemma 3.4.

Lemma 3.6.

Let ijk𝒮3ijk\in\mathcal{S}_{3}, let Λ={iikj,ikkj,ikjj,ijkj,ikjk}\Lambda=\{iikj,ikkj,ikjj,ijkj,ikjk\}, and let π𝒞n(ijjk)\pi\in\mathcal{C}_{n}(ijjk). If π\pi avoids some σΛ\sigma\in\Lambda, then π\pi avoids iijkiijk.

Proof.

Again, we prove the contrapositive statement. Let π𝒞n(ijjk)\pi\in\mathcal{C}_{n}(ijjk), and suppose that π\pi contains iijkiijk. The other copy of jj must be to the right of this kk, in order to avoid ijjkijjk, so π\pi contains iijkjiijkj. Now, the other copy of kk must be to the left of the first copy of jj. Therefore, π\pi must contain either ikijkjikijkj or iikjkjiikjkj. In both cases, π\pi contains all the patterns in Λ\Lambda. ∎

Lemmas 3.4 and 3.6 provide bijections between many sets of pattern-avoiding nonnesting permutations, allowing us to derive from Theorem 3.3 some formulas for patterns where the repeated letter is not in the middle. The next theorem gives a sample of some such results, which is by no means exhaustive.

Theorem 3.7.

For all n1n\geq 1, we have

  1. (a)

    cn(1123,1132)=cn(1322,3122)=2n1Cnc_{n}(1123,1132)=c_{n}(1322,3122)=2^{n-1}C_{n},

  2. (b)

    cn(1123,1132,2133)=FnCnc_{n}(1123,1132,2133)=F_{n}C_{n},

  3. (c)

    cn(1123,1132,2331)=cn(1123,1132,3122)=cn(1332,2213,2231)=(2nn1).c_{n}(1123,1132,2331)=c_{n}(1123,1132,3122)=c_{n}(1332,2213,2231)=\binom{2n}{n-1}.

Proof.

We claim that 𝒞n(1123,1132)=𝒞n(1223,1332)\mathcal{C}_{n}(1123,1132)=\mathcal{C}_{n}(1223,1332). The inclusion to the right is given by Lemma 3.4. For the reverse inclusion, suppose that π𝒞n(1223,1332)\pi\in\mathcal{C}_{n}(1223,1332). Lemma 3.6 with ijk=123ijk=123 implies that π\pi avoids 11231123, and the same lemma with ijk=132ijk=132 implies that π\pi avoids 11321132. A similar argument shows that 𝒞n(1322,3122)=𝒞n(1332,3112)\mathcal{C}_{n}(1322,3122)=\mathcal{C}_{n}(1332,3112). Part (a) now follows from Theorem 3.3(b).

For part (b), one can similarly show that 𝒞n(1123,1132,2133)=𝒞n(1223,1332,2113)\mathcal{C}_{n}(1123,1132,2133)=\mathcal{C}_{n}(1223,1332,2113) using Lemmas 3.4 and 3.6, and then apply Theorem 3.3(d).

For part (c), Lemmas 3.4 and 3.6 imply that 𝒞n(1123,1132,2331)=𝒞n(1223,1332,2331)\mathcal{C}_{n}(1123,1132,2331)=\mathcal{C}_{n}(1223,1332,2331), 𝒞n(1123,1132,3122)=𝒞n(1223,1332,3112)\mathcal{C}_{n}(1123,1132,3122)=\mathcal{C}_{n}(1223,1332,3112), and 𝒞n(1332,2213,2231)=𝒞n(1332,2113,2331)\mathcal{C}_{n}(1332,2213,2231)=\mathcal{C}_{n}(1332,2113,2331). The enumeration of these sets is given in Theorem 3.3(e). ∎

3.2 Other patterns whose repeated letters are adjacent

The restrictions that we consider in this subsection no longer translate into restrictions for the underlying permutations. These enumerative results often have more complicated proofs that require separating the permutations into different cases. We will often decompose permutations as follows.

Lemma 3.8.

Any π𝒞n\pi\in\mathcal{C}_{n} can be written as π=α1β1γ\pi=\alpha 1\beta 1\gamma, where β\beta has no repeated entries, and Set(α)Set(γ)=\operatorname{Set}(\alpha)\cap\operatorname{Set}(\gamma)=\emptyset. Thus, we have a disjoint union {2,3,,n}=AB1B2C\{2,3,\dots,n\}=A\sqcup B_{1}\sqcup B_{2}\sqcup C, where

A=Set(α)Set(β),B1=Set(α)Set(β),B2=Set(γ)Set(β),C=Set(γ)Set(β).A=\operatorname{Set}(\alpha)\setminus\operatorname{Set}(\beta),\ B_{1}=\operatorname{Set}(\alpha)\cap\operatorname{Set}(\beta),\ B_{2}=\operatorname{Set}(\gamma)\cap\operatorname{Set}(\beta),\ C=\operatorname{Set}(\gamma)\setminus\operatorname{Set}(\beta). (6)

Additionally, elements of B1B_{1} (resp. B2B_{2}) must appear in the same order in β\beta as in α\alpha (resp. γ\gamma). If α\alpha is weakly monotone, then it consists of the elements of AA (each of which is duplicated) followed by the elements of B1B_{1}. Similarly, if γ\gamma is weakly monotone, it consists of the elements of B2B_{2} followed by the elements of CC (each of which is duplicated).

Proof.

The positions of the 11s and the nonnesting condition guarantee that β\beta has no repeated entries, and that no entry appears in both α\alpha and γ\gamma. Entries in β\beta that have their other copy in α\alpha (resp. γ\gamma) must appear in the same order in both subwords because of the nonnesting condition. In the special case that α\alpha is weakly monotone, the nonnesting condition prevents duplicated entries (those in AA) to appear after entries in B1B_{1}, and similarly when γ\gamma is weakly monotone. ∎

We will use the notation from Lemma 3.8 throughout this section. Additionally, we let β1\beta_{1} and β2\beta_{2} be the subsequences of β\beta consisting of the elements of B1B_{1} and B2B_{2}, respectively.

The next five theorems deal with subsets of 𝒞n(1223,1332,2331)\mathcal{C}_{n}(1223,1332,2331), the first set in Theorem 3.3(e). Figure 2 shows the containment relationships between these sets as a Hasse diagram.

𝒞n(1223,1332,2331)\mathcal{C}_{n}(1223,1332,2331) 3.3(e)𝒞n(1123,1322,2331)\mathcal{C}_{n}(1123,1322,2331) 3.9𝒞n(1123,1132,2311)\mathcal{C}_{n}(1123,1132,2311) 3.10𝒞n(1123,1322,2311)\mathcal{C}_{n}(1123,1322,2311) 3.11𝒞n(1233,1132,2311)\mathcal{C}_{n}(1233,1132,2311) 3.12𝒞n(1233,1322,2311)\mathcal{C}_{n}(1233,1322,2311) 3.13
Figure 2: The subsets of 𝒞n(1223,1332,2331)\mathcal{C}_{n}(1223,1332,2331) enumerated in this section, along with the theorem number.
Theorem 3.9.

For all n1n\geq 1, we have cn(1123,1322,2331)=Cn+11c_{n}(1123,1322,2331)=C_{n+1}-1.

Proof.

We decompose π𝒞n(1123,1322,2331)\pi\in\mathcal{C}_{n}(1123,1322,2331) as in Lemma 3.8. Since π\pi avoids 13221322, it must also avoid 13321332 by Lemma 3.4. Now, Lemma 3.6, together with avoidance of 11231123, implies that π\pi avoids 11321132 as well. Avoidance of both 11231123 and 11321132 implies that |Set(γ)|1\left|\operatorname{Set}(\gamma)\right|\leq 1. And since π\pi avoids 23312331, αβ1\alpha\beta_{1} must avoid 122122 which, as in the proof of Theorem 2.1, is equivalent to its underlying permutation being decreasing. Since β1\beta_{1} has no repeated letters, α1β11\alpha 1\beta_{1}1 avoids 122122 as well.

If γ=ε\gamma=\varepsilon, then π=α1β11\pi=\alpha 1\beta_{1}1 is an arbitrary permutation in 𝒞n(122)\mathcal{C}_{n}(122). Indeed, avoidance of 122122 implies avoidance of 13221322 and 23312331, and it is equivalent to avoidance of 112112, which implies avoidance of 11231123. By Theorem 2.1, there are CnC_{n} permutations in this case.

Now suppose that Set(γ)={k}\operatorname{Set}(\gamma)=\{k\} for some 2kn2\leq k\leq n. Avoidance of 13221322 requires that, in α\alpha, any entries larger than kk must be to the left of any entries smaller than kk. Thus, we can write α=α1α2\alpha=\alpha_{1}\alpha_{2}, where α1\alpha_{1} and α2\alpha_{2} consist of entries larger and smaller than kk, respectively.

Consider first the case when all the elements in B1B_{1} are smaller than kk. Then all the entries greater than kk are in α1\alpha_{1}, and st(α1)\operatorname{st}(\alpha_{1}) is an arbitrary permutation in 𝒞nk(122)\mathcal{C}_{n-k}(122). Similarly, st(α21β11)\operatorname{st}(\alpha_{2}1\beta_{1}1) is an arbitrary permutation in 𝒞k1(122)\mathcal{C}_{k-1}(122). It follows that α21β1γ\alpha_{2}1\beta 1\gamma is an arbitrary permutation in 𝒞k\mathcal{C}_{k} whose underlying permutation is (k1)(k2)1k(k-1)(k-2)\dots 1k. Indeed, this condition on α21β1γ\alpha_{2}1\beta 1\gamma and the fact that st(α1)𝒞nk(122)\operatorname{st}(\alpha_{1})\in\mathcal{C}_{n-k}(122) guarantee that π=α1α21β1γ\pi=\alpha_{1}\alpha_{2}1\beta 1\gamma does not contain any of the patterns 1123,1322,23311123,1322,2331. Since there are CkC_{k} permutations in 𝒞k\mathcal{C}_{k} with a fixed underlying permutation (one for each nonnesting matching), the number of permutations π\pi in this case is

k=2nCnkCk=Cn+1CnCn1.\sum_{k=2}^{n}C_{n-k}C_{k}=C_{n+1}-C_{n}-C_{n-1}.

Finally, consider the case when some element bB1b\in B_{1} is greater than kk. Since the underlying permutation of αβ1\alpha\beta_{1} is decreasing and β1\beta_{1} has no repeated letters, β1\beta_{1} is decreasing, so we can assume that bb is the first entry in β1\beta_{1}. Since π\pi avoids 13221322, the first copy of kk must appear before bb, so β=kβ1\beta=k\beta_{1}.

Let us show that α2=(k1)(k2)2\alpha_{2}=(k-1)(k-2)\dots 2. First, α2\alpha_{2} cannot have repeated letters; otherwise, together with kk and bb, they would form an occurrence of 11231123. Second, α2\alpha_{2} contains the first occurrence of each letter in {2,k1}\{2,\dots k-1\}, and they must appear in decreasing order because otherwise π\pi would contain 23312331.

We claim that, in fact,

π=α1(k1)(k2)21kb(b1)(k+1)(k1)(k2)21k,\pi=\alpha_{1}\,(k-1)(k-2)\dots 21\,k\,b(b-1)\dots(k+1)\,(k-1)(k-2)\dots 21\,k,

where st(α11b(b1)(k+1) 1)\operatorname{st}(\alpha_{1}1\,b(b-1)\dots(k+1)\,1) is an arbitrary permutation in 𝒞nk+1(122)\mathcal{C}_{n-k+1}(122) not ending with 1111. Clearly, this permutation avoids 122122 (because π\pi avoids 23312331) and does not end with 1111 (because b>kb>k). To see that it is arbitrary, note that avoidance of 122122 in this permutation guarantees that π\pi avoids the three patterns 1123,1322,23311123,1322,2331. Permutations in 𝒞nk+1(122)\mathcal{C}_{n-k+1}(122) that do end with 1111, by removing 1111 and standardizing, are in bijection with permutations in 𝒞nk(122)\mathcal{C}_{n-k}(122). We deduce that the number of permutations π\pi in this case is

k=2n(Cnk+1Cnk)=Cn11.\sum_{k=2}^{n}(C_{n-k+1}-C_{n-k})=C_{n-1}-1.

Summing up all the cases, we have

cn(1123,1322,2331)=Cn+(Cn+1CnCn1)+(Cn11)=Cn+11.c_{n}(1123,1322,2331)=C_{n}+(C_{n+1}-C_{n}-C_{n-1})+(C_{n-1}-1)=C_{n+1}-1.\qed
Theorem 3.10.

For all n2n\geq 2, we have

cn(1123,1132,2311)=n3+9n210n6.c_{n}(1123,1132,2311)=\frac{n^{3}+9n^{2}-10n}{6}.
Proof.

We decompose π𝒞n(1123,1132,2311)\pi\in\mathcal{C}_{n}(1123,1132,2311), for n2n\geq 2, as in Lemma 3.8. In order for π\pi to avoid 23112311, α\alpha must be weakly decreasing, and so the elements of B1B_{1} must be decreasing in β\beta. To avoid both 11231123 and 11321132, we must have |Set(γ)|1\left|\operatorname{Set}(\gamma)\right|\leq 1, leaving the following three possibilities for γ\gamma.

If γ=ε\gamma=\varepsilon, it follows that

π=nn(n1)(n1)(i+1)(i+1)i(i1)1i(i1)1\pi=nn(n-1)(n-1)\dots(i+1)(i+1)\,i(i-1)\dots 1\,i(i-1)\dots 1

for some i[n]i\in[n], giving nn permutations.

Suppose now that γ=jj\gamma=jj for some j{2,,n}j\in\{2,\dots,n\}. If all the elements of B1B_{1} are smaller than jj, we have

π=nn(n1)(n1)jj^(i+1)(i+1)i(i1)1i(i1)1jj\pi=nn(n-1)(n-1)\dots\widehat{jj}\dots(i+1)(i+1)\,i(i-1)\dots 1\,i(i-1)\dots 1\,jj (7)

for some 1i<jn1\leq i<j\leq n, giving (n2)\binom{n}{2} permutations. Otherwise, in order to avoid 23112311, only one element of B1B_{1} can be bigger than jj, so

π=nn(n1)(n1)(j+2)(j+2)(j+1)(j1)1(j+1)(j1)1jj\pi=nn(n-1)(n-1)\dots(j+2)(j+2)\,(j+1)(j-1)\dots 1\,(j+1)(j-1)\dots 1\,jj (8)

with 2jn12\leq j\leq n-1, giving n2n-2 permutations in this case. Adding these cases, the number of permutations where γ=jj\gamma=jj for some jj equals

(n2)+n2.\binom{n}{2}+n-2.

Finally, suppose that γ=j\gamma=j for some j{2,,n}j\in\{2,\dots,n\}, which forces the other copy of jj to appear in β\beta. Recall that the other entries in β\beta (that is, the elements of B1B_{1}) are decreasing. If all these elements are smaller than jj, then the are no restrictions on the position of jj inside β\beta, and π\pi is obtained from equation (7) by moving the first copy of jj and inserting it in β\beta, in one of the ii available positions. Thus, the number of permutations in this case is

1i<jni=(n+13).\sum_{1\leq i<j\leq n}i=\binom{n+1}{3}.

If some elements of B1B_{1} are larger than jj, consider two subcases. If jj is the first entry in β\beta, then

π=nn(n1)(n1)(i+1)(i+1)i(i1)j^1ji(i1)j^1j,\pi=nn(n-1)(n-1)\dots(i+1)(i+1)\,i(i-1)\dots\widehat{j}\dots 1\,j\,i(i-1)\dots\widehat{j}\dots 1\,j, (9)

for some 2j<in2\leq j<i\leq n, giving (n12)\binom{n-1}{2} permutations. Otherwise, in order to avoid 23112311, there can be only one element of B1B_{1} that is larger than jj. In this case, π\pi is obtained from equation (8) by moving the first copy of jj and inserting it in β\beta, in any of the j1j-1 positions other than the first one, giving

j=2n1(j1)=(n12)\sum_{j=2}^{n-1}(j-1)=\binom{n-1}{2} (10)

permutations.

By adding all the cases, we have

cn(1123,1132,2311)=n+(n2)+n2+(n+13)+(n12)+(n12)=n3+9n210n6.c_{n}(1123,1132,2311)=n+\binom{n}{2}+n-2+\binom{n+1}{3}+\binom{n-1}{2}+\binom{n-1}{2}=\frac{n^{3}+9n^{2}-10n}{6}.\qed
Theorem 3.11.

For all n1n\geq 1, we have

cn(1123,1322,2311)=n3+6n27n+66.c_{n}(1123,1322,2311)=\dfrac{n^{3}+6n^{2}-7n+6}{6}.
Proof.

Let us first show that

𝒞n(1123,1322,2311)=𝒞n(1123,1322,2331)𝒞n(1123,1132,2311),\mathcal{C}_{n}(1123,1322,2311)=\mathcal{C}_{n}(1123,1322,2331)\cap\mathcal{C}_{n}(1123,1132,2311), (11)

that is, the intersection of the sets from Theorems 3.9 and 3.10.

Let π𝒞n(1123,1322,2311)\pi\in\mathcal{C}_{n}(1123,1322,2311). Since π\pi avoids 23112311, it also avoids 23312331 by Lemma 3.4. On the other hand, as in the proof of Theorem 3.9, avoidance of 11231123 and 13221322 implies avoidance of 11321132. This proves the inclusion to the right in equation (11). Conversely, a permutation in the intersection of the two sets on the right-hand side must avoid the three patterns 1123,1322,23111123,1322,2311.

We will adapt the proof of Theorem 3.10 by removing the two cases where the permutation π\pi contains 13221322. One is when π\pi is given by equation (8), accounting for n2n-2 permutations. The other the case counted in equation (10), namely, when γ=j\gamma=j, there is an element in B1B_{1} larger than jj, and jj is not the first entry in β\beta.

Adding the remaining cases, we get

cn(1123,1132,2311)=n+(n2)+(n+13)+(n12)=n3+6n27n+66.c_{n}(1123,1132,2311)=n+\binom{n}{2}+\binom{n+1}{3}+\binom{n-1}{2}=\dfrac{n^{3}+6n^{2}-7n+6}{6}.\qed
Theorem 3.12.

For all n3n\geq 3, we have cn(1233,1132,2311)=n2+n1c_{n}(1233,1132,2311)=n^{2}+n-1.

Proof.

Let π𝒞n(1233,1132,2311)\pi\in\mathcal{C}_{n}(1233,1132,2311). Since π\pi avoids 12331233, it must also avoid 12231223 by Lemma 3.4. Now, Lemma 3.6, together with avoidance of 11321132, implies that π\pi also avoids 11231123. It follows that 𝒞n(1233,1132,2311)𝒞n(1123,1132,2311)\mathcal{C}_{n}(1233,1132,2311)\subseteq\mathcal{C}_{n}(1123,1132,2311), the set considered in Theorem 3.10.

Let us show how to modify the proof of this theorem to eliminate the cases where π\pi contains 12331233. The case γ=ε\gamma=\varepsilon does not change and contributes nn permutations. In the case γ=jj\gamma=jj, the permutation in equation (7) avoids 12331233 only if i=1i=1, giving n1n-1 permutations. The permutation in equation (8) avoids 12331233 only if j=2j=2, giving 11 permutation, if we use the assumption n3n\geq 3.

In the case γ=j\gamma=j, if the elements of B1B_{1} are smaller than jj, then the other copy of jj has to be the first entry in β\beta in order to avoid 12331233, giving (n2)\binom{n}{2} permutations of the form

π=nn(n1)(n1)jj^(i+1)(i+1)i(i1)1ji(i1)1j\pi=nn(n-1)(n-1)\dots\widehat{jj}\dots(i+1)(i+1)\,i(i-1)\dots 1\,j\,i(i-1)\dots 1\,j (12)

for 1i<jn1\leq i<j\leq n. If some element of B1B_{1} is larger than jj, we get the (n12)\binom{n-1}{2} permutations from equation (9) where jj is the first entry in β\beta. If jj is not the first entry, then

π=nn(n1)(n1)(j+2)(j+2)(j+1)(j1)1(j+1)j(j1)1j\pi=nn(n-1)(n-1)\dots(j+2)(j+2)\,(j+1)(j-1)\dots 1\,(j+1)j(j-1)\dots 1\,j

for some 2jn12\leq j\leq n-1, giving n2n-2 permutations.

Adding up all the cases, we get

cn(1233,1132,2311)=n+(n1)+1+(n2)+(n12)+(n2)=n2+n1.c_{n}(1233,1132,2311)=n+(n-1)+1+\binom{n}{2}+\binom{n-1}{2}+(n-2)=n^{2}+n-1.\qed
Theorem 3.13.

For all n1n\geq 1, we have cn(1233,1322,2311)=n2c_{n}(1233,1322,2311)=n^{2}.

Proof.

Let us first show that

𝒞n(1233,1322,2311)=𝒞n(1123,1322,2311)𝒞n(1233,1132,2311),\mathcal{C}_{n}(1233,1322,2311)=\mathcal{C}_{n}(1123,1322,2311)\cap\mathcal{C}_{n}(1233,1132,2311), (13)

that is, the intersection of the sets from Theorems 3.11 and 3.12.

Let π𝒞n(1233,1322,2311)\pi\in\mathcal{C}_{n}(1233,1322,2311). Since π\pi avoids 12331233, it must also avoid 12231223 by Lemma 3.4. But avoidance of 12231223 and 13221322 implies avoidance of 11231123 by Lemma 3.6. This shows that 𝒞n(1233,1322,2311)𝒞n(1123,1322,2311)\mathcal{C}_{n}(1233,1322,2311)\subseteq\mathcal{C}_{n}(1123,1322,2311). Similarly, since π\pi avoids 13221322, it must also avoid 13321332 by Lemma 3.4. But avoidance of 13321332 and 12331233 implies avoidance of 11321132 by Lemma 3.6. This shows that 𝒞n(1233,1322,2311)𝒞n(1233,1132,2311)\mathcal{C}_{n}(1233,1322,2311)\subseteq\mathcal{C}_{n}(1233,1132,2311). Conversely, if a permutation is in the intersection on the right-hand side of equation (13), then it clearly avoids the patterns 1233,1322,23111233,1322,2311.

To find cn(1233,1322,2311)c_{n}(1233,1322,2311), we follow the proofs of Theorems 3.11 and 3.12, and take the permutations that appear in both. When γ=ε\gamma=\varepsilon, we get the same nn permutations. When γ=jj\gamma=jj, we get the n1n-1 permutation from equation (7) with i=1i=1. When γ=j\gamma=j, we get the (n2)\binom{n}{2} permutations from equation (12) and the (n12)\binom{n-1}{2} permutations from equation (9).

Adding up all the cases, we get

cn(1233,1322,2311)=n+(n1)+(n2)+(n12)=n2.c_{n}(1233,1322,2311)=n+(n-1)+\binom{n}{2}+\binom{n-1}{2}=n^{2}.\qed

In the next six theorems, we consider subsets of 𝒞n(1332,2113,2331)\mathcal{C}_{n}(1332,2113,2331), the second set in Theorem 3.3(e). Figure 3 shows the containment relationships between these sets.

𝒞n(1332,2113,2331)\mathcal{C}_{n}(1332,2113,2331) 3.3(e)𝒞n(1132,2213,2231)\mathcal{C}_{n}(1132,2213,2231) 3.14𝒞n(1132,2213,2311)\mathcal{C}_{n}(1132,2213,2311) 3.16𝒞n(1132,2133,2311)\mathcal{C}_{n}(1132,2133,2311) 3.19𝒞n(1332,2133,2311)\mathcal{C}_{n}(1332,2133,2311) 3.18𝒞n(1322,2213,2231)\mathcal{C}_{n}(1322,2213,2231) 3.15𝒞n(1322,2133,2311)\mathcal{C}_{n}(1322,2133,2311) 3.20
Figure 3: The subsets of 𝒞n(1332,2113,2331)\mathcal{C}_{n}(1332,2113,2331) enumerated in this section.

In the next proof, we let 𝒟n\mathcal{D}_{n} be the set of Dyck words of length 2n2n, that is, words consisting of nn 𝚞\mathtt{u}s and nn 𝚍\mathtt{d}s with the property that no prefix contains more 𝚍\mathtt{d}s than 𝚞\mathtt{u}s. It is well known [14] that |𝒟n|=Cn\left|\mathcal{D}_{n}\right|=C_{n}.

Theorem 3.14.

For all n1n\geq 1, we have cn(1132,2213,2231)=Cn+11.c_{n}(1132,2213,2231)=C_{n+1}-1.

Proof.

We decompose π𝒞n(1132,2213,2231)\pi\in\mathcal{C}_{n}(1132,2213,2231) as in Lemma 3.8. Avoidance of 22132213 implies avoidance of 21132113 by Lemma 3.4, which requires α>γ\alpha>\gamma. Avoidance of 11321132 forces γ\gamma to be weakly increasing, so we can write β2=23i\beta_{2}=23\dots i and γ=23i(i+1)(i+1)(i+2)(i+2)jj\gamma=23\dots i\,(i+1)(i+1)(i+2)(i+2)\dots jj for some 1ijn1\leq i\leq j\leq n. Avoidance of 22312231 forces αβ1\alpha\beta_{1} to avoid 112112, which implies that its underlying permutation is decreasing, so in particular β1\beta_{1} is decreasing, since it consists of second copies of entries. It follows that st(α1β11)𝒞nj+1(112)\operatorname{st}(\alpha 1\beta_{1}1)\in\mathcal{C}_{n-j+1}(112).

In fact, the above are the only restrictions on α\alpha, β1\beta_{1}, β2\beta_{2}, and γ\gamma, in the sense that any choice of 1ijn1\leq i\leq j\leq n, any choice of st(α1β11)𝒞nj+1(112)\operatorname{st}(\alpha 1\beta_{1}1)\in\mathcal{C}_{n-j+1}(112), and any way to interleave the entries of β2=23i\beta_{2}=23\dots i with the entries of β1\beta_{1} determines a (unique) permutation π𝒞n(1132,2213,2231)\pi\in\mathcal{C}_{n}(1132,2213,2231). To count these choices, we will describe a bijection between such permutations and certain Dyck words. Given π𝒞n(1132,2213,2231)\pi\in\mathcal{C}_{n}(1132,2213,2231) decomposed as above, construct a Dyck word as follows.

  1. 1.

    Start with the Dyck word w0𝒟nj+1w_{0}\in\mathcal{D}_{n-j+1} obtained from the permutation st(α1β11)\operatorname{st}(\alpha 1\beta_{1}1) by simply replacing the first copy of each entry with a 𝚞\mathtt{u} and the second copy with a 𝚍\mathtt{d}. Viewing st(α1β11)\operatorname{st}(\alpha 1\beta_{1}1) as a nonnesting matching, this is the standard bijection between nonnesting matchings and Dyck words.

  2. 2.

    Insert a 𝚞𝚍\mathtt{u}\mathtt{d} right after the last 𝚞\mathtt{u} of w0w_{0}. This is the 𝚞\mathtt{u} corresponding to the first copy of 11, since β1\beta_{1} consists only of second copies of entries. Let w0w_{0}^{\prime} be the resulting word in 𝒟nj+2\mathcal{D}_{n-j+2}. Note that each of the 𝚍\mathtt{d}s after this inserted 𝚞𝚍\mathtt{u}\mathtt{d} corresponds to an element of β11\beta_{1}1.

  3. 3.

    For each entry of β2\beta_{2} that is interleaved with 1β111\beta_{1}1 in π\pi, insert a 𝚞𝚍\mathtt{u}\mathtt{d} in the corresponding location within the last run of 𝚍\mathtt{d}s in w0w_{0}^{\prime}. Specifically, elements of β2\beta_{2} that lie between the first 11 and β1\beta_{1} become 𝚞𝚍\mathtt{u}\mathtt{d}s inserted right after the 𝚞𝚍\mathtt{u}\mathtt{d} from step 2, and elements of β2\beta_{2} that lie between β1\beta_{1} and the second 11 become 𝚞𝚍\mathtt{u}\mathtt{d}s inserted right before the last 𝚍\mathtt{d} of w0w_{0}^{\prime}. This step inserts a total of i1i-1 𝚞𝚍\mathtt{u}\mathtt{d}s, producing a word in 𝒟nj+i+1\mathcal{D}_{n-j+i+1}.

  4. 4.

    Finally, append |Set(γ)|=ji\left|\operatorname{Set}(\gamma)\right|=j-i 𝚞𝚍\mathtt{u}\mathtt{d}s to the end of the word, to obtain a word w𝒟n+1w\in\mathcal{D}_{n+1}.

We claim that the map πw\pi\mapsto w is a bijection between 𝒞n(1132,2213,2231)\mathcal{C}_{n}(1132,2213,2231) and 𝒟n+1{(𝚞𝚍)n+1}\mathcal{D}_{n+1}\setminus\{(\mathtt{u}\mathtt{d})^{n+1}\}, from which it will follow that cn(1132,2213,2231)=Cn+11c_{n}(1132,2213,2231)=C_{n+1}-1.

First, it is clear by construction that w𝒟n+1w\in\mathcal{D}_{n+1}, and that w(𝚞𝚍)n+1w\neq(\mathtt{u}\mathtt{d})^{n+1}, since ww has the two consecutive 𝚞\mathtt{u}s that were created in step 2. To see that it is a bijection, let us show that, given an arbitrary w𝒟n+1{(𝚞𝚍)n+1}w\in\mathcal{D}_{n+1}\setminus\{(\mathtt{u}\mathtt{d})^{n+1}\}, we can uniquely recover the permutation π\pi that it came from. We start by finding the last two consecutive 𝚞\mathtt{u}s in ww, which must exist because w(𝚞𝚍)n+1w\neq(\mathtt{u}\mathtt{d})^{n+1}. Then, the word w0w_{0} obtained from ww by removing all the pairs 𝚞𝚍\mathtt{u}\mathtt{d} to the right of the first of these two 𝚞\mathtt{u}s, determines the permutation st(α1β11)\operatorname{st}(\alpha 1\beta_{1}1) by simply reversing step 1. The location of the removed pairs 𝚞𝚍\mathtt{u}\mathtt{d} determine the positions of the entries in β2\beta_{2} relative to those of β1\beta_{1}, and the number of removed pairs 𝚞𝚍\mathtt{u}\mathtt{d} at the end of ww determine |Set(γ)|\left|\operatorname{Set}(\gamma)\right|. This information uniquely determines the permutation π𝒞n(1132,2213,2231)\pi\in\mathcal{C}_{n}(1132,2213,2231). ∎

As an example of the above bijection, let

π=12 11 12 10 9 8 7 11 1 2 10 3 4 9 8 5 7 1 2 3 4 5 6 6𝒞12(1132,2213,2231),\pi=12\,11\,12\,10\,9\,8\,7\,11\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1}\,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}2}\,10\,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}3\,4}\,9\,8\,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}5}\,7\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1}\,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}2\,3\,4\,5}\,{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}6\,6}\in\mathcal{C}_{12}(1132,2213,2231),

which has i=5i=5 and j=6j=6. In step 1, we have

st(α1β11)=st(12 11 12 10 9 8 7 11 1 10 9 8 7 1)=7 6 7 5 4 3 2 6 1 5 4 3 2 1,\operatorname{st}(\alpha{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1}\beta_{1}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1})=\operatorname{st}(12\,11\,12\,10\,9\,8\,7\,11\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1}\,10\,9\,8\,7\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1})=7\,6\,7\,5\,4\,3\,2\,6\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1}\,5\,4\,3\,2\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1},

which gives the Dyck word w0=𝚞𝚞𝚍𝚞𝚞𝚞𝚞𝚍𝚞𝚍𝚍𝚍𝚍𝚍w_{0}=\mathtt{u}\mathtt{u}\mathtt{d}\mathtt{u}\mathtt{u}\mathtt{u}\mathtt{u}\mathtt{d}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{u}}\mathtt{d}\mathtt{d}\mathtt{d}\mathtt{d}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{d}}. In step 2, we obtain

w0=𝚞𝚞𝚍𝚞𝚞𝚞𝚞𝚍𝚞𝚞𝚍𝚍𝚍𝚍𝚍𝚍,w_{0}^{\prime}=\mathtt{u}\mathtt{u}\mathtt{d}\mathtt{u}\mathtt{u}\mathtt{u}\mathtt{u}\mathtt{d}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{u}}{\color[rgb]{0,1,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,1,0}\mathtt{u}\mathtt{d}}\mathtt{d}\mathtt{d}\mathtt{d}\mathtt{d}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{d}},

where the five 𝚍\mathtt{d} steps after the inserted 𝚞𝚍{\color[rgb]{0,1,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,1,0}\mathtt{u}\mathtt{d}} correspond to β11=10 9 8 7 1\beta_{1}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1}=10\,9\,8\,7\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1}. After steps 3 and 4, we get

w=𝚞𝚞𝚍𝚞𝚞𝚞𝚞𝚍𝚞𝚞𝚍𝚞𝚍𝚍𝚞𝚍𝚞𝚍𝚍𝚍𝚞𝚍𝚍𝚍𝚞𝚍.w=\mathtt{u}\mathtt{u}\mathtt{d}\mathtt{u}\mathtt{u}\mathtt{u}\mathtt{u}\mathtt{d}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{u}}{\color[rgb]{0,1,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,1,0}\mathtt{u}\mathtt{d}}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{u}\mathtt{d}}\mathtt{d}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{u}\mathtt{d}\mathtt{u}\mathtt{d}}\mathtt{d}\mathtt{d}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{u}\mathtt{d}}\mathtt{d}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{d}}{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathtt{u}\mathtt{d}}.
Theorem 3.15.

For all n1n\geq 1, we have cn(1322,2213,2231)=Cn+11.c_{n}(1322,2213,2231)=C_{n+1}-1.

Proof.

We decompose π𝒞n(1322,2213,2231)\pi\in\mathcal{C}_{n}(1322,2213,2231) as in Lemma 3.8. Since π\pi avoids 13221322, β2γ\beta_{2}\gamma avoids 211211, and since π\pi avoids 22312231, αβ1\alpha\beta_{1} avoids 112112. As in the previous proof, avoidance of 22132213 implies that α>γ\alpha>\gamma. Let k=|Set(α)|k=\left|\operatorname{Set}(\alpha)\right|.

If B1=B_{1}=\emptyset, then st(α)\operatorname{st}(\alpha) is an arbitrary permutation in 𝒞k(112)\mathcal{C}_{k}(112), and st(1β21γ)\operatorname{st}(1\beta_{2}1\gamma) is an arbitrary permutation in 𝒞nk(112)\mathcal{C}_{n-k}(112). By Theorem 2.1, these sets are enumerated by the Catalan numbers. Summing over kk, we get

k=0n1CkCnk=Cn+1Cn\sum_{k=0}^{n-1}C_{k}C_{n-k}=C_{n+1}-C_{n}

permutations.

Now suppose B1B_{1}\neq\emptyset. Since α>γ\alpha>\gamma, avoidance of 13221322 implies that C=C=\emptyset, and that β=β2β1\beta=\beta_{2}\beta_{1}, that is, the elements of B2B_{2} are to the left of those of B1B_{1}. It follows that

π=α 12(nk)β1 12(nk),\pi=\alpha\,12\dots(n-k)\,\beta_{1}\,12\dots(n-k),

where st(α1β11)\operatorname{st}(\alpha 1\beta_{1}1) is an arbitrary permutation in 𝒞k+1(112)\mathcal{C}_{k+1}(112) not ending with 1111. By Theorem 2.1, these are counted by Ck+1CkC_{k+1}-C_{k}. Summing over kk, we get

k=1n1Ck+1Ck=CnC1\sum_{k=1}^{n-1}C_{k+1}-C_{k}=C_{n}-C_{1}

permutations.

Adding up the permutations in both cases, we have

cn(1322,2213,2231)=(Cn+1Cn)+(CnC1)=Cn+11.c_{n}(1322,2213,2231)=(C_{n+1}-C_{n})+(C_{n}-C_{1})=C_{n+1}-1.\qed
Theorem 3.16.

For all n1n\geq 1, we have

cn(1132,2213,2311)=n3+6n27n+66.c_{n}(1132,2213,2311)=\frac{n^{3}+6n^{2}-7n+6}{6}.
Proof.

We have 𝒞n(1132,2213,2311)𝒞n(1132,2213,2231)\mathcal{C}_{n}(1132,2213,2311)\subseteq\mathcal{C}_{n}(1132,2213,2231). This is because avoidance of 23112311 implies avoidance of 23312331 by Lemma 3.4, which in turn, using that π\pi avoids 22132213, implies avoidance of 22312231 by Lemma 3.6.

We decompose π𝒞n(1132,2213,2311)\pi\in\mathcal{C}_{n}(1132,2213,2311) as in Lemma 3.8. As in the proof of Theorem 3.14, avoidance of 11321132 requires γ\gamma to be weakly increasing, and avoidance of 22132213 implies that α>γ\alpha>\gamma. Additionally, avoidance of 23112311 now requires α\alpha to be weakly decreasing,

By Lemma 3.8, elements of B1B_{1} form decreasing subsequences in both α\alpha and β\beta, whereas elements of B2B_{2} form increasing subsequences in both β\beta and γ\gamma. Additionally, since α\alpha and γ\gamma are weakly monotone, it follows from Lemma 3.8 that there exist 1ijkn1\leq i\leq j\leq k\leq n such that B2={2,3,,i}B_{2}=\{2,3,\dots,i\}, C={i+1,i+2,,j}C=\{i+1,i+2,\dots,j\}, B1={j+1,j+2,,k}B_{1}=\{j+1,j+2,\dots,k\}, and A={k+1,k+2,,n}A=\{k+1,k+2,\dots,n\}. Let us consider three cases depending on the cardinality of B1B_{1}.

If |B1|2|B_{1}|\geq 2 (that is, kj2k-j\geq 2), the property α>γ\alpha>\gamma, together with avoidance of 23112311, forces C=C=\emptyset (that is, i=ji=j). Avoidance of 23112311 also requires that, in β\beta, the elements of B2B_{2} appear to the left of the elements of B1B_{1}. Therefore, any choice of j,kj,k satisfying 1j<k1n11\leq j<k-1\leq n-1 determines the permutation

π=nn(n1)(n1)(k+1)(k+1)k(k1)(j+1) 12jk(k1)(j+1) 12j\pi=nn(n-1)(n-1)\dots(k+1)(k+1)\,k(k-1)\dots(j+1)\,12\dots j\,k(k-1)\dots(j+1)\,12\dots j (14)

This leaves (n12)\binom{n-1}{2} permutations in this case.

If B1=B_{1}=\emptyset (that is, j=kj=k), π\pi is uniquely determined by the values i,ji,j such that 1ijn1\leq i\leq j\leq n, leaving (n+12)\binom{n+1}{2} permutations.

If |B1|=1|B_{1}|=1 (that is, B1={j+1}={k}B_{1}=\{j+1\}=\{k\}), there are no restrictions on the position of this entry in β\beta. Thus, π\pi is determined by the values i,ki,k such that 1i<kn1\leq i<k\leq n, and the choice of the position of the entry kk in β\beta, for which we have |β|=i|\beta|=i choices. This leaves

1i<kni=(n+13)\sum_{1\leq i<k\leq n}i=\binom{n+1}{3} (15)

permutations.

Adding up the three cases, we obtain

cn(1132,2213,2311)=(n12)+(n+12)+(n+13)=n3+6n27n+66.c_{n}(1132,2213,2311)=\binom{n-1}{2}+\binom{n+1}{2}+\binom{n+1}{3}=\dfrac{n^{3}+6n^{2}-7n+6}{6}.\qed

We note that Lemmas 3.4 and 3.6 imply that 𝒞n(1132,2213,2311)=𝒞n(1132,2113,2311)\mathcal{C}_{n}(1132,2213,2311)=\mathcal{C}_{n}(1132,2113,2311).

The next lemma will be useful in some of the upcoming proofs. Since avoidance of 221221 is equivalent to avoidance of 211211, we have 𝒞n(221,2133)=𝒞n(211,2133)\mathcal{C}_{n}(221,2133)=\mathcal{C}_{n}(211,2133).

Lemma 3.17.

For all n1n\geq 1, permutations π𝒞n(221,2133)\pi\in\mathcal{C}_{n}(221,2133) are those of the form

π=1122ii(i+1)(i+2)n(i+1)(i+2)n\pi=1122\dots ii\,(i+1)(i+2)\dots n\,(i+1)(i+2)\dots n

for some 0i<n0\leq i<n. In particular, |𝒞n(221,2133)|=n\left|\mathcal{C}_{n}(221,2133)\right|=n.

Proof.

Viewing π𝒞n\pi\in\mathcal{C}_{n} as a nonnesting matching, avoidance of 221221 is equivalent to the labels of the arcs being increasing from left to right, similarly to the proof of Theorem 2.1. Additionally, for any three arcs labeled a1<a2<a3a_{1}<a_{2}<a_{3} from left to right, if the arcs a1a_{1} and a2a_{2} cross each other, then the arc a3a_{3} must cross both of them; otherwise τ\tau would contain the subsequence a2a1a3a3a_{2}a_{1}a_{3}a_{3}, which is an occurrence of 21332133. This forces π\pi to have the stated form, and it is clear that such a permutation avoids 21332133. ∎

Theorem 3.18.

For all n1n\geq 1, we have cn(1332,2133,2311)=2n23n+2c_{n}(1332,2133,2311)=2n^{2}-3n+2.

Proof.

We decompose π𝒞n(1332,2133,2311)\pi\in\mathcal{C}_{n}(1332,2133,2311) as in Lemma 3.8. Avoidance of 23112311 implies that α\alpha is weakly decreasing. Avoidance of 21332133 implies avoidance of 21132113 by Lemma 3.4, which forces α>γ\alpha>\gamma. Since π\pi avoids 13321332, β2γ\beta_{2}\gamma must avoid 221221, and since β2\beta_{2} has no repeated entries, τ1β21γ\tau\coloneqq 1\beta_{2}1\gamma avoids 221221 as well. By Lemma 3.17,

τ=1122ii(i+1)(i+2)j(i+1)(i+2)j\tau=1122\dots ii\,(i+1)(i+2)\dots j\,(i+1)(i+2)\dots j (16)

for some 0i<jn0\leq i<j\leq n.

If |B1|2|B_{1}|\geq 2, avoidance of 23112311 requires that i=0i=0, and that, in β\beta, the elements of B2B_{2} appear to the left of those in B1B_{1}. Thus, we get the same (n12)\binom{n-1}{2} permutations as in equation (14).

If B1=B_{1}=\emptyset, we have π=nn(n1)(n1)(j+1)(j+1)τ\pi=nn(n-1)(n-1)\dots(j+1)(j+1)\,\tau, with τ\tau as in equation (16), giving (n+12)\binom{n+1}{2} permutations.

If |B1|=1|B_{1}|=1, we must have B1={j+1}B_{1}=\{j+1\}, and α=nn(n1)(n1)(j+2)(j+2)(j+1)\alpha=nn(n-1)(n-1)\dots(j+2)(j+2)\,(j+1). For any 1i<jn11\leq i<j\leq n-1 in equation (16), we can insert the other copy of j+1j+1 in between the two 11s, giving (n12)\binom{n-1}{2} permutations. If i=0i=0 in equation (16), we have τ=12j 12j\tau=12\dots j\,12\dots j for some 1jn11\leq j\leq n-1, and we can insert the entry j+1j+1 in jj possible positions, giving j=1n1j=(n2)\sum_{j=1}^{n-1}j=\binom{n}{2} permutations.

Adding up all the cases, we get

cn(1332,2133,2311)=(n12)+(n+12)+(n12)+(n2)=2n23n+2.c_{n}(1332,2133,2311)=\binom{n-1}{2}+\binom{n+1}{2}+\binom{n-1}{2}+\binom{n}{2}=2n^{2}-3n+2.\qed
Theorem 3.19.

For all n2n\geq 2, we have cn(1132,2133,2311)=n2+n2c_{n}(1132,2133,2311)=n^{2}+n-2.

Proof.

We claim that 𝒞n(1132,2133,2311)=𝒞n(1132,2213,2311)𝒞n(1332,2133,2311)\mathcal{C}_{n}(1132,2133,2311)=\mathcal{C}_{n}(1132,2213,2311)\cap\mathcal{C}_{n}(1332,2133,2311), the sets from Theorems 3.16 and 3.18. For the inclusion to the right, note that avoidance of 11321132 implies avoidance of 13321332 by Lemma 3.4. By the same lemma, avoidance of 21332133 implies avoidance of 21132113, which then implies avoidance of 22132213 by Lemma 3.6, using the fact that π\pi avoids 23112311. Inclusion to the left is trivial.

We will follow the proof of Theorem 3.16 and count only permutations that avoid 21332133. In the case |B1|2|B_{1}|\geq 2, the (n12)\binom{n-1}{2} permutations from equation (14) avoid 21332133.

If B1=B_{1}=\emptyset, avoidance of 21332133 requires that either i=1i=1, giving nn permutations (one for each 1jn1\leq j\leq n), or that 2i=jn2\leq i=j\leq n, giving n1n-1 permutations.

If |B1|=1|B_{1}|=1, avoidance of 21332133 requires that either i=1i=1, giving n1n-1 permutations (one for each 1<kn1<k\leq n), or that 2i=k12\leq i=k-1, giving i=2n1i=(n2)1\sum_{i=2}^{n-1}i=\binom{n}{2}-1 permutations, assuming that n2n\geq 2, by changing equation (15) accordingly.

In total, we have

cn(1132,2133,2311)=(n12)+n+(n1)+(n1)+(n2)1=n2+n2.c_{n}(1132,2133,2311)=\binom{n-1}{2}+n+(n-1)+(n-1)+\binom{n}{2}-1=n^{2}+n-2.\qed
Theorem 3.20.

For all n1n\geq 1, we have cn(1322,2133,2311)=n2c_{n}(1322,2133,2311)=n^{2}.

Proof.

Let us show that 𝒞n(1322,2133,2311)=𝒞n(1332,2133,2311)𝒞n(1322,2213,2231)\mathcal{C}_{n}(1322,2133,2311)=\mathcal{C}_{n}(1332,2133,2311)\cap\mathcal{C}_{n}(1322,2213,2231), which are the sets from Theorems 3.18 and 3.15. Indeed, avoidance of 13221322 implies avoidance of 13321332 by Lemma 3.4. On the other hand, avoidance of 21332133 and 23112311 implies avoidance of 21132113 and 23312331 by Lemma 3.4, which imply avoidance of 22132213 and 22312231 by Lemma 3.6. Inclusion to the left is straightforward.

Let us follow the proof of Theorem 3.18 and count only permutations that also avoid 13221322. In the cases |B1|2|B_{1}|\geq 2 and B1=B_{1}=\emptyset, the same (n12)+(n+12)\binom{n-1}{2}+\binom{n+1}{2} permutations avoid 13221322. In the case |B1|=1|B_{1}|=1, avoidance of 13221322 requires i=0i=0, and inserting the entry j+1j+1 in the rightmost available position (i.e., as the last entry of β\beta), giving n1n-1 permutations (one for each 1jn11\leq j\leq n-1).

In total, we have

cn(1332,2133,2311)=(n12)+(n+12)+n1=n2.c_{n}(1332,2133,2311)=\binom{n-1}{2}+\binom{n+1}{2}+n-1=n^{2}.\qed

The next two theorems consider subsets of 𝒞n(1223,1332,3112)\mathcal{C}_{n}(1223,1332,3112), the third set in Theorem 3.3(e). Neither of these subsets is contained in the other.

Theorem 3.21.

For all n1n\geq 1, we have cn(1233,1322,3122)=Cn+11.c_{n}(1233,1322,3122)=C_{n+1}-1.

Proof.

By taking the reverse-complement, we have cn(1233,1322,3122)=cn(1123,2213,2231)c_{n}(1233,1322,3122)=c_{n}(1123,2213,2231). We will enumerate permutations π𝒞n(1123,2213,2231)\pi\in\mathcal{C}_{n}(1123,2213,2231) by decomposing them as in Lemma 3.8. As in the proof of Theorem 3.14, avoidance of 22132213 implies that α>γ\alpha>\gamma, and avoidance of 22312231 implies that αβ1\alpha\beta_{1} avoids 112112. The only difference is that now the third avoided pattern is 11231123 instead of 11321132, so now γ\gamma has to be weakly decreasing instead of weakly increasing. We can write β2=j(j1)(ji+2)\beta_{2}=j(j-1)\dots(j-i+2) and γ=j(j1)(ji+2)(ji+1)(ji+1)(ji)(ji)22\gamma=j(j-1)\dots(j-i+2)\,(j-i+1)(j-i+1)(j-i)(j-i)\dots 22 for some 1ijn1\leq i\leq j\leq n. These are the only restrictions on α\alpha, β1\beta_{1}, β2\beta_{2} and γ\gamma, in the sense that they guarantee that π\pi avoids the three patterns 1123,2213,22311123,2213,2231.

Thus, if we take the complement of β2γ\beta_{2}\gamma, by replacing each entry b{2,3,,j}b\in\{2,3,\dots,j\} with j+2bj+2-b, and keep all the other entries unchanged, the decomposition of the resulting permutation π\pi^{\prime} satisfies precisely the restrictions given in the proof of Theorem 3.14 characterizing permutations that avoid 1132,2213,22311132,2213,2231. Thus, the map ππ\pi\mapsto\pi^{\prime} is a bijection from 𝒞n(1123,2213,2231)\mathcal{C}_{n}(1123,2213,2231) to 𝒞n(1132,2213,2231)\mathcal{C}_{n}(1132,2213,2231). In particular, by Theorem 3.14, we have

cn(1123,2213,2231)=cn(1132,2213,2231)=Cn+11.c_{n}(1123,2213,2231)=c_{n}(1132,2213,2231)=C_{n+1}-1.\qed
Theorem 3.22.

For all n2n\geq 2, we have

cn(1123,1132,3312)=7n217n+142.c_{n}(1123,1132,3312)=\dfrac{7n^{2}-17n+14}{2}.
Proof.

Let Λ={1123,1132,3312}\Lambda=\{1123,1132,3312\} and let n3n\geq 3. We decompose π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) as in Lemma 3.8. Avoidance of 11231123 and 11321132 implies that |Set(γ)|1\left|\operatorname{Set}(\gamma)\right|\leq 1.

Consider the first the case |Set(γ)|=1\left|\operatorname{Set}(\gamma)\right|=1. Avoidance of 33123312 implies that Set(γ)={n}\operatorname{Set}(\gamma)=\{n\}. Since π\pi avoids 11231123 and ends with nn, the permutation π\pi^{\prime} obtained from π\pi by removing the two copies of nn must avoid 112112. Since π\pi also avoids 33123312, Lemma 3.17 implies that

π=(n1)(n2)(i+1)(n1)(n2)(i+1)ii(i1)(i1)11\pi^{\prime}=(n-1)(n-2)\dots(i+1)\,(n-1)(n-2)\dots(i+1)\,ii(i-1)(i-1)\dots 11

for some 0in20\leq i\leq n-2. If i=0i=0, then there are nn possible positions for the first copy of nn, namely immediately before the second copy of jj for any 1jn1\leq j\leq n, giving nn permutations. For each 1in21\leq i\leq n-2, there are two possible positions for the first copy of nn, namely immediately before or after the second 11, giving 2(n2)2(n-2) permutations.

Suppose now that γ=ε\gamma=\varepsilon. If A=A=\emptyset, then π=β1β1\pi=\beta 1\beta 1, where β\beta, after subtracting 11 from each entry, is an arbitrary permutation in 𝒮n1(123,132,312)\mathcal{S}_{n-1}(123,132,312). Since there are n1n-1 such permutations [12, Prop. 16 and 16], this gives n1n-1 possibilities for π\pi. If AA\neq\emptyset, avoidance of 33123312 requires that A<B1A<B_{1}. Now avoidance of 11321132 implies that |B1|1\left|B_{1}\right|\leq 1. We consider two cases.

If B1=B_{1}=\emptyset, then π=α11\pi=\alpha 11, where st(α)\operatorname{st}(\alpha) is an arbitrary permutation in 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda). Thus, there are cn1(Λ)c_{n-1}(\Lambda) permutations of this form.

If |B1|=1|B_{1}|=1, the condition A<B1A<B_{1} implies that B1={n}B_{1}=\{n\}, and so β=n\beta=n. In this case, if α\alpha^{\prime} is the permutation obtained by removing the copy of nn from α\alpha, then st(α)\operatorname{st}(\alpha^{\prime}) is an arbitrary permutation in 𝒞n2(112,3312)\mathcal{C}_{n-2}(112,3312). Indeed, α\alpha^{\prime} must avoid 112112 because π\pi avoids 11231123, and one can check that if α\alpha^{\prime} avoids 112112 and 33123312, then π\pi avoids the three patterns in Λ\Lambda. By Lemma 3.17,

α=(n1)(n2)(i+1)(n1)(n2)(i+1)ii(i1)(i1)22\alpha^{\prime}=(n-1)(n-2)\dots(i+1)\,(n-1)(n-2)\dots(i+1)\,ii(i-1)(i-1)\dots 22

for some 1in21\leq i\leq n-2. If i=1i=1, then the first copy of nn can be inserted in n1n-1 positions in α\alpha^{\prime}, namely immediately before of the second copy of jj for any 2jn12\leq j\leq n-1, or at the end. If 2in22\leq i\leq n-2, then the first copy of nn can be inserted two positions, namely immediately before or after the second 22, giving 2(n3)2(n-3) permutations.

Combining all the cases, we get the recurrence

cn(Λ)=n+2(n2)+(n1)+cn1(Λ)+(n1)+2(n3)=cn1(Λ)+7n12.c_{n}(\Lambda)=n+2(n-2)+(n-1)+c_{n-1}(\Lambda)+(n-1)+2(n-3)=c_{n-1}(\Lambda)+7n-12.

Using the initial condition c2(Λ)=4c_{2}(\Lambda)=4, we deduce the stated formula for cn(Λ)c_{n}(\Lambda). ∎

In the next seven theorems, we consider subsets of 𝒞n(1223,2331,3112)\mathcal{C}_{n}(1223,2331,3112), the fourth set in Theorem 3.3(e). Figure 4 shows the containment relationships between these sets.

𝒞n(1223,2331,3112)\mathcal{C}_{n}(1223,2331,3112) 3.3(e)𝒞n(1223,2231,3112)\mathcal{C}_{n}(1223,2231,3112) 3.23𝒞n(1123,2311,3112)\mathcal{C}_{n}(1123,2311,3112) 3.24𝒞n(1123,2331,3312)\mathcal{C}_{n}(1123,2331,3312) 3.26𝒞n(1223,2231,3312)\mathcal{C}_{n}(1223,2231,3312) 3.28𝒞n(1123,2311,3122)\mathcal{C}_{n}(1123,2311,3122) 3.25𝒞n(1123,2311,3312)\mathcal{C}_{n}(1123,2311,3312) 3.27𝒞n(1123,2231,3312)\mathcal{C}_{n}(1123,2231,3312) 3.29
Figure 4: The subsets of 𝒞n(1223,2331,3112)\mathcal{C}_{n}(1223,2331,3112) enumerated in this section.
Theorem 3.23.

For all n1n\geq 1, we have cn(1223,2231,3112)=Cn+11c_{n}(1223,2231,3112)=C_{n+1}-1.

Proof.

We decompose π𝒞n(1223,2231,3112)\pi\in\mathcal{C}_{n}(1223,2231,3112) as in Lemma 3.8. Avoidance of 31123112 implies that α<γ\alpha<\gamma. Let k[n]k\in[n] be such that Set(α)={2,3,,k}\operatorname{Set}(\alpha)=\{2,3,\dots,k\} and Set(γ)={k+1,k+2,,n}\operatorname{Set}(\gamma)=\{k+1,k+2,\dots,n\}. Since π\pi avoids 22312231, αβ1\alpha\beta_{1} must avoid 112112, and since π\pi avoids 12231223, β2γ\beta_{2}\gamma must avoid 112112 as well. Thus, the underlying permutations of αβ1\alpha\beta_{1} and β2γ\beta_{2}\gamma are decreasing, which implies that β1\beta_{1} and β2\beta_{2} are decreasing, since β1\beta_{1} consists of only right copies of entries, and β2\beta_{2} consists of only left copies. Additionally, avoidance of 22312231 forces β2\beta_{2} to be to the left of β1\beta_{1}; otherwise, if b1B1b_{1}\in B_{1} appears to the left of b2B2b_{2}\in B_{2} within β\beta, the subsequence b1b1b21b_{1}b_{1}b_{2}1 (where the first copy of b1b_{1} is in α\alpha) would be an occurrence of 22312231.

If β2=ε\beta_{2}=\varepsilon, then α1β1\alpha 1\beta 1 is an arbitrary permutation in 𝒞k(112)\mathcal{C}_{k}(112), and st(γ)\operatorname{st}(\gamma) is an arbitrary permutation in 𝒞nk(112)\mathcal{C}_{n-k}(112). Thus, by Theorem 2.1, there are

k=1nCkCnk=Cn+1Cn\sum_{k=1}^{n}C_{k}C_{n-k}=C_{n+1}-C_{n}

possibilities for π\pi in this case.

If β2ε\beta_{2}\neq\varepsilon, then avoidance of 22312231, together with the fact that α<β\alpha<\beta, forces A=A=\emptyset. In this case, we have

π=k(k1)1β2k(k1)1γ,\pi=k(k-1)\dots 1\,\beta_{2}\,k(k-1)\dots 1\,\gamma,

where st(1β21γ)\operatorname{st}(1\beta_{2}1\gamma) is an arbitrary permutation in 𝒞nk+1\mathcal{C}_{n-k+1} whose underlying permutation is 1(k+1)k21(k+1)k\dots 2 and does not start with 1111. Indeed, st(1β21γ)\operatorname{st}(1\beta_{2}1\gamma) has these properties because β2γ\beta_{2}\gamma has a decreasing underlying permutation, and β2ε\beta_{2}\neq\varepsilon. Additionally, these properties guarantee that π\pi avoids the patterns 1223,2231,31121223,2231,3112. Since the number of permutations in 𝒞nk+1\mathcal{C}_{n-k+1} with a given underlying permutation is Cnk+1C_{n-k+1} and the number of those that start with 1111 is CnkC_{n-k}, the total number of possibilities for π\pi in this case is

k=1n1(Cnk+1Cnk)=CnC1.\sum_{k=1}^{n-1}(C_{n-k+1}-C_{n-k})=C_{n}-C_{1}.

Adding up both cases, we obtain

cn(1223,2231,3112)=(Cn+1Cn)+(CnC1)=Cn+11.c_{n}(1223,2231,3112)=(C_{n+1}-C_{n})+(C_{n}-C_{1})=C_{n+1}-1.\qed
Theorem 3.24.

For all n2n\geq 2, we have

cn(1123,2311,3112)=n3+3n2+8n126.c_{n}(1123,2311,3112)=\dfrac{n^{3}+3n^{2}+8n-12}{6}.
Proof.

Let n2n\geq 2, and decompose π𝒞n(1123,2311,3112)\pi\in\mathcal{C}_{n}(1123,2311,3112) as in Lemma 3.8. Avoidance of 11231123 and 23112311 forces γ\gamma and α\alpha to be weakly decreasing, respectively. Avoidance of 31123112 requires α<γ\alpha<\gamma.

If B2=B_{2}=\emptyset, we must have

π=jj(j1)(j1)(i+1)(i+1)i(i1)1i(i1)1nn(n1)(n1)(j+1)(j+1)\pi=jj(j-1)(j-1)\dots(i+1)(i+1)\,i(i-1)\dots 1\,i(i-1)\dots 1\,nn(n-1)(n-1)\dots(j+1)(j+1) (17)

for some 1ijn1\leq i\leq j\leq n, giving (n+12)\binom{n+1}{2} permutations.

If |B2|=1|B_{2}|=1, Lemma 3.8, along with the fact that α<γ\alpha<\gamma and γ\gamma is weakly decreasing, imply that B2={n}B_{2}=\{n\}. In this case, π\pi has a form similar to equation (17), with 1ijn11\leq i\leq j\leq n-1, but where the first nn is instead inserted in β\beta (i.e., between the two copies of 11), in one of the ii available positions. The number of permutations of this form is

1ijn1i=(n+13).\sum_{1\leq i\leq j\leq n-1}i=\binom{n+1}{3}. (18)

Finally, consider the case |B2|2|B_{2}|\geq 2. Avoidance of 23112311 forces C=C=\emptyset, and avoidance of 11231123 forces A=A=\emptyset. Therefore,

π=i(i1)1n(n1)1n(n1)(i+1)\pi=i(i-1)\dots 1\,n(n-1)\dots 1\,n(n-1)\dots(i+1) (19)

for some 1in21\leq i\leq n-2, giving n2n-2 permutations.

Adding up the three cases,

cn(1123,2311,3112)=(n+12)+(n+13)+n2=n3+3n2+8n126.c_{n}(1123,2311,3112)=\binom{n+1}{2}+\binom{n+1}{3}+n-2=\dfrac{n^{3}+3n^{2}+8n-12}{6}.\qed
Theorem 3.25.

For all n2n\geq 2, we have cn(1123,2311,3122)=n2+n2c_{n}(1123,2311,3122)=n^{2}+n-2.

Proof.

Since π\pi avoids 31223122, it also avoids 31123112 by Lemma 3.4. It follows that 𝒞n(1123,2311,3122)𝒞n(1123,2311,3112)\mathcal{C}_{n}(1123,2311,3122)\subseteq\mathcal{C}_{n}(1123,2311,3112), the set that we enumerated in Theorem 3.24. In the proof of this theorem, the only case where π\pi may contain the pattern 31223122 is when B2={n}B_{2}=\{n\}. In this case, we must have j=n1j=n-1 in order to avoid 31223122. Therefore, equation (18) becomes

i=1n1i=(n2),\sum_{i=1}^{n-1}i=\binom{n}{2},

and adding up the three cases, we now get

cn(1123,2311,3122)=(n+12)+(n2)+n2=n2+n2.c_{n}(1123,2311,3122)=\binom{n+1}{2}+\binom{n}{2}+n-2=n^{2}+n-2.\qed
Theorem 3.26.

For all n1n\geq 1, we have cn(1123,2331,3312)=2n23n+2c_{n}(1123,2331,3312)=2n^{2}-3n+2.

Proof.

We decompose π𝒞n(1123,2331,3312)\pi\in\mathcal{C}_{n}(1123,2331,3312) as in Lemma 3.8. Avoidance of 11231123 forces γ\gamma to be weakly decreasing. By Lemma 3.4, avoidance of 33123312 implies avoidance of 31123112, which requires α<γ\alpha<\gamma.

Since π\pi avoids 23312331, αβ1\alpha\beta_{1} avoids 122122, and so does τα1β11\tau\coloneqq\alpha 1\beta_{1}1. Since τ\tau also avoids 33123312, Lemma 3.17 applied to the reversal of τ\tau implies that

τ=j(j1)(i+1)j(j1)(i+1)ii(i1)(i1)11\tau=j(j-1)\dots(i+1)\,j(j-1)\dots(i+1)\,ii(i-1)(i-1)\dots 11 (20)

for some 0i<jn0\leq i<j\leq n.

If B2=B_{2}=\emptyset, then γ=nn(n1)(n1)(j+1)(j+1)\gamma=nn(n-1)(n-1)\dots(j+1)(j+1), and any choice of 0i<jn0\leq i<j\leq n gives a valid π\pi, producing (n+12)\binom{n+1}{2} permutations.

If |B2|=1|B_{2}|=1, then B2={n}B_{2}=\{n\} and γ=n(n1)(n1)(j+1)(j+1)\gamma=n\,(n-1)(n-1)\dots(j+1)(j+1). If i=0i=0, then τ=j(j1)1j(j1)1\tau=j(j-1)\dots 1\,j(j-1)\dots 1, and we can insert the other nn in any of the jj positions in β\beta, giving j=1n1j=(n2)\sum_{j=1}^{n-1}j=\binom{n}{2} possibilities for π\pi. If i1i\geq 1 (that is, B1=B_{1}=\emptyset), then the other nn is the only entry in β\beta, so we get (n12)\binom{n-1}{2} possibilities, one for each choice of 1i<jn11\leq i<j\leq n-1.

Finally, if |B2|2|B_{2}|\geq 2, avoidance of 11231123 implies that A=A=\emptyset and that, in β\beta, the elements of B2B_{2} are to the left of those of B1B_{1}. It follows that

π=j(j1)1n(n1)(k+1)j(j1)1n(n1)(k+1)kk(k1)(k1)(j+1)(j+1)\pi=j(j-1)\dots 1\,n(n-1)\dots(k+1)\,j(j-1)\dots 1\,n(n-1)\dots(k+1)\,kk(k-1)(k-1)\dots(j+1)(j+1)

for some 1jkn21\leq j\leq k\leq n-2, giving (n12)\binom{n-1}{2} permutations.

Adding up all the cases,

cn(1123,2331,3312)=(n+12)+(n2)+(n12)+(n12)=2n23n+2.c_{n}(1123,2331,3312)=\binom{n+1}{2}+\binom{n}{2}+\binom{n-1}{2}+\binom{n-1}{2}=2n^{2}-3n+2.\qed
Theorem 3.27.

For all n2n\geq 2, we have

cn(1123,2311,3312)=n2+7n102.c_{n}(1123,2311,3312)=\dfrac{n^{2}+7n-10}{2}.
Proof.

We have that 𝒞n(1123,2311,3312)=𝒞n(1123,2311,3112)𝒞n(1123,2331,3312)\mathcal{C}_{n}(1123,2311,3312)=\mathcal{C}_{n}(1123,2311,3112)\cap\mathcal{C}_{n}(1123,2331,3312), the sets from Theorems 3.24 and 3.26. Indeed, by Lemma 3.4, avoidance of 33123312 implies avoidance of 31123112, and avoidance of 23112311 implies avoidance of 23312331. Inclusion to the left is trivial.

Let us follow the proof of Theorem 3.24 and count only permutations that avoid 33123312. If B2=B_{2}=\emptyset, the permutation in equation (17) avoids 33123312 only if 1=ijn1=i\leq j\leq n, giving nn permutations, or if 2i=jn2\leq i=j\leq n, giving n1n-1 permutations. If B2={n}B_{2}=\{n\}, the copy of nn in β\beta can be inserted in one position if 1=ijn11=i\leq j\leq n-1, giving n1n-1 permutations, and in ii positions if 2i=jn2\leq i=j\leq n, giving i=2n1i=(n2)1\sum_{i=2}^{n-1}i=\binom{n}{2}-1 permutations. If |B2|2|B_{2}|\geq 2, all n2n-2 permutation in equation (19) avoid 33123312.

Adding up the three cases,

cn(1123,2311,3312)=n+(n1)+(n1)+(n2)1+(n2)=n2+7n102.c_{n}(1123,2311,3312)=n+(n-1)+(n-1)+\binom{n}{2}-1+(n-2)=\dfrac{n^{2}+7n-10}{2}.\qed
Theorem 3.28.

For all n1n\geq 1, we have

cn(1223,2231,3312)=n3+2n3.c_{n}(1223,2231,3312)=\dfrac{n^{3}+2n}{3}.
Proof.

We have 𝒞n(1223,2231,3312)𝒞n(1223,2231,3112)\mathcal{C}_{n}(1223,2231,3312)\subseteq\mathcal{C}_{n}(1223,2231,3112) by Lemma 3.4. As in the proof of Theorem 3.23, decomposing π𝒞n(1223,2231,3312)\pi\in\mathcal{C}_{n}(1223,2231,3312) as in Lemma 3.8, we have α<γ\alpha<\gamma, and the elements of β2\beta_{2} are to the left of those of β1\beta_{1}. Thus, we can write π=α1β2β11γ\pi=\alpha 1\beta_{2}\beta_{1}1\gamma.

Since π\pi avoids 22312231, αβ1\alpha\beta_{1} avoids 112112, and so the word τ1α1β11\tau_{1}\coloneqq\alpha 1\beta_{1}1 is a nonnesting permutation that avoids 112112 and 33123312. By Lemma 3.17 applied to the reversal of τ1\tau_{1}, we have

τ1=j(j1)(i+1)j(j1)(i+1)ii(i1)(i1)11\tau_{1}=j(j-1)\dots(i+1)\,j(j-1)\dots(i+1)\,ii(i-1)(i-1)\dots 11

for some 0i<jn0\leq i<j\leq n. On the other hand, the word τ2β2γ\tau_{2}\coloneqq\beta_{2}\gamma, after standardizing (by subtracting jj from each entry), is also a nonnesting permutation that avoids 112112 (since π\pi avoids 12231223) and 33123312, so again we must have

τ2=n(n1)(k+1)n(n1)(k+1)kk(k1)(k1)(j+1)(j+1)\tau_{2}=n(n-1)\dots(k+1)\,n(n-1)\dots(k+1)\,kk(k-1)(k-1)\dots(j+1)(j+1)

for some jknj\leq k\leq n.

Now let us analyze how τ1\tau_{1} and τ2\tau_{2} can overlap with each other. If i=0i=0, the above conditions imply that

π=j(j1)1n(n1)(+1)j(j1)1(1)(k+1)n(n1)(k+1)kk(k1)(k1)(j+1)(j+1),\pi=j(j-1)\dots 1\,n(n-1)\dots(\ell+1)\,j(j-1)\dots 1\\ \,\ell(\ell-1)\dots(k+1)\,n(n-1)\dots(k+1)\,kk(k-1)(k-1)\dots(j+1)(j+1),

for some 1jkn1\leq j\leq k\leq\ell\leq n. However, to avoid double-counting, we do not count the case when k=n1k=n-1 and =n\ell=n, since, for any given j[n1]j\in[n-1], such indices would produce the same permutation π\pi as when k==nk=\ell=n. This gives (n+23)(n1)\binom{n+2}{3}-(n-1) different permutations.

If i1i\geq 1, then avoidance of 22312231 forces π=τ1τ2\pi=\tau_{1}\tau_{2}. In this case, we get a permutation for each choice of indices 1i<jkn1\leq i<j\leq k\leq n, but again, to avoid double-counting, we do not allow k=n1k=n-1. This gives (n+13)(n12)\binom{n+1}{3}-\binom{n-1}{2} different permutations.

Adding the two cases,

cn(1223,2231,3312)=(n+23)(n1)+(n+13)(n12)=n3+2n3.c_{n}(1223,2231,3312)=\binom{n+2}{3}-(n-1)+\binom{n+1}{3}-\binom{n-1}{2}=\dfrac{n^{3}+2n}{3}.\qed
Theorem 3.29.

For all n1n\geq 1, we have cn(1123,2231,3312)=n2.c_{n}(1123,2231,3312)=n^{2}.

Proof.

We have that 𝒞n(1123,2231,3312)=𝒞n(1123,2331,3312)𝒞n(1223,2231,3312)\mathcal{C}_{n}(1123,2231,3312)=\mathcal{C}_{n}(1123,2331,3312)\cap\mathcal{C}_{n}(1223,2231,3312), the sets from Theorems 3.26 and 3.28. This is because, by Lemma 3.4, avoidance of 22312231 implies avoidance of 23312331, and avoidance of 11231123 implies avoidance of 12231223.

Let us follow the proof of Theorem 3.26 and consider only permutations that avoid 22312231. In the cases B2=B_{2}=\emptyset and |B2|2|B_{2}|\geq 2, all (n+12)+(n12)\binom{n+1}{2}+\binom{n-1}{2} permutations in that proof avoid 22312231.

In the case B2={n}B_{2}=\{n\}, if i=0i=0, then nn has to be inserted in the first position of β\beta in order for π\pi to avoid 22312231, giving n1n-1 permutations coming from the choices of 1jn11\leq j\leq n-1 in equation (20). If i1i\geq 1, all permutations contain 22312231, so we do not count them here.

Adding up all the cases,

cn(1123,2231,3312)=(n+12)+(n12)+n1=n2.c_{n}(1123,2231,3312)=\binom{n+1}{2}+\binom{n-1}{2}+n-1=n^{2}.\qed

The last result in this subsection concerns a set of nonnesting permutations avoiding two patterns. Despite the simple formula, the proof is a more technical than the above ones. We define a grand Dyck word of length 2n2n to be a sequence of nn 𝚞\mathtt{u}s and nn 𝚍\mathtt{d}s with no other restrictions. It is well know that the the number of grand Dyck words of length 2n2n is (2nn)\binom{2n}{n}, and that its generating function is n0(2nn)=114x\sum_{n\geq 0}\binom{2n}{n}=\frac{1}{\sqrt{1-4x}}.

Theorem 3.30.

For all n1n\geq 1, we have

cn(1322,2231)=(2nn)2n1.c_{n}(1322,2231)=\binom{2n}{n}-2^{n-1}.
Proof.

We decompose π𝒞n(1322,2231)\pi\in\mathcal{C}_{n}(1322,2231) as in Lemma 3.8. Since π\pi avoids 13221322, β2γ\beta_{2}\gamma avoids 211211, so its underlying permutation is increasing. Similarly, since π\pi avoids 22312231, αβ1\alpha\beta_{1} avoids 112112, so its underlying permutation is decreasing. It follows that β2\beta_{2} is increasing and β1\beta_{1} is decreasing.

Let us show that β=β2β1\beta=\beta_{2}\beta_{1}, that is the elements in B2B_{2} are to the left of the elements of B1B_{1} in β\beta. Suppose for contradiction that b1B1b_{1}\in B_{1} and b2B2b_{2}\in B_{2} and that b1b_{1} is to the left of b2b_{2} within β\beta. Then β\beta contains the subsequence b11b1b21b2b_{1}1b_{1}b_{2}1b_{2}. If b1<b2b_{1}<b_{2}, then b1b1b21b_{1}b_{1}b_{2}1 is an occurrence of 22312231, and if b1>b2b_{1}>b_{2}, then 1b1b2b21b_{1}b_{2}b_{2} is an occurrence of 13221322, which is a contradiction in both cases.

If AC=A\cup C=\emptyset, we have π=β11β2β11β2\pi=\beta_{1}1\beta_{2}\beta_{1}1\beta_{2}, and π\pi is determined by which elements from {2,3,,n}\{2,3,\dots,n\} are in B1B_{1}, giving 2n12^{n-1} permutations if n1n\geq 1. The corresponding ordinary generating function is

1+n12n1xn=1x12x.1+\sum_{n\geq 1}2^{n-1}x^{n}=\frac{1-x}{1-2x}. (21)

Suppose now that ACA\cup C\neq\emptyset, and let us show that B<ACB<A\cup C. Indeed, if there were elements bBb\in B and aAa\in A such that a<ba<b, then aab1aab1 would an occurrence of 22312231. Similarly, if there was a cCc\in C such that c<bc<b, then 1bcc1bcc would an occurrence of 13221322. Let us assume that the smallest element in ACA\cup C is in AA; the case where it is in CC is symmetric.

Since π\pi avoids 13221322, for each cCc\in C, all the elements of α\alpha larger than cc must come before those smaller than cc. Similarly, since π\pi avoids 22312231, for each aAa\in A, all the elements of γ\gamma smaller than aa must come before those larger than aa. This means that we have disjoint unions A=A1A2A=A_{1}\sqcup A_{2}\sqcup\dots and C=C1C2C=C_{1}\sqcup C_{2}\sqcup\dots where the AiA_{i} and CiC_{i} are nonempty intervals (i.e., sets of consecutive integers) such that

B<A1<C1<A2<C2<,B<A_{1}<C_{1}<A_{2}<C_{2}<\dots, (22)

all the elements of Ai+1A_{i+1} appear to the left of those of AiA_{i}, and all the elements of CiC_{i} appear to the left of those of Ci+1C_{i+1}, for all ii.

Denoting the restriction of π\pi to the elements in each AiA_{i} by π|Ai\pi|_{A_{i}}, the word st(π|Ai)\operatorname{st}(\pi|_{A_{i}}) is an arbitrary nonnesting permutation avoiding 112112, so it can be encoded as a Dyck word by replacing the first copy of each entry with a 𝚞\mathtt{u} and the second copy with a 𝚍\mathtt{d}. Denote this word by w(π|Ai)w(\pi|_{A_{i}}). Similarly, st(π|Ci)\operatorname{st}(\pi|_{C_{i}}) forms an arbitrary nonnesting permutation avoiding 211211, which can be encoded as a Dyck word w(π|Ci)w(\pi|_{C_{i}}). It follows that the restriction of π\pi to ACA\cup C can be encoded as a grand Dyck word

w(π|C2)rw(π|A2)w(π|C1)rw(π|A1),\dots w(\pi|_{C_{2}})^{r}\,w(\pi|_{A_{2}})\,w(\pi|_{C_{1}})^{r}\,w(\pi|_{A_{1}}), (23)

that is, for each of the sets AiA_{i} and CiC_{i} in the opposite order from equation (22) and we consider their associated Dyck words, reversing the ones coming from the sets CiC_{i}. Viewing words as lattice paths with steps 𝚞=(1,1)\mathtt{u}=(1,1) and 𝚍=(1,1)\mathtt{d}=(1,-1) starting at the origin, the reversed Dyck words correspond to portions of the path below the xx-axis.

If β=ε\beta=\varepsilon, we can recover π\pi uniquely from the above grand Dyck word, which has length 2(n1)2(n-1). However, to deal with arbitrary β\beta, we have to modify the last portion w(π|A1)w(\pi|_{A_{1}}) of the above word, to take into account how the elements of A1A_{1} and B1B_{1} may be interleaved. Let a=minA1a=\min A_{1}, which is the rightmost entry of π|A1\pi|_{A_{1}}, and write B1=B1LB1RB_{1}=B_{1}^{L}\sqcup B_{1}^{R}, where B1LB_{1}^{L} (resp. B1RB_{1}^{R}) are the elements whose first copy appears before (resp. after) the second copy of aa. Note that B1L>B1RB_{1}^{L}>B_{1}^{R}, since β1\beta_{1} is decreasing, and that B1L>B2B_{1}^{L}>B_{2}, since otherwise π\pi would contain 13221322 (with aa playing the role of 33). Therefore, B1RB2={2,3,,k+1}B_{1}^{R}\cup B_{2}=\{2,3,\dots,k+1\} for some 0kn20\leq k\leq n-2. Note also that, in γ\gamma, the elements of B2B_{2} must appear to the left of the elements of CC, since otherwise, any cCc\in C to the left of b2B2b_{2}\in B_{2} would create a subsequence aacb2aacb_{2}, which is an occurrence of 22312231.

The restriction of π\pi to A1B1L{1}A_{1}\cup B_{1}^{L}\cup\{1\}, after standardizing, is a nonnesting permutation avoiding 112112, which can be encoded as a Dyck word w(π|A1B1L{1})w(\pi|_{A_{1}\cup B_{1}^{L}\cup\{1\}}). However, this is not an arbitrary Dyck word, but rather one with the property that the rightmost 𝚞\mathtt{u} (which corresponds to the first copy of 11) is preceded by a 𝚍\mathtt{d} (which corresponds to the second copy of aa). Given a Dyck word with this property, we not only can recover st(π|A1B1L{1})\operatorname{st}(\pi|_{A_{1}\cup B_{1}^{L}\cup\{1\}}), by we also know that |B1L|+1|B_{1}^{L}|+1 is precisely the number of 𝚍\mathtt{d}s after the last 𝚞\mathtt{u}. Dyck words whose rightmost 𝚞\mathtt{u} is preceded by a 𝚍\mathtt{d}, by turning this pair 𝚍𝚞\mathtt{d}\mathtt{u} into 𝚞𝚍\mathtt{u}\mathtt{d}, are in bijection with Dyck words ending in 𝚍𝚍\mathtt{d}\mathtt{d}. Let w(π|A1B1L{1})w^{\prime}(\pi|_{A_{1}\cup B_{1}^{L}\cup\{1\}}) be the Dyck word obtained after this transformation. Replacing w(π|A1)w(\pi|_{A_{1}}) with w(π|A1B1L{1})w^{\prime}(\pi|_{A_{1}\cup B_{1}^{L}\cup\{1\}}) on the right of equation (23), we obtain a grand Dyck word ending with 𝚍𝚍\mathtt{d}\mathtt{d}. Denote this word by g(π)g(\pi).

The remaining piece of information needed to determine π\pi is which elements of {2,3,,k+1}\{2,3,\dots,k+1\} belong to B2B_{2}, since the rest must belong to B1RB_{1}^{R}.

The map π(g(π),B2)\pi\mapsto(g(\pi),B_{2}) is a bijection from permutations π𝒞n(1322,2231)\pi\in\mathcal{C}_{n}(1322,2231) where the smallest element of ACA\cup C is in AA, to pairs consisting of a grand Dyck word g(π)g(\pi) of semilength nkn-k (for some 0kn20\leq k\leq n-2) ending with 𝚍𝚍\mathtt{d}\mathtt{d}, and a subset B2{2,3,,k+1}B_{2}\subseteq\{2,3,\dots,k+1\}. For permutations π𝒞n(1322,2231)\pi\in\mathcal{C}_{n}(1322,2231) where the smallest element of ACA\cup C is in CC, a symmetric construction produces a pair (g(π),B1)(g(\pi),B_{1}), where the Dyck word g(π)g(\pi) ends with 𝚞𝚞\mathtt{u}\mathtt{u}, and B1{2,3,,k+1}B_{1}\subseteq\{2,3,\dots,k+1\}.

The generating function for grand Dyck words ending with 𝚍𝚍\mathtt{d}\mathtt{d} or 𝚞𝚞\mathtt{u}\mathtt{u}, or equivalently, nonempty grand Dyck words not ending with 𝚞𝚍\mathtt{u}\mathtt{d} or 𝚍𝚞\mathtt{d}\mathtt{u}, is

114x12x14x.\frac{1}{\sqrt{1-4x}}-1-\frac{2x}{\sqrt{1-4x}}.

On the other hand, the generating function for subsets of {2,3,,k+1}\{2,3,\dots,k+1\} is 112x\frac{1}{1-2x}.

Multiplying these and adding equation (21), we deduce that

n0cn(1322,2231)xn=(12x14x1)112x+1x12x=114xx12x,\sum_{n\geq 0}c_{n}(1322,2231)\,x^{n}=\left(\frac{1-2x}{\sqrt{1-4x}}-1\right)\frac{1}{1-2x}+\frac{1-x}{1-2x}=\frac{1}{\sqrt{1-4x}}-\frac{x}{1-2x},

and so, extracting coefficients,

cn(1322,2231)=(2nn)2n1.c_{n}(1322,2231)=\binom{2n}{n}-2^{n-1}.\qed

As an example of the construction in the proof of Theorem 3.30, let

π=17 16 17 16 15 15 12 11 10 12 9 8 11 7 10 5 4 1 2 3 6 9 8 7 5 4 1 2 3 6 13 14 13 14𝒞17(1322,2231),\pi={\color[rgb]{.25,.25,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.25,.25,.25}\pgfsys@color@gray@stroke{.25}\pgfsys@color@gray@fill{.25}17\,16\,17\,16\,15\,15}\ {\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}12\,11\,10\,12}\,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}9\,8}\,{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}11}\,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}7}\,{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}10}\ {\color[rgb]{1,.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,.5,0}5\,4}\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1}\,{\color[rgb]{0,1,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,1,0}2\,3\,6}\,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}9\,8\,7}\,{\color[rgb]{1,.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,.5,0}5\,4}\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1}\,{\color[rgb]{0,1,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,1,0}2\,3\,6}\ {\color[rgb]{.75,.5,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.75,.5,.25}13\,14\,13\,14}\in\mathcal{C}_{17}(1322,2231),

which has A2={15,16,17}A_{2}=\{{\color[rgb]{.25,.25,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.25,.25,.25}\pgfsys@color@gray@stroke{.25}\pgfsys@color@gray@fill{.25}15},{\color[rgb]{.25,.25,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.25,.25,.25}\pgfsys@color@gray@stroke{.25}\pgfsys@color@gray@fill{.25}16},{\color[rgb]{.25,.25,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.25,.25,.25}\pgfsys@color@gray@stroke{.25}\pgfsys@color@gray@fill{.25}17}\}, C1={13,14}C_{1}=\{{\color[rgb]{.75,.5,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.75,.5,.25}13},{\color[rgb]{.75,.5,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.75,.5,.25}14}\}, A1={10,11,12}A_{1}=\{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}10},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}11},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}12}\}, B1L={7,8,9}B_{1}^{L}=\{{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}7},{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}8},{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}9}\}, B1R={4,5}B_{1}^{R}=\{{\color[rgb]{1,.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,.5,0}4},{\color[rgb]{1,.5,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,.5,0}5}\}, B2={2,3,6}B_{2}=\{{\color[rgb]{0,1,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,1,0}2},{\color[rgb]{0,1,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,1,0}3},{\color[rgb]{0,1,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,1,0}6}\}, and k=5k=5. Then w(π|A2)=𝚞𝚞𝚍𝚍𝚞𝚍w(\pi|_{A_{2}})={\color[rgb]{.25,.25,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.25,.25,.25}\pgfsys@color@gray@stroke{.25}\pgfsys@color@gray@fill{.25}\mathtt{u}\mathtt{u}\mathtt{d}\mathtt{d}\mathtt{u}\mathtt{d}}, w(π|C1)r=𝚍𝚍𝚞𝚞w(\pi|_{C_{1}})^{r}={\color[rgb]{.75,.5,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.75,.5,.25}\mathtt{d}\mathtt{d}\mathtt{u}\mathtt{u}},

w(π|A1B1L{1})=w(12 11 10 12 9 8 11 7 10 1 9 8 7 1)=𝚞𝚞𝚞𝚍𝚞𝚞𝚍𝚞𝚍𝚞𝚍𝚍𝚍𝚍,w(\pi|_{A_{1}\cup B_{1}^{L}\cup\{1\}})=w({\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}12\,11\,10\,12}\,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}9\,8}\,{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}11}\,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}7}\,{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}10}\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1}\,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}9\,8\,7}\,{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}1})={\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathtt{u}\mathtt{u}\mathtt{u}\mathtt{d}}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{u}\mathtt{u}}{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathtt{d}}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{u}}{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathtt{d}}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{u}}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{d}\mathtt{d}\mathtt{d}}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{d}},

and w(π|A1B1L{1})=𝚞𝚞𝚞𝚍𝚞𝚞𝚍𝚞𝚞𝚍𝚍𝚍𝚍𝚍w^{\prime}(\pi|_{A_{1}\cup B_{1}^{L}\cup\{1\}})={\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathtt{u}\mathtt{u}\mathtt{u}\mathtt{d}}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{u}\mathtt{u}}{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathtt{d}}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{u}}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{u}}{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathtt{d}}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{d}\mathtt{d}\mathtt{d}}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{d}}. Concatenating these words, we get

g(π)=𝚞𝚞𝚍𝚍𝚞𝚍𝚍𝚍𝚞𝚞𝚞𝚞𝚞𝚍𝚞𝚞𝚍𝚞𝚞𝚍𝚍𝚍𝚍𝚍.g(\pi)={\color[rgb]{.25,.25,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.25,.25,.25}\pgfsys@color@gray@stroke{.25}\pgfsys@color@gray@fill{.25}\mathtt{u}\mathtt{u}\mathtt{d}\mathtt{d}\mathtt{u}\mathtt{d}}\,{\color[rgb]{.75,.5,.25}\definecolor[named]{pgfstrokecolor}{rgb}{.75,.5,.25}\mathtt{d}\mathtt{d}\mathtt{u}\mathtt{u}}\,{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathtt{u}\mathtt{u}\mathtt{u}\mathtt{d}}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{u}\mathtt{u}}{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathtt{d}}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{u}}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{u}}{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathtt{d}}{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\mathtt{d}\mathtt{d}\mathtt{d}}{\color[rgb]{.5,0,.5}\definecolor[named]{pgfstrokecolor}{rgb}{.5,0,.5}\mathtt{d}}.

3.3 Patterns with non-adjacent repeated letters

In this subsection we consider sets of patterns of length 44 that include patterns with repeated letters in non-adjacent positions. For the sets we consider, the number of nonnesting permutations avoiding them is still given by nice formulas.

Theorem 3.31.

For all n2n\geq 2, we have cn(1132,3112,3121)=53n21c_{n}(1132,3112,3121)=5\cdot 3^{n-2}-1.

Proof.

Let Λ={1132,3112,3121}\Lambda=\{1132,3112,3121\}, and decompose π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) as in Lemma 3.8. Avoidance of 11321132 requires γ\gamma to be weakly increasing, avoidance of 31123112 requires α<γ\alpha<\gamma, and avoidance of 31213121 requires αβ\alpha\leq\beta, so in particular |B1|1|B_{1}|\leq 1. By Lemma 3.8, the entries in B2B_{2} form an increasing sequence in both β\beta and γ\gamma, and γ\gamma consists of the elements of B2B_{2} followed by the elements of CC, each of which is duplicated. In particular, π\pi ends with nn if and only if γε\gamma\neq\varepsilon. Let cn=cn(Λ)c_{n}=c_{n}(\Lambda), and let rnr_{n} denote the number of permutations in 𝒞n(Λ)\mathcal{C}_{n}(\Lambda) that end with an nn, so that cnrnc_{n}-r_{n} is the number of those that do not.

Let us first focus on permutations that do not end with an nn, namely those with γ=ε\gamma=\varepsilon, and suppose that n2n\geq 2. If β=ε\beta=\varepsilon, these are permutations of the form π=α11\pi=\alpha 11, where st(α)\operatorname{st}(\alpha) is an arbitrary element of 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda). If βε\beta\neq\varepsilon, then the condition αβ\alpha\leq\beta and the nonnesting property implies that π=α1n1\pi=\alpha 1n1, where st(αn)\operatorname{st}(\alpha n) is an arbitrary element of 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda) ending with its largest entry. It follows that

cnrn=cn1+rn1.c_{n}-r_{n}=c_{n-1}+r_{n-1}. (24)

Now consider permutations in 𝒞n(Λ)\mathcal{C}_{n}(\Lambda) that end with an nn, and suppose that n3n\geq 3. If CC\neq\emptyset, these permutations end in fact with nnnn, and removing this pair of entries yields an arbitrary permutation in 𝒞n1(Λ)\mathcal{C}_{n-1}(\Lambda), so these are counted by cn1c_{n-1}. Suppose now that C=C=\emptyset, which requires B2B_{2}\neq\emptyset for the permutation to end with nn. Consider two cases depending on the cardinality of AA, with subcases depending on whether |B1||B_{1}| equals 0 or 11.

  • Case AA\neq\emptyset. We must have |B2|1|B_{2}|\leq 1 in this case; otherwise, taking i,iB2i,i^{\prime}\in B_{2} with i<ii<i^{\prime}, the subsequence 22ii22i^{\prime}i, where ii^{\prime} is an entry in β\beta and ii is an entry in γ\gamma, would be an occurrence of 11321132. Combined with the above conditions, this forces B2={n}B_{2}=\{n\}.

    If |B1|=0|B_{1}|=0, we must have π=α1n1n\pi=\alpha 1n1n, where st(α)\operatorname{st}(\alpha) is an arbitrary element of 𝒞n2(Λ)\mathcal{C}_{n-2}(\Lambda), giving cn2c_{n-2} permutations.

    If |B1|=1|B_{1}|=1, we must have B1={n1}B_{1}=\{n-1\}, where n1n-1 is also the largest entry in α\alpha, and so π=α1(n1)n1n\pi=\alpha 1(n-1)n1n, where st(α(n1))\operatorname{st}(\alpha(n-1)) is an arbitrary element of 𝒞n2(Λ)\mathcal{C}_{n-2}(\Lambda) ending with its largest entry. Indeed, if this word avoids 11321132, 31123112 and 31213121, then so does π\pi. This subcase contributes rn2r_{n-2} permutations, except when n=3n=3, in which case the resulting permutation π=212313\pi=212313 has A=A=\emptyset, so it will be counted in the next case instead.

  • Case A=A=\emptyset. If |B1|=0|B_{1}|=0, the only possibility is π=12n123n\pi=12\dots\,n123\dots n.

    If |B1|=1|B_{1}|=1, we must have B1={2}B_{1}=\{2\} and B2={3,4,,n}B_{2}=\{3,4,\dots,n\}. If n4n\geq 4, avoidance of 11321132 requires that 22 appears at the end of β\beta; otherwise π\pi would contain the subsequence 22n322n3, where nn is an entry in β\beta and 33 is an entry in γ\gamma. This forces π=21 34n 21 34n\pi=21\,34\dots n\,21\,34\dots n, except when n=3n=3, where we get the additional permutation π=2 1 23 1 3\pi=2\,1\,23\,1\,3 which was not counted in the previous case.

Combining both cases for permutations ending with an nn, we obtain

rn=cn1+cn2+rn2+2r_{n}=c_{n-1}+c_{n-2}+r_{n-2}+2 (25)

for n3n\geq 3.

Adding equations (24) and (25), and then using the equality rn1+rn2=cn1cn2r_{n-1}+r_{n-2}=c_{n-1}-c_{n-2}, which follows from equation (24) with the index shifted by one, we obtain the recurrence

cn=2cn1+rn1+cn2+rn2+2=3cn1+2c_{n}=2c_{n-1}+r_{n-1}+c_{n-2}+r_{n-2}+2=3c_{n-1}+2

for n3n\geq 3. From this recurrence, along with the initial condition c2=4c_{2}=4, we can prove the formula cn=53n21c_{n}=5\cdot 3^{n-2}-1 by induction. ∎

Theorem 3.32.

For all n1n\geq 1, we have cn(1231,1321,2132,2312,3123,3213)=n!Fnc_{n}(1231,1321,2132,2312,3123,3213)=n!F_{n}.

Proof.

Let Λ={1231,1321,2132,2312,3123,3213}\Lambda=\{1231,1321,2132,2312,3123,3213\}. Patterns in Λ\Lambda are precisely those of the form ijkiijki, where ijk𝒮3ijk\in\mathcal{S}_{3}. It follows that π𝒞n(Λ)\pi\in\mathcal{C}_{n}(\Lambda) if and only every arc in its associated matching connects adjacent entries, or entries having only one entry in between.

Let ana_{n} be the number of such matchings of [2n][2n]. Such a matching either has an arc (2n1,2n)(2n-1,2n), giving rise to a matching of [2n2][2n-2] on the remaining vertices, or it has arcs (2n3,2n1)(2n-3,2n-1) and (2n2,2n)(2n-2,2n), giving rise to a matching of [2n4][2n-4]. Therefore, an=an1+an2a_{n}=a_{n-1}+a_{n-2}, with initial conditions a1=1a_{1}=1 and a2=2a_{2}=2, implying that an=Fna_{n}=F_{n}.

Each matching can be labeled in n!n! ways to form a permutation in 𝒞n(Λ)\mathcal{C}_{n}(\Lambda), proving the stated formula. ∎

Our last two results are proved using exponential and ordinary generating functions, respectively.

Theorem 3.33.

The exponential generating function (EGF) for nonnesting permutations that avoid {1231,1321}\{1231,1321\} is

n0cn(1231,1321)xnn!=23e2x\sum_{n\geq 0}c_{n}(1231,1321)\,\frac{x^{n}}{n!}=\dfrac{2}{3-e^{2x}}
Proof.

Let Λ={1231,1321}\Lambda=\{1231,1321\}. We will find a differential equation satisfied by A(x)=n0cn(Λ)xnn!A(x)=\sum_{n\geq 0}c_{n}(\Lambda)\,\frac{x^{n}}{n!}.

The coefficient of xnn!\frac{x^{n}}{n!} in the derivative A(x)A^{\prime}(x) counts permutations π𝒞n+1(Λ)\pi\in\mathcal{C}_{n+1}(\Lambda). As in Lemma 3.8, such permutations can be written as π=α1β1γ\pi=\alpha 1\beta 1\gamma, where β\beta has no repeated entries, and Set(α)Set(γ)=\operatorname{Set}(\alpha)\cap\operatorname{Set}(\gamma)=\emptyset. Additionally, β\beta is either empty or has length 11, since two distinct values in β\beta would create an occurrence of 12311231 or 13211321.

If β=ε\beta=\varepsilon, then the standardized words st(α)\operatorname{st}(\alpha) and st(γ)\operatorname{st}(\gamma) are arbitrary Λ\Lambda-avoiding nonnesting permutations.

If β=b\beta=b for some b{2,3,,n+1}b\in\{2,3,\dots,n+1\}, and the other copy of bb appears in α\alpha, then st(αb)\operatorname{st}(\alpha b) and st(γ)\operatorname{st}(\gamma) are again arbitrary Λ\Lambda-avoiding nonnesting permutations (with the caveat that st(αb)\operatorname{st}(\alpha b) is nonempty). If the other copy of bb appears in γ\gamma, the same is true for st(α)\operatorname{st}(\alpha) and st(bγ)\operatorname{st}(b\gamma).

It follows that π𝒞n+1(Λ)\pi\in\mathcal{C}_{n+1}(\Lambda) equals one of the following:

  1. (1)

    α11γ\alpha 11\gamma, where st(α)𝒞k(Λ)\operatorname{st}(\alpha)\in\mathcal{C}_{k}(\Lambda) and st(γ)𝒞nk(Λ)\operatorname{st}(\gamma)\in\mathcal{C}_{n-k}(\Lambda) for some 0kn0\leq k\leq n,

  2. (2)

    α1b1γ\alpha 1b1\gamma, where st(αb)𝒞k(Λ)\operatorname{st}(\alpha b)\in\mathcal{C}_{k}(\Lambda) and st(γ)𝒞nk(Λ)\operatorname{st}(\gamma)\in\mathcal{C}_{n-k}(\Lambda) for some 1kn1\leq k\leq n,

  3. (3)

    α1b1γ\alpha 1b1\gamma, where st(bγ)𝒞k(Λ)\operatorname{st}(b\gamma)\in\mathcal{C}_{k}(\Lambda) and st(α)𝒞nk(Λ)\operatorname{st}(\alpha)\in\mathcal{C}_{n-k}(\Lambda) for some 1kn1\leq k\leq n.

Summing over n0n\geq 0, case (1) contributes A(x)2A(x)^{2} to the exponential generating function, since Set(α)\operatorname{Set}(\alpha) and Set(γ)\operatorname{Set}(\gamma) form an arbitrary ordered partition of {2,3,,n+1}\{2,3,\dots,n+1\} into two nonempty sets, see e.g. [13, Prop. 5.1.1]. Each of the cases (2) and (3) contributes (A(x)1)A(x)(A(x)-1)A(x) because one of the blocks is nonempty. This gives the differential equation

A(x)=A(x)2+2(A(x)1)A(x)=3A(x)22A(x),A^{\prime}(x)=A(x)^{2}+2(A(x)-1)A(x)=3A(x)^{2}-2A(x),

with initial condition A(0)=1A(0)=1. Solving this equation, we deduce that A(x)=23e2x.A(x)=\frac{2}{3-e^{2x}}.

Theorem 3.34.

The ordinary generating function (OGF) for nonnesting permutations that avoid {1231,1321,2113}\{1231,1321,2113\} is

n0cn(1231,1321,2113)xn=1+2x18x+4x26x.\sum_{n\geq 0}c_{n}(1231,1321,2113)\,x^{n}=\dfrac{1+2x-\sqrt{1-8x+4x^{2}}}{6x}.
Proof.

Let Λ={1231,1321,2113}\Lambda=\{1231,1321,2113\}. Decomposing permutations π𝒞n+1(Λ)\pi\in\mathcal{C}_{n+1}(\Lambda) as in the proof of Theorem 3.33, the additional condition of avoiding 21132113 requires α>γ\alpha>\gamma. Thus, Set(γ)={2,3,,k+1}\operatorname{Set}(\gamma)=\{2,3,\dots,k+1\} and Set(α)={k+2,k+3,,n+1}\operatorname{Set}(\alpha)=\{k+2,k+3,\dots,n+1\} for some 0kn0\leq k\leq n, which makes the use of ordinary generating functions suitable in this case.

Letting B(x)=n0cn(Λ)xnB(x)=\sum_{n\geq 0}c_{n}(\Lambda)\,x^{n}, the same three cases as in the proof of Theorem 3.33, plus the empty permutation, give the equation

B(x)=1+xB(x)2+2x(B(x)1)B(x).B(x)=1+xB(x)^{2}+2x(B(x)-1)B(x).

Solving for B(x)B(x), we obtain the stated expression for the generating function. ∎

4 Further research

In a preprint version of this article, we proposed the open problem of finding a formula for the number of noncrossing permutations avoiding a single pattern in 𝒮3\mathcal{S}_{3}. This problem has recently been solved for the pattern 132132 in [2]. The question remains open for the pattern 123123, as it does in the noncrossing case studied in [1].

Problem 1.

Find an expression for cn(123)c_{n}(123).

The values of cn(123)c_{n}(123) for 1n81\leq n\leq 8 are 1,4,17,82,406,2070,10729,56394,1,4,17,82,406,2070,10729,56394,\dots. This sequence does not appear in the Online Encyclopedia of Integer Sequences [11] at the time of writing this paper.

For nonnesting permutations avoiding sets of patterns of length 4, we have presented some results in Section 3, but there are many other sets to be considered. In Table 4 we list some cases that seem to give interesting enumeration sequences. All the conjectures have been checked for nn up to 88.

Λ\Lambda Conjecture for cn(Λ)c_{n}(\Lambda) OEIS code
{1322}\{1322\} 1nk=0n1(3nk)(2nk2n1)\displaystyle\frac{1}{n}\sum_{k=0}^{n-1}\binom{3n}{k}\binom{2n-k-2}{n-1} A007297
{1132,2213}\{1132,2213\} OGF:  (1x)2(1x)44x(1x)22x\dfrac{(1-x)^{2}-\sqrt{(1-x)^{4}-4x(1-x)^{2}}}{2x} A006319
{1233,1322}\{1233,1322\}
{1132,3312}\{1132,3312\} 3n32n1+13^{n}-3\cdot 2^{n-1}+1 A168583
{1231,1312,2231,3221}\{1231,1312,2231,3221\} OGF:  13x+2x2(13x)(1xx2)\dfrac{1-3x+2x^{2}}{(1-3x)(1-x-x^{2})} A099159
Table 4: Some conjectures on the enumeration of nonnesting permutations avoiding other patterns.

We also note that for some of the sets of patterns in Table 3 we arrived at the same enumeration formulas, such as Cn+11C_{n+1}-1, using different proof methods. It would be interesting to find direct bijections explaining these Wilf equivalences. In the same vein, we wonder if there is a simple bijective proof of Theorem 2.6, namely, a bijection between 𝒞n(132,213)\mathcal{C}_{n}(132,213) and pairs of Fibonacci objects of the same size.

In [6], it is shown that the polynomial enumerating all nonnesting permutations with respect to the number of descents has an unexpectedly simple factorization, and that its coefficients are palindromic. It may be interesting to consider the enumeration of pattern-avoiding nonnesting permutations with respect to the number of descents.

Finally, Tables 1, 2 and 3 show that that some of the enumeration sequences of pattern-avoiding nonnesting permutations are constant, others are polynomials, others grow exponentially, and others grow factorially. It would be interesting to understand the possible asymptotic behaviors of these sequences, the nature of their generating functions, and how these are determined by the properties of the avoided patterns.

Acknowledgements

SE was partially supported by Simons Collaboration Grant #929653. AL was partially supported by a Presidential Scholarship from Dartmouth College. We thank Kate Kucharczuk for useful observations in the early stages of this work, and Robert Dougherty-Bliss and Ryan Maguire for their help with some computations.

References

  • [1] Kassie Archer, Adam Gregory, Bryan Pennington, and Stephanie Slayden. Pattern restricted quasi-Stirling permutations. Australas. J. Combin., 74:389–407, 2019.
  • [2] Kassie Archer and Robert P. Laudone. Pattern avoidance in non-crossing and non-nesting permutations, 2025. arXiv:2502.13309.
  • [3] Christos A. Athanasiadis. On noncrossing and nonnesting partitions for classical reflection groups. Electron. J. Combin., 5:Research Paper 42, 16, 1998.
  • [4] Olivier Bernardi. Deformations of the braid arrangement and trees. Adv. Math., 335:466–518, 2018.
  • [5] Sergi Elizalde. Descents on quasi-Stirling permutations. J. Combin. Theory Ser. A, 180:Paper No. 105429, 35, 2021.
  • [6] Sergi Elizalde. Descents on nonnesting multipermutations. European J. Combin., 121:Paper No. 103846, 23, 2024.
  • [7] P. Erdős and G. Szekeres. A combinatorial problem in geometry. Compositio Math., 2:463–470, 1935.
  • [8] Ira Gessel and Richard P. Stanley. Stirling polynomials. J. Combinatorial Theory Ser. A, 24(1):24–33, 1978.
  • [9] Hung P. Hoang and Torsten Mütze. Combinatorial generation via permutation languages. II. Lattice congruences. Israel J. Math., 244(1):359–417, 2021.
  • [10] Donald E. Knuth. The art of computer programming. Vol. 1. Addison-Wesley, Reading, MA, third edition, 1997. Fundamental algorithms.
  • [11] OEIS Foundation Inc. The On-Line Encyclopedia of Integer Sequences, 2023. Published electronically at http://oeis.org.
  • [12] Rodica Simion and Frank W. Schmidt. Restricted permutations. European J. Combin., 6(4):383–406, 1985.
  • [13] Richard P. Stanley. Enumerative combinatorics. Vol. 2, volume 62 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, Cambridge, 1999.
  • [14] Richard P. Stanley. Catalan numbers. Cambridge University Press, New York, 2015.