Introduction
Let π = π 1 ⋯ π n \pi= \pi_1 \cdots\pi_n π = π 1 ⋯ π n and τ = τ 1 ⋯ τ k \tau= \tau_1 \cdots\tau_k τ = τ 1 ⋯ τ k be permutations of length n n n and k k k , where 1 ≤ k ≤ n 1 \le k \le n 1 ≤ k ≤ n , expressed using the one-line notation. Then π \pi π is said to contain τ \tau τ if there is a subsequence of π \pi π that is order-isomorphic to τ \tau τ , i.e., there exist indices 1 ≤ i 1 < ⋯ < i k ≤ n 1 \le i_1 < \cdots< i_k \le n 1 ≤ i 1 < ⋯ < i k ≤ n such that π i a > π i b \pi_{i_a} > \pi_{i_b} π i a > π i b if and only if τ a > τ b \tau_a > \tau_b τ a > τ b for all $1 \le a,b \le k. If no such subsequence exists, then π \pi π is said to avoid τ \tau τ , and in this context, τ \tau τ is often referred to as a (classical) pattern. By a partition of a finite set, it is meant a collection of nonempty, pairwise disjoint subsets, called blocks, whose union is the set. Let R n \mathcal{R}_n R n denote the set of all partitions of [ n ] [n] [ n ] . In this paper, we consider the pattern avoidance problem on a certain kind of sequential representation for members of R n \mathcal{R}_n R n .
Let Π = B 1 / B 2 / ⋯ / B k ∈ R n \Pi= B_1/B_2/\cdots/B_k \in\mathcal{R}_n Π = B 1 / B 2 / ⋯ / B k ∈ R n , where the elements within each block B i B_i B i are in increasing order and blocks are arranged from left to right in ascending order of their smallest elements. Such a partition is said to be in standard form. Callan [3 ] defined the flattening of Π \Pi Π , denoted by flatten ( Π ) \operatorname{flatten}(\Pi) flatten ( Π ) , as the permutation of [ n ] [n] [ n ] obtained by arranging the blocks of Π \Pi Π in standard form, removing the block separators and considering the resulting word. For example, if n = 9 n=9 n = 9 and Π = { 6 , 4 , 3 } / { 5 } / { 1 , 2 , 9 } / { 8 , 7 } \Pi= \{6,4,3\}/\{5\}/\{1,2,9\}/\{8,7\} Π = { 6 , 4 , 3 } / { 5 } / { 1 , 2 , 9 } / { 8 , 7 } is a member of R 9 \mathcal{R}_9 R 9 , then the standard form of Π \Pi Π is { 1 , 2 , 9 } / { 3 , 4 , 6 } / { 5 } / { 7 , 8 } \{1,2,9\}/\{3,4,6\}/\{5\}/\{7,8\} { 1 , 2 , 9 } / { 3 , 4 , 6 } / { 5 } / { 7 , 8 } and flatten ( Π ) = 129346578 \operatorname{flatten}(\Pi) = 129346578 flatten ( Π ) = 129346578 . Note that the flattening operation is in general not injective, as distinct set partitions can produce the same permutation. In this work, we treat the resulting permutation of length n n n as a combinatorial object in its own right and refer to it as a distinct flattened partition.
Let P n \mathcal{P}_n P n denote the set of all distinct flattened partitions of [ n ] [n] [ n ] . For example, if n = 4 n=4 n = 4 , then we have P 4 = { 1234 , 1243 , 1324 , 1342 , 1423 } \mathcal{P}_4=\{1234,1243,1324,1342,1423\} P 4 = { 1234 , 1243 , 1324 , 1342 , 1423 } . In [13 ] , a bijection was defined between P n + 1 \mathcal{P}_{n+1} P n + 1 and R n \mathcal{R}_n R n , and hence ∣ P n + 1 ∣ = B n |\mathcal{P}_{n+1}|=B_n ∣ P n + 1 ∣ = B n for all n ≥ 0 n\geq0 n ≥ 0 , where B n B_n B n denotes the n n n -th Bell number. A run of elements within a permutation is a maximal sequence of consecutive increasing entries. For example, if σ = 178263495 \sigma=178263495 σ = 178263495 , then there are four runs, namely, 178, 26, 349 and 5. Note that P n \mathcal{P}_n P n is seen to comprise the subset of permutations of length n n n whose elements that start runs form an increasing subsequence. This structure is inherited from the standard form of the underlying set partitions.
The first systematic study of pattern avoidance in flattened structures was undertaken by Callan [3 ] , who initiated the enumeration of set partitions according to the avoidance of patterns in their flattenings. Specifically, for a pattern τ \tau τ , he considered the subset of R n \mathcal{R}_n R n whose members when flattened avoid τ \tau τ and determined the counting sequences for all patterns τ \tau τ of length three. Liu and Zhang [7 ] extended the results of Callan to several patterns of length four, partially addressing a problem posed by Mansour [8 ] , Research Direction 3.2. An analogous notion of flattening has also been considered on permutations wherein the role of the blocks is played by cycles expressed in standard form. See respectively [9 ] and [11 ] for comparable results concerning the avoidance of a pattern of length three by flattened permutations and derangements.
Instead of considering restrictions on the underlying set of partitions, Nabawanda and Rakotondrajao [12 ] looked at the avoidance problem on the set P n \mathcal{P}_n P n of distinct permutations that arise from the flattening process. Given a pattern τ \tau τ , let P n ( τ ) \mathcal{P}_n(\tau) P n ( τ ) denote the subset of P n \mathcal{P}_n P n whose members avoid τ \tau τ and let p n ( τ ) = ∣ P n ( τ ) ∣ p_n(\tau)=|\mathcal{P}_n(\tau)| p n ( τ ) = ∣ P n ( τ ) ∣ for n ≥ 1 n\geq1 n ≥ 1 . In [12 ] , the authors considered the avoidance of one or more patterns of length three by members of P n \mathcal{P}_n P n . We summarize in Table 1 below the formulas that were found in [12 ] for p n ( τ ) p_n(\tau) p n ( τ ) , where τ ∈ S 3 \tau\in S_3 τ ∈ S 3 . Here, C n = 1 n + 1 ( 2 n n ) C_n=\frac{1}{n+1}\binom{2n}{n} C n = n + 1 1 ( n 2 n ) and M n M_n M n denote the n n n -th Catalan and Motzkin numbers, respectively, and all formulas hold for n ≥ 1 n\geq1 n ≥ 1 , except in the case of 213/312, where n ≥ 2 n\geq2 n ≥ 2 . In this paper, we extend these results to τ ∈ S 4 \tau\in S_4 τ ∈ S 4 and determine the complete Wilf-classification for the avoidance of a single pattern of length four by distinct flattened partitions up to one conjectured equivalence (see Table 2 in the final section).
Members of P n \mathcal{P}_n P n have also recently been studied with regard to their containment/avoidance of consecutive patterns, and generating function formulas enumerating members of P n \mathcal{P}_n P n according to the number of occurrences of a pattern of length three were found in [10 ] . See also [13 ] , where the distribution of the statistic tracking the number of runs on P n \mathcal{P}_n P n was studied. Variants of the notion of flattening have also been recently considered on other discrete structures, such as Catalan words [1 ] , Stirling permutations [2 ] and parking functions [5 ] . Note that the flattening idea seems to have originated with the work of Carlitz [4 ] , who considered flattened permutations in his definition of a certain kind of inversion statistic on S n S_n S n .
The main results of this paper are given in Theorems 1.1 and 1.2 below and are proven over the next three sections.
Theorem 1.1. We have p n ( τ ) = C n − 1 p_n(\tau)=C_{n-1} p n ( τ ) = C n − 1 for all n ≥ 1 n\geq1 n ≥ 1 and each τ ∈ { 1432 , 2143 , 2314 , 2413 , 3142 , 3412 , 4132 } \tau\in\{1432,2143,2314,2413,3142,3412,4132\} τ ∈ { 1432 , 2143 , 2314 , 2413 , 3142 , 3412 , 4132 } .
Theorem 1.2. We have p n ( τ ) = ∑ k = 0 n − 2 ( n − 2 k ) C k p_n(\tau)=\sum_{k=0}^{n-2}\binom{n-2}{k}C_k p n ( τ ) = ∑ k = 0 n − 2 ( k n − 2 ) C k for all n ≥ 2 n\geq2 n ≥ 2 and each τ ∈ { 3214 , 4213 , 4312 } \tau\in\{3214,4213,4312\} τ ∈ { 3214 , 4213 , 4312 } .
Note that Theorem 1.1 follows from combining Theorems 2.6 and 3.3 , Corollaries 2.4 and 3.8 and Proposition 5.1 below (together with the fact p n ( 321 ) = C n − 1 p_n(321)=C_{n-1} p n ( 321 ) = C n − 1 ). From Theorem 1.1 , one obtains some apparently new combinatorial interpretations for the Catalan number sequence in terms of pattern avoidance. See [15 ] for a comprehensive list of discrete structures already known to be enumerated by C n C_n C n . Combining Corollary 4.5 with Theorem 4.8 below yields Theorem 1.2 , which provides some new structures enumerated by the binomial transform of Catalan sequence (see A007317 in [14 ] ). We will make use of the generating function formulas
∑ n ≥ 0 C n x n = 1 − 1 − 4 x 2 x \sum_{n\geq0} C_n x^n = \frac{1-\sqrt{1-4x}}{2x} n ≥ 0 ∑ C n x n = 2 x 1 − 1 − 4 x
and
∑ n ≥ 0 ∑ k = 0 n ( n k ) C k x n = 1 − x − 1 − 6 x + 5 x 2 2 x ( 1 − x ) . \sum_{n\geq0}\sum_{k=0}^{n}\binom{n}{k}C_kx^n = \frac{1-x-\sqrt{1-6x+5x^2}}{2x(1-x)}. n ≥ 0 ∑ k = 0 ∑ n ( k n ) C k x n = 2 x ( 1 − x ) 1 − x − 1 − 6 x + 5 x 2 .
and often denote the former by C = C ( x ) C=C(x) C = C ( x ) .
The organization of this paper is as follows. In the next two sections, we show p n ( τ ) = C n − 1 p_n(\tau)=C_{n-1} p n ( τ ) = C n − 1 for τ ∈ { 2413 , 3412 , 3142 , 2143 , 2314 } \tau\in\{2413,3412,3142,2143,2314\} τ ∈ { 2413 , 3412 , 3142 , 2143 , 2314 } , and in the fourth section, we prove Theorem 1.2 . Note that these results are obtained as specific cases of more general formulas involving the distributions of certain statistics on the respective avoidance classes. In the final section, some enumerative results for singleton Wilf-classes are found and a general criterion is given for when the patterns τ \tau τ and 1 ( τ + 1 ) 1(\tau+1) 1 ( τ + 1 ) are equivalent on P n \mathcal{P}_n P n . Furthermore, a couple of conjectures are raised, one concerning an equivalence and another an enumeration. Our results for the enumeration/classification of patterns of length four are summarized in Table 2 .
Table 2. Wilf-equivalence classes and avoidance sequences (for 1 ≤ n ≤ 10 1 \le n \le10 1 ≤ n ≤ 10 ) for patterns of length four
We briefly describe now our methods as follows. To establish our results, we first consider various refinements of the sequences p n ( τ ) p_n(\tau) p n ( τ ) based on certain statistics on P n \mathcal{P}_n P n which are specific to the pattern at hand. These refinements lead to arrays with two or three parameters, for which one is able to write a recurrence (whereas finding a recurrence a priori for the sequence p n ( τ ) p_n(\tau) p n ( τ ) by direct combinatorial reasoning may not be possible). The statistics that proved useful here in identifying an appropriate array for writing a recurrence included ones tracking the second or last letter, the last two letters or the final letter in the first run. Still other parameters were needed in finding a recurrence once a suitable array had been identified, such as the length of the first run or the letter directly following n n n (if it exists). We then defined certain generating functions, often based on the form of the recurrence, for the aforementioned arrays and/or their row sums. Translating the recurrences to generating functions, sometimes a difficult step, then leads to a single functional equation or a system. We then proceed to find an explicit solution of the functional equation(s) in its full generality, using the kernel method (see, e.g., [6 ] ) or other techniques. Taking all of the auxiliary variables to be unity in this solution then yields a formula for the generating function of the sequence p n ( τ ) p_n(\tau) p n ( τ ) , from which one may deduce the desired avoidance result.
The patterns 2413, 3412 and 3142
We first establish the cases 2413 and 3412, which may be treated simultaneously due to the similarity of their arguments. Recall that a descent within a sequence σ = σ 1 ⋯ σ m \sigma=\sigma_1\cdots\sigma_m σ = σ 1 ⋯ σ m corresponds to an index i ∈ [ m − 1 ] i\in[m-1] i ∈ [ m − 1 ] such that σ i > σ i + 1 \sigma_i>\sigma_{i+1} σ i > σ i + 1 . The actual entries σ i \sigma_i σ i and σ i + 1 \sigma_{i+1} σ i + 1 are referred to as the top and bottom of the descent. Note that P n \mathcal{P}_n P n consists of those permutations of length n n n that start with 1 whose descent bottoms from left to right form an increasing sequence. In particular, no member of P n \mathcal{P}_n P n contains two consecutive descents.
Let u n = p n ( 2413 ) u_n=p_n(2413) u n = p n ( 2413 ) and v n = p n ( 3412 ) v_n=p_n(3412) v n = p n ( 3412 ) for n ≥ 1 n\geq1 n ≥ 1 . In order to write recurrences, we consider the arrays u n , i u_{n,i} u n , i and v n , i v_{n,i} v n , i enumerating respectively the members of U n = P n ( 2413 ) \mathcal{U}_n=\mathcal{P}_n(2413) U n = P n ( 2413 ) and V n = P n ( 3412 ) \mathcal{V}_n=\mathcal{P}_n(3412) V n = P n ( 3412 ) having last letter i i i for 1 ≤ i ≤ n 1\leq i\leq n 1 ≤ i ≤ n . Note that u n , 1 = v n , 1 = δ n , 1 u_{n,1}=v_{n,1}=\delta_{n,1} u n , 1 = v n , 1 = δ n , 1 for n ≥ 1 n\geq1 n ≥ 1 .
The u n , i u_{n,i} u n , i and v n , i v_{n,i} v n , i are given recursively as follows.
Lemma 2.1. If n ≥ 4 n\geq4 n ≥ 4 , then
u n , i = u n − 1 , i + ∑ j = 2 i − 1 ∑ m = 0 n − i − 1 u j + m , j u n − m − j , i − j + 1 , 3 ≤ i ≤ n − 1 (1) u_{n,i}=u_{n-1,i}+\sum_{j=2}^{i-1}\sum_{m=0}^{n-i-1}u_{j+m,j}u_{n-m-j,i-j+1},\qquad3\leq i\leq n-1 \tag*{(1)} u n , i = u n − 1 , i + j = 2 ∑ i − 1 m = 0 ∑ n − i − 1 u j + m , j u n − m − j , i − j + 1 , 3 ≤ i ≤ n − 1 (1) and
v n , i = v n − 1 , i + ∑ j = 2 i − 1 ∑ m = 0 i − j − 1 v i − m − 1 , j v n + m − i + 1 , m + 2 , 3 ≤ i ≤ n − 1 (2) v_{n,i}=v_{n-1,i}+\sum_{j=2}^{i-1}\sum_{m=0}^{i-j-1}v_{i-m-1,j}v_{n+m-i+1,m+2},\qquad3\leq i\leq n-1 \tag*{(2)} v n , i = v n − 1 , i + j = 2 ∑ i − 1 m = 0 ∑ i − j − 1 v i − m − 1 , j v n + m − i + 1 , m + 2 , 3 ≤ i ≤ n − 1 (2) with u n , 2 = v n , 2 = 1 u_{n,2}=v_{n,2}=1 u n , 2 = v n , 2 = 1 , u n , n = u n − 1 u_{n,n}=u_{n-1} u n , n = u n − 1 and v n , n = v n − 1 v_{n,n}=v_{n-1} v n , n = v n − 1 for all $n\geq 2.
Proof. Let U n , i \mathcal{U}_{n,i} U n , i and V n , i \mathcal{V}_{n,i} V n , i denote respectively the subsets of U n \mathcal{U}_n U n and V n \mathcal{V}_n V n enumerated by u n , i u_{n,i} u n , i and v n , i v_{n,i} v n , i . Note that U n , 2 \mathcal{U}_{n,2} U n , 2 and V n , 2 \mathcal{V}_{n,2} V n , 2 are singletons consisting of the sequence 134 ⋯ n 2 134\cdots n2 134 ⋯ n 2 , whereas members of U n , n \mathcal{U}_{n,n} U n , n and V n , n \mathcal{V}_{n,n} V n , n are synonymous with those in U n − 1 \mathcal{U}_{n-1} U n − 1 and V n − 1 \mathcal{V}_{n-1} V n − 1 , which implies the conditions stated for i = 2 , n i=2,n i = 2 , n . So assume n ≥ 4 n \ge4 n ≥ 4 , where 3 ≤ i ≤ n − 1 3 \le i \le n-1 3 ≤ i ≤ n − 1 , and we first show (1). To do so, consider whether or not n n n is the penultimate letter of π ∈ U n , i \pi\in\mathcal{U}_{n,i} π ∈ U n , i with 3 ≤ i ≤ n − 1 3 \le i \le n-1 3 ≤ i ≤ n − 1 . If so, then n n n may clearly be deleted yielding u n − 1 , i u_{n-1,i} u n − 1 , i possibilities. If not, then consider the letter j j j directly succeeding n n n within π \pi π . Note j j j being a descent bottom implies j ∈ [ 2 , i − 1 ] j \in[2,i-1] j ∈ [ 2 , i − 1 ] . Suppose π = α n j β i \pi=\alpha nj\beta i π = α nj β i (*), where β \beta β is possibly empty. Since j j j is a descent bottom, all letters in [ j − 1 ] [j-1] [ j − 1 ] must occur in α \alpha α . Further, the set of letters in [ j + 1 , n − 1 ] [j+1,n-1] [ j + 1 , n − 1 ] occurring within α \alpha α must comprise an interval of the form [ n − m , n − 1 ] [n-m,n-1] [ n − m , n − 1 ] , for otherwise, a 2413 would occur wherein the roles of the ‘4’ and ‘1’ are played by n n n and j j j . Note that i i i occurring to the right of j j j implies 0 ≤ m ≤ n − i − 1 0 \le m \le n-i-1 0 ≤ m ≤ n − i − 1 . Thus, the sections α j \alpha j α j and j β i j\beta i j β i are 2413-avoiding flattened partitions comprising the letters in [ j ] ∪ [ n − m , n − 1 ] [j]\cup[n-m,n-1] [ j ] ∪ [ n − m , n − 1 ] and [ j , n − m − 1 ] [j,n-m-1] [ j , n − m − 1 ] , respectively. Upon standardizing, we have α j ∈ U j + m , j \alpha j \in\mathcal{U}_{j+m,j} α j ∈ U j + m , j and j β i ∈ U n − m − j , i − j + 1 j\beta i \in\mathcal{U}_{n-m-j,i-j+1} j β i ∈ U n − m − j , i − j + 1 .
Furthermore, we have that all π \pi π of the form () where α \alpha α and β \beta β are as described above, indeed avoid 2413. To see this, first note by requiring that α j \alpha j α j (and not just α \alpha α by itself) avoid 2413, we eliminate the possibility of a 2413 arising when the sections α \alpha α and β \beta β are combined to form π \pi π as in ( ). If such a 2413 were to arise, the ‘2’ and ‘1’ would be played by letters in [ j − 1 ] [j-1] [ j − 1 ] , with the ‘3’ belonging to [ j , n − m − 1 ] [j,n-m-1] [ j , n − m − 1 ] . Note that indeed any letter in [ j , n − m − 1 ] [j,n-m-1] [ j , n − m − 1 ] could serve as the ‘3’ due to its lying to the right of α \alpha α , and hence α j \alpha j α j avoiding such a 2413 implies π \pi π does as well. Moreover, there can clearly be no occurrence of 2413 in π \pi π of the form () with α , β \alpha,\beta α , β as stated wherein an element of [ n − m , n − 1 ] [n-m,n-1] [ n − m , n − 1 ] serves as the ‘2’, as all letters to the right of n n n are less than n − m n-m n − m . Thus, the conditions stated in the preceding paragraph are both necessary and sufficient for π \pi π of the form ( ) to avoid 2413. Considering all possible j j j and m m m then implies that the double summation expression on the right-hand side of (1) enumerates all members of U n , i \mathcal{U}_{n,i} U n , i whose penultimate letter is not n n n . When taken together with the first case above, one obtains recurrence (1).
A similar argument applies to (2). Suppose π ∈ V n , i \pi\in\mathcal{V}_{n,i} π ∈ V n , i whose penultimate letter is not n n n is decomposed as in (*). Then all letters in β i \beta i β i must now be greater than those in α \alpha α , for otherwise there would be a 3412 wherein the roles of ‘4’ and ‘1’ are played by n n n and j j j . Therefore, the letters in β i \beta i β i must comprise [ n − m , n − 1 ] [n-m,n-1] [ n − m , n − 1 ] for some m ≥ 1 m \ge1 m ≥ 1 . Note j + 1 ≤ n − m ≤ i j+1 \le n-m \le i j + 1 ≤ n − m ≤ i implies n − i ≤ m ≤ n − j − 1 n-i \le m \le n-j-1 n − i ≤ m ≤ n − j − 1 . Analogous to before, the requirement that the sections α j \alpha j α j and j β i j\beta i j β i both avoid 3412, with j β i j\beta i j β i comprising [ n − m , n − 1 ] [n-m,n-1] [ n − m , n − 1 ] for some m m m as given, is seen to be both necessary and sufficient for π \pi π to avoid 3412. Note that within j β i j\beta i j β i , the letter n − m n-m n − m serves as the 2, and hence i i i acts as i − ( n − m − 2 ) i-(n-m-2) i − ( n − m − 2 ) , in this flattened partition of size m + 1 m+1 m + 1 . Thus, the sections α j \alpha j α j and j β i j\beta i j β i on their respective alphabets are seen to correspond to members of V n − m − 1 , j \mathcal{V}_{n-m-1,j} V n − m − 1 , j and V m + 1 , i − n + m + 2 \mathcal{V}_{m+1,i-n+m+2} V m + 1 , i − n + m + 2 . Considering all possible j j j and m m m , and replacing m m m by m + n − i m+n-i m + n − i , then accounts for the summation expression in (2) and completes the proof. □
Define the distribution polynomials u n ( y ) = ∑ i = 1 n u n , i y i − 1 u_n(y)=\sum_{i=1}^{n}u_{n,i}y^{i-1} u n ( y ) = ∑ i = 1 n u n , i y i − 1 and v n ( y ) = ∑ i = 1 n v n , i y i − 1 v_n(y)=\sum_{i=1}^{n}v_{n,i}y^{i-1} v n ( y ) = ∑ i = 1 n v n , i y i − 1 for n ≥ 1 n\ge1 n ≥ 1 .
Lemma 2.2. If n ≥ 3 n\ge3 n ≥ 3 , then
u n ( y ) = y n − 1 u n − 1 ( 1 ) + u n − 1 ( y ) + ∑ m = 2 n − 2 u m ( y ) u n − m ( y ) (3) u_n(y)=y^{n-1}u_{n-1}(1)+u_{n-1}(y)+\sum_{m=2}^{n-2}u_m(y)u_{n-m}(y) \tag*{(3)} u n ( y ) = y n − 1 u n − 1 ( 1 ) + u n − 1 ( y ) + m = 2 ∑ n − 2 u m ( y ) u n − m ( y ) (3)
and
v n ( y ) = y n − 1 v n − 1 ( 1 ) + v n − 1 ( y ) + ∑ m = 2 n − 2 y n − m − 1 v m ( y ) v n − m ( 1 ) , (4) v_n(y)=y^{n-1}v_{n-1}(1)+v_{n-1}(y)+\sum_{m=2}^{n-2}y^{n-m-1}v_m(y)v_{n-m}(1), \tag*{(4)} v n ( y ) = y n − 1 v n − 1 ( 1 ) + v n − 1 ( y ) + m = 2 ∑ n − 2 y n − m − 1 v m ( y ) v n − m ( 1 ) , (4)
with u 1 ( y ) = v 1 ( y ) = 1 u_1(y)=v_1(y)=1 u 1 ( y ) = v 1 ( y ) = 1 and u 2 ( y ) = v 2 ( y ) = y u_2(y)=v_2(y)=y u 2 ( y ) = v 2 ( y ) = y .
Proof. Multiplying both sides of (1) by y i − 1 y^{i-1} y i − 1 , and summing over 3 ≤ i ≤ n − 1 3\le i\le n-1 3 ≤ i ≤ n − 1 , yields
u n ( y ) = y + u n − 1 y n − 1 + ∑ i = 3 n − 1 u n − 1 , i y i − 1 + ∑ i = 2 n − 1 y i − 1 ∑ j = 2 i − 1 ∑ m = 0 n − i − 1 u j + m , j u n − m − j , i − j + 1 = y n − 1 u n − 1 ( 1 ) + u n − 1 ( y ) + ∑ j = 2 n − 2 ∑ i = j + 1 n − 1 y i − 1 ∑ m = 0 n − i − 1 u j + m , j u n − m − j , i − j + 1 . \begin{aligned}
u_n(y)=y+u_{n-1}y^{n-1}+\sum_{i=3}^{n-1}u_{n-1,i}y^{i-1}+\sum_{i=2}^{n-1}y^{i-1}\sum_{j=2}^{i-1}\sum_{m=0}^{n-i-1}u_{j+m,j}u_{n-m-j,i-j+1} \\
&=y^{n-1}u_{n-1}(1)+u_{n-1}(y)+\sum_{j=2}^{n-2}\sum_{i=j+1}^{n-1}y^{i-1}\sum_{m=0}^{n-i-1}u_{j+m,j}u_{n-m-j,i-j+1}.
\end{aligned} u n ( y ) = y + u n − 1 y n − 1 + i = 3 ∑ n − 1 u n − 1 , i y i − 1 + i = 2 ∑ n − 1 y i − 1 j = 2 ∑ i − 1 m = 0 ∑ n − i − 1 u j + m , j u n − m − j , i − j + 1 = y n − 1 u n − 1 ( 1 ) + u n − 1 ( y ) + j = 2 ∑ n − 2 i = j + 1 ∑ n − 1 y i − 1 m = 0 ∑ n − i − 1 u j + m , j u n − m − j , i − j + 1 .
Working on the preceding sum, we have
∑ j = 2 n − 2 ∑ i = j + 1 n − 1 y i − 1 ∑ m = 0 n − i − 1 u j + m , j u n − m − j , i − j + 1 = ∑ j = 2 n − 2 ∑ m = 0 n − j − 2 u j + m , j ∑ i = j + 1 n − m − 1 u n − m − j , i − j + 1 y i − 1 = ∑ j = 2 n − 2 ∑ m = 0 n − j − 2 u j + m , j y j − 1 ∑ i = 2 n − m − j u n − m − j , i y i − 1 = ∑ j = 2 n − 2 ∑ m = 0 n − j − 2 y j − 1 u j + m , j u n − m − j ( y ) = ∑ j = 2 n − 2 ∑ m = j n − 2 y j − 1 u m , j u n − m ( y ) = ∑ m = 2 n − 2 u n − m ( y ) ∑ j = 2 m u m , j y j − 1 = ∑ m = 2 n − 2 u m ( y ) u n − m ( y ) , \begin{aligned}
&\sum_{j=2}^{n-2}\sum_{i=j+1}^{n-1}y^{i-1}\sum_{m=0}^{n-i-1}u_{j+m,j}u_{n-m-j,i-j+1}\\
&=\sum_{j=2}^{n-2}\sum_{m=0}^{n-j-2}u_{j+m,j}\sum_{i=j+1}^{n-m-1}u_{n-m-j,i-j+1}y^{i-1}\\
&=\sum_{j=2}^{n-2}\sum_{m=0}^{n-j-2}u_{j+m,j}y^{j-1}\sum_{i=2}^{n-m-j}u_{n-m-j,i}y^{i-1}
=\sum_{j=2}^{n-2}\sum_{m=0}^{n-j-2}y^{j-1}u_{j+m,j}u_{n-m-j}(y)\\
&=\sum_{j=2}^{n-2}\sum_{m=j}^{n-2}y^{j-1}u_{m,j}u_{n-m}(y)
=\sum_{m=2}^{n-2}u_{n-m}(y)\sum_{j=2}^{m}u_{m,j}y^{j-1}
=\sum_{m=2}^{n-2}u_m(y)u_{n-m}(y),
\end{aligned} j = 2 ∑ n − 2 i = j + 1 ∑ n − 1 y i − 1 m = 0 ∑ n − i − 1 u j + m , j u n − m − j , i − j + 1 = j = 2 ∑ n − 2 m = 0 ∑ n − j − 2 u j + m , j i = j + 1 ∑ n − m − 1 u n − m − j , i − j + 1 y i − 1 = j = 2 ∑ n − 2 m = 0 ∑ n − j − 2 u j + m , j y j − 1 i = 2 ∑ n − m − j u n − m − j , i y i − 1 = j = 2 ∑ n − 2 m = 0 ∑ n − j − 2 y j − 1 u j + m , j u n − m − j ( y ) = j = 2 ∑ n − 2 m = j ∑ n − 2 y j − 1 u m , j u n − m ( y ) = m = 2 ∑ n − 2 u n − m ( y ) j = 2 ∑ m u m , j y j − 1 = m = 2 ∑ n − 2 u m ( y ) u n − m ( y ) ,
which implies (3) . Formula (4) may be shown in a comparable manner starting with (2).
Let U ( x , y ) = ∑ n ≥ 1 u n ( y ) x n U(x,y)=\sum_{n\geq1}u_n(y)x^n U ( x , y ) = ∑ n ≥ 1 u n ( y ) x n and V ( x , y ) = ∑ n ≥ 1 v n ( y ) x n V(x,y)=\sum_{n\geq1}v_n(y)x^n V ( x , y ) = ∑ n ≥ 1 v n ( y ) x n .
Theorem 2.3. We have
U ( x , y ) = 1 + x − 1 − 4 x + x 2 + 2 x 1 − 4 x y 2 (5) U(x,y)=\frac{1+x-\sqrt{1-4x+x^2+2x\sqrt{1-4xy}}}{2} \tag*{(5)} U ( x , y ) = 2 1 + x − 1 − 4 x + x 2 + 2 x 1 − 4 x y (5) and
V ( x , y ) = x ( 3 y − 2 + 2 x − 2 x y − y 1 − 4 x y ) 2 ( y − 1 + x ) . (6) V(x,y)=\frac{x(3y-2+2x-2xy-y\sqrt{1-4xy})}{2(y-1+x)}. \tag*{(6)} V ( x , y ) = 2 ( y − 1 + x ) x ( 3 y − 2 + 2 x − 2 x y − y 1 − 4 x y ) . (6)
Proof. Multiplying both sides of (3) by x n x^n x n , and summing over all n ≥ 3 n\geq3 n ≥ 3 , we obtain
U ( x , y ) = x + x 2 y + x ( U ( x y , 1 ) − x y ) + x ( U ( x , y − x ) + ∑ n ≥ 4 x n ∑ m = 2 n − 2 u m ( y ) u n − m ( y ) ) = x − x 2 + x ( U ( x y , 1 ) + U ( x , y ) ) + ∑ m ≥ 2 u m ( y ) ∑ n ≥ m + 2 u n − m ( y ) x n = x − x 2 + x ( U ( x y , 1 ) + U ( x , y ) ) + ( U ( x , y ) − x ) 2 . (7) \begin{aligned}
U(x,y)&=x+x^2y+x(U(xy,1)-xy)+x\left(U(x,y-x)+\sum_{n\geq4}x^n\sum_{m=2}^{n-2}u_m(y)u_{n-m}(y)\right)\\
&=x-x^2+x(U(xy,1)+U(x,y))+\sum_{m\geq2}u_m(y)\sum_{n\geq m+2}u_{n-m}(y)x^n\\
&=x-x^2+x(U(xy,1)+U(x,y))+(U(x,y)-x)^2. \tag*{(7)}
\end{aligned} U ( x , y ) = x + x 2 y + x ( U ( x y , 1 ) − x y ) + x ( U ( x , y − x ) + n ≥ 4 ∑ x n m = 2 ∑ n − 2 u m ( y ) u n − m ( y ) ) = x − x 2 + x ( U ( x y , 1 ) + U ( x , y )) + m ≥ 2 ∑ u m ( y ) n ≥ m + 2 ∑ u n − m ( y ) x n = x − x 2 + x ( U ( x y , 1 ) + U ( x , y )) + ( U ( x , y ) − x ) 2 . (7)
Taking y = 1 y=1 y = 1 in (7) implies p = U ( x , 1 ) p=U(x,1) p = U ( x , 1 ) satisfies p 2 − p + x p^2-p+x p 2 − p + x , and hence p = 1 − 1 − 4 x 2 = x C p=\frac{1-\sqrt{1-4x}}{2}=xC p = 2 1 − 1 − 4 x = x C , where the choice of the negative root is dictated by the condition U ( 0 , 1 ) = 0 U(0,1)=0 U ( 0 , 1 ) = 0 . Substituting U ( x y , 1 ) = 1 − 1 − 4 x y 2 U(xy,1)=\frac{1-\sqrt{1-4xy}}{2} U ( x y , 1 ) = 2 1 − 1 − 4 x y into (7) implies
U ( x , y ) 2 − ( 1 + x ) U ( x , y ) + x 2 ( 3 − 1 − 4 x y ) = 0 , U(x,y)^2-(1+x)U(x,y)+\frac{x}{2}\left(3-\sqrt{1-4xy}\right)=0, U ( x , y ) 2 − ( 1 + x ) U ( x , y ) + 2 x ( 3 − 1 − 4 x y ) = 0 ,
and solving for U ( x , y ) U(x,y) U ( x , y ) in the last equation gives (5).
Using (4), one can show
V ( x , y ) = x − x 2 + x ( V ( x y , 1 ) + V ( x , y ) ) + 1 y ( V ( x , y ) − x ) ( V ( x y , 1 ) − x y ) . (8) V(x,y)=x-x^2+x(V(xy,1)+V(x,y))+\frac{1}{y}(V(x,y)-x)(V(xy,1)-xy). \tag*{(8)} V ( x , y ) = x − x 2 + x ( V ( x y , 1 ) + V ( x , y )) + y 1 ( V ( x , y ) − x ) ( V ( x y , 1 ) − x y ) . (8)
Taking y = 1 y=1 y = 1 in (8) implies V ( x , 1 ) = x C V(x,1)=xC V ( x , 1 ) = x C , as before. Substituting this back into (8) , and solving for V ( x , y ) V(x,y) V ( x , y ) , leads to (6) after some algebra.
Letting y = 1 y=1 y = 1 in Theorem 2.3 yields the following result.
Corollary 2.4. We have U ( x , 1 ) = V ( x , 1 ) = 1 − 1 − 4 x 2 = x C U(x,1)=V(x,1)=\frac{1-\sqrt{1-4x}}{2}=xC U ( x , 1 ) = V ( x , 1 ) = 2 1 − 1 − 4 x = x C , and hence p n ( 2413 ) = p n ( 3412 ) = C n − 1 p_n(2413)=p_n(3412)=C_{n-1} p n ( 2413 ) = p n ( 3412 ) = C n − 1 for all n ≥ 1 n\geq1 n ≥ 1 .
For the remainder of this section, we focus on the pattern 3142. Let w n = p n ( 3142 ) w_n = p_n(3142) w n = p n ( 3142 ) for n ≥ 1 n \ge1 n ≥ 1 . Given n ≥ 2 n \ge2 n ≥ 2 and 2 ≤ i ≤ n 2 \le i \le n 2 ≤ i ≤ n , let w n , i w_{n,i} w n , i enumerate those members of W n = P n ( 3142 ) \mathcal{W}_n = \mathcal{P}_n(3142) W n = P n ( 3142 ) whose second letter is i i i . Note that w n = ∑ i = 2 n w n , i w_n = \sum_{i=2}^{n} w_{n,i} w n = ∑ i = 2 n w n , i for n ≥ 2 n \ge2 n ≥ 2 , with w 1 = 1 w_1 = 1 w 1 = 1 .
The w n , i w_{n,i} w n , i are given recursively as follows.
Lemma 2.5. If n ≥ 3 n \ge3 n ≥ 3 , then
w n , i = w i − 2 w n − i + 2 , 3 ≤ i ≤ n , (9) w_{n,i} = w_{i-2}w_{n-i+2}, \qquad3 \le i \le n, \tag*{(9)} w n , i = w i − 2 w n − i + 2 , 3 ≤ i ≤ n , (9) with w n , 2 = w n − 1 w_{n,2} = w_{n-1} w n , 2 = w n − 1 for n ≥ 2 n \ge2 n ≥ 2 .
Proof. Let W n , i \mathcal{W}_{n,i} W n , i denote the subset of W n \mathcal{W}_n W n whose members have second letter i i i for 2 ≤ i ≤ n 2 \le i \le n 2 ≤ i ≤ n . Then members of W n , 2 \mathcal{W}_{n,2} W n , 2 are synonymous with those in W n − 1 \mathcal{W}_{n-1} W n − 1 , upon deletion of 2, which implies the initial condition for i = 2 i = 2 i = 2 . Suppose now π ∈ P n \pi\in\mathcal{P}_n π ∈ P n is expressible as
π = 1 i α 2 β γ , (10) \pi= 1i\alpha2\beta\gamma, \tag*{(10)} π = 1 i α 2 β γ , (10)
for some i ∈ [ 3 , n ] i \in[3,n] i ∈ [ 3 , n ] , where α \alpha α , β \beta β or γ \gamma γ may be empty, α \alpha α is a subset of [ i + 1 , n ] [i+1,n] [ i + 1 , n ] in increasing order, and the leftmost letter in [ i + 1 , n ] [i+1,n] [ i + 1 , n ] occurring to the right of 2 within π \pi π (if it exists) coincides with the first letter of γ \gamma γ . Let x x x denote the final letter of 2 β 2\beta 2 β . Then we have that π \pi π of the form (10) avoids the pattern 3142 if and only if the subsequences 2 β 2\beta 2 β and i α x γ i\alpha x\gamma i α x γ both avoid 3142, with 2 β 2\beta 2 β consisting of the letters in [ 2 , i − 1 ] [2,i-1] [ 2 , i − 1 ] . To see this, first note that no letter in [ 3 , i − 1 ] [3,i-1] [ 3 , i − 1 ] can occur in γ \gamma γ , whence these letters must all lie in β \beta β , for otherwise, there would be a 3142 as witnessed by i 2 y z i2yz i 2 y z , where y y y denotes the first letter of γ \gamma γ and z z z is some letter in γ \gamma γ that is less than i i i . Further, the letters in β \beta β all being smaller than those in γ \gamma γ rules out an occurrence of 3142 starting in β \beta β and ending in γ \gamma γ . Finally, by requiring that i α x γ i\alpha x\gamma i α x γ avoid 3142, one rules out any occurrences of the pattern whose first letter lies to the left of 2 or to the right of β \beta β .
To enumerate members of W n , i \mathcal{W}_{n,i} W n , i where 3 ≤ i ≤ n 3 \le i \le n 3 ≤ i ≤ n , first note that there are clearly w i − 2 w_{i-2} w i − 2 possibilities for 2 β 2\beta 2 β . Viewing x x x as the second smallest letter within the 3142-avoiding flattened partition i α x γ i\alpha x\gamma i α x γ , one has that it represents an arbitrary member of W n − i + 2 \mathcal{W}_{n-i+2} W n − i + 2 . Since the standardized forms of 2 β 2\beta 2 β and i α x γ i\alpha x\gamma i α x γ in (10) may be chosen independently of one another, the equality (9) follows, which completes the proof.
Let w n ( y ) = ∑ i = 2 n w n , i y i − 2 w_n(y) = \sum_{i=2}^{n} w_{n,i}y^{i-2} w n ( y ) = ∑ i = 2 n w n , i y i − 2 for n ≥ 2 n \ge2 n ≥ 2 and W ( x , y ) = ∑ n ≥ 2 w n ( y ) x n W(x,y) = \sum_{n\ge2}w_n(y)x^n W ( x , y ) = ∑ n ≥ 2 w n ( y ) x n .
Theorem 2.6. We have
W ( x , y ) = 1 − ( 1 + 2 x ) 1 − 4 x − ( 1 − 2 x ) 1 − 4 x y + ( 1 − 4 x ) ( 1 − 4 x y ) 4 , (11) W(x,y) = \frac{1-(1+2x)\sqrt{1-4x}-(1-2x)\sqrt{1-4xy}+\sqrt{(1-4x)(1-4xy)}}{4}, \tag*{(11)} W ( x , y ) = 4 1 − ( 1 + 2 x ) 1 − 4 x − ( 1 − 2 x ) 1 − 4 x y + ( 1 − 4 x ) ( 1 − 4 x y ) , (11) and, in particular, ∑ n ≥ 2 p n ( 3142 ) x n = W ( x , 1 ) = x ( C − 1 ) \sum_{n\ge2}p_n(3142)x^n = W(x,1) = x(C-1) ∑ n ≥ 2 p n ( 3142 ) x n = W ( x , 1 ) = x ( C − 1 ) .
Proof. By (9), we have
w n ( y ) = w n − 1 + ∑ i = 3 n y i − 2 w i − 2 w n − i + 2 = ( 1 + y ) w n − 1 ( 1 ) + ∑ i = 2 n − 2 y i w i ( 1 ) w n − i ( 1 ) , n ≥ 3 , (12) \begin{aligned}
w_n(y) = w_{n-1} + \sum_{i=3}^{n} y^{i-2}w_{i-2}w_{n-i+2} \\
&= (1+y)w_{n-1}(1) + \sum_{i=2}^{n-2} y^i w_i(1)w_{n-i}(1), \qquad n \ge3, \tag*{(12)}
\end{aligned} w n ( y ) = w n − 1 + i = 3 ∑ n y i − 2 w i − 2 w n − i + 2 = ( 1 + y ) w n − 1 ( 1 ) + i = 2 ∑ n − 2 y i w i ( 1 ) w n − i ( 1 ) , n ≥ 3 , (12)
with w 2 ( y ) = 1 w_2(y)=1 w 2 ( y ) = 1 . Multiplying both sides of (12) by x n x^n x n , and summing over all n ≥ 3 n \ge3 n ≥ 3 , yields
W ( x , y ) − x 2 = ( 1 + y ) ∑ n ≥ 3 w n − 1 ( 1 ) x n + ∑ n ≥ 4 x n ∑ i = 2 n − 2 y i w i ( 1 ) w n − i ( 1 ) = x ( 1 + y ) W ( x , 1 ) + ∑ i ≥ 2 y i w i ( 1 ) ∑ n ≥ i + 2 w n − i ( 1 ) x n = x ( 1 + y ) W ( x , 1 ) + W ( x , 1 ) W ( x y , 1 ) . (13) \begin{aligned}
W(x,y)-x^2=(1+y)\sum_{n\ge3}w_{n-1}(1)x^n+\sum_{n\ge4}x^n\sum_{i=2}^{n-2}y^iw_i(1)w_{n-i}(1) \\
&=x(1+y)W(x,1)+\sum_{i\ge2}y^iw_i(1)\sum_{n\ge i+2}w_{n-i}(1)x^n \\
&=x(1+y)W(x,1)+W(x,1)W(xy,1). \tag*{(13)}
\end{aligned} W ( x , y ) − x 2 = ( 1 + y ) n ≥ 3 ∑ w n − 1 ( 1 ) x n + n ≥ 4 ∑ x n i = 2 ∑ n − 2 y i w i ( 1 ) w n − i ( 1 ) = x ( 1 + y ) W ( x , 1 ) + i ≥ 2 ∑ y i w i ( 1 ) n ≥ i + 2 ∑ w n − i ( 1 ) x n = x ( 1 + y ) W ( x , 1 ) + W ( x , 1 ) W ( x y , 1 ) . (13)
Taking y = 1 y=1 y = 1 in (13) implies p = W ( x , 1 ) p=W(x,1) p = W ( x , 1 ) satisfies p 2 − ( 1 − 2 x ) p + x 2 = 0 p^2-(1-2x)p+x^2=0 p 2 − ( 1 − 2 x ) p + x 2 = 0 , and hence p = x ( C − 1 ) p=x(C-1) p = x ( C − 1 ) . Substituting this back into (13), and simplifying, yields (11) and completes the proof.
2143 and 2314
We first consider the case of avoiding 2143. Given n ≥ 2 n \ge2 n ≥ 2 and 2 ≤ i ≤ n 2 \le i \le n 2 ≤ i ≤ n , let a n , i a_{n,i} a n , i denote the number of members of P n ( 2143 ) \mathcal{P}_n(2143) P n ( 2143 ) whose second letter is i i i . Let a n = p n ( 2143 ) a_n=p_n(2143) a n = p n ( 2143 ) , and hence a n = ∑ i = 2 n a n , i a_n=\sum_{i=2}^{n}a_{n,i} a n = ∑ i = 2 n a n , i for n ≥ 2 n\ge2 n ≥ 2 , with a 1 = 1 a_1=1 a 1 = 1 . In order to write recurrences, we consider the restriction a n , i ∗ a_{n,i}^{*} a n , i ∗ of a n , i a_{n,i} a n , i enumerating only those members of P n ( 2143 ) \mathcal{P}_n(2143) P n ( 2143 ) that start 1 i 2 1i2 1 i 2 , where n ≥ 3 n\ge3 n ≥ 3 and i ∈ [ 3 , n ] i\in[3,n] i ∈ [ 3 , n ] . For example, if n = 5 n=5 n = 5 and i = 3 i=3 i = 3 , then we have a 5 , 3 = 4 a_{5,3}=4 a 5 , 3 = 4 (the enumerated partitions being 13245 13245 13245 , 13425 13425 13425 , 13452 13452 13452 , 13524 13524 13524 ) and a 5 , 3 ∗ = 1 a_{5,3}^{*}=1 a 5 , 3 ∗ = 1 (accounted for by 13245 13245 13245 ).
The arrays a n , i a_{n,i} a n , i and a n , i ∗ a_{n,i}^{*} a n , i ∗ satisfy the following system of recurrences.
Lemma 3.1. If n ≥ 3 n\ge3 n ≥ 3 , then
a n , i = ∑ j = 0 n − i ( n − i j ) a n − j , i ∗ , 3 ≤ i ≤ n , (14) a_{n,i}=\sum_{j=0}^{n-i}\binom{n-i}{j}a_{n-j,i}^{*},\qquad3\le i\le n, \tag*{(14)} a n , i = j = 0 ∑ n − i ( j n − i ) a n − j , i ∗ , 3 ≤ i ≤ n , (14) with a n , 2 = a n − 1 a_{n,2}=a_{n-1} a n , 2 = a n − 1 for all n ≥ 2 n\ge2 n ≥ 2 . If n ≥ 5 n\ge5 n ≥ 5 , then
a n , i ∗ = ∑ m = 0 n − i a n − m − 1 , i − 1 ∗ + ∑ k = 4 i − 1 ∑ j = 0 i − k − 1 ∑ m = 0 n − i ( i − k − 1 j ) a n − j − m − 2 , k − 1 ∗ , 4 ≤ i ≤ n − 1 , (15) a_{n,i}^{*}=\sum_{m=0}^{n-i}a_{n-m-1,i-1}^{*}+\sum_{k=4}^{i-1}\sum_{j=0}^{i-k-1}\sum_{m=0}^{n-i}\binom{i-k-1}{j}a_{n-j-m-2,k-1}^{*},\qquad4\le i\le n-1, \tag*{(15)} a n , i ∗ = m = 0 ∑ n − i a n − m − 1 , i − 1 ∗ + k = 4 ∑ i − 1 j = 0 ∑ i − k − 1 m = 0 ∑ n − i ( j i − k − 1 ) a n − j − m − 2 , k − 1 ∗ , 4 ≤ i ≤ n − 1 , (15) with a n , 3 ∗ = 1 a_{n,3}^{*}=1 a n , 3 ∗ = 1 and a n , n ∗ = a n − 2 a_{n,n}^{*}=a_{n-2} a n , n ∗ = a n − 2 for n ≥ 3 n\ge3 n ≥ 3 .
Proof. Let A n , i A_{n,i} A n , i and A n , i ∗ A_{n,i}^{*} A n , i ∗ denote the subsets of A n = P n ( 2143 ) A_n=\mathcal{P}_n(2143) A n = P n ( 2143 ) whose members are enumerated by a n , i a_{n,i} a n , i and a n , i ∗ a_{n,i}^{*} a n , i ∗ , respectively. That a n , 2 = a n − 1 a_{n,2}=a_{n-1} a n , 2 = a n − 1 is clear, so assume π ∈ A n , i \pi\in A_{n,i} π ∈ A n , i for some 3 ≤ i ≤ n 3\le i\le n 3 ≤ i ≤ n . Considering the number j j j of elements in [ i + 1 , n ] [i+1,n] [ i + 1 , n ] occurring between i i i and 2 2 2 within π \pi π yields (14), as deletion of these j j j elements is seen to result in an arbitrary member of A n − j , i ∗ A_{n-j,i}^{*} A n − j , i ∗ after standardization. Clearly, we have a n , 3 ∗ = 1 a_{n,3}^{*}=1 a n , 3 ∗ = 1 and a n , n ∗ = a n − 2 a_{n,n}^{*}=a_{n-2} a n , n ∗ = a n − 2 for all n ≥ 3 n\ge3 n ≥ 3 , as A n , 3 ∗ = { 13245 ⋯ n } A_{n,3}^{*}=\{13245\cdots n\} A n , 3 ∗ = { 13245 ⋯ n } with members of A n , n ∗ A_{n,n}^{*} A n , n ∗ being synonymous with those in A n − 2 A_{n-2} A n − 2 , upon deletion of the first two letters.
So assume π ∈ A n , i ∗ \pi\in A_{n,i}^{*} π ∈ A n , i ∗ , where 4 ≤ i ≤ n − 1 4\le i\le n-1 4 ≤ i ≤ n − 1 . We consider cases based on the fourth letter k k k . If k = 3 k=3 k = 3 , then we may delete k k k resulting in a member of A n − 1 , i − 1 ∗ A_{n-1,i-1}^{*} A n − 1 , i − 1 ∗ . If k > i k>i k > i , then we must have k = i + 1 k=i+1 k = i + 1 , for otherwise i 2 k ( k − 1 ) i2k(k-1) i 2 k ( k − 1 ) is an occurrence of 2143. Furthermore, π \pi π in this case must be of the form π = 1 i 2 ( i + 1 ) ⋯ ( i + m ) 3 π ′ \pi=1i2(i+1)\cdots(i+m)3\pi' π = 1 i 2 ( i + 1 ) ⋯ ( i + m ) 3 π ′ for some m ≥ 1 m\ge1 m ≥ 1 , as the members of [ i + 1 , n ] [i+1,n] [ i + 1 , n ] must occur in increasing order from left to right within π \pi π . It is seen that each of the letters in [ i + 1 , i + m ] [i+1,i+m] [ i + 1 , i + m ] is extraneous concerning the avoidance of 2143 within π \pi π , as is 3. Deletion of these letters produces an arbitrary member of A n − m − 1 , i − 1 ∗ A_{n-m-1,i-1}^{*} A n − m − 1 , i − 1 ∗ for each m m m , and thus considering all possible m m m yields ∑ m = 1 n − i a n − m − 1 , i − 1 ∗ \sum_{m=1}^{n-i}a_{n-m-1,i-1}^{*} ∑ m = 1 n − i a n − m − 1 , i − 1 ∗ members of A n , i ∗ A_{n,i}^{*} A n , i ∗ for which k = i + 1 k=i+1 k = i + 1 . Combining with the prior case where k = 3 k=3 k = 3 then yields the first summation expression on the right side of (15).
Finally, suppose k ∈ [ 4 , i − 1 ] k\in[4,i-1] k ∈ [ 4 , i − 1 ] . In this case, we have π = 1 i 2 k α β 3 π ′ \pi=1i2k\alpha\beta3\pi' π = 1 i 2 k α β 3 π ′ , where α \alpha α is a possibly empty sequence of letters in [ k + 1 , i − 1 ] [k+1,i-1] [ k + 1 , i − 1 ] in increasing order and β = ( i + 1 ) ( i + 2 ) ⋯ ( i + m ) \beta=(i+1)(i+2)\cdots(i+m) β = ( i + 1 ) ( i + 2 ) ⋯ ( i + m ) for some m ≥ 0 m\ge0 m ≥ 0 . We may delete the letters in α \alpha α (due to their being preceded by k k k and 2 2 2 ) and also those in β \beta β (due to their comprising an interval starting with i + 1 i+1 i + 1 ). Additionally, we have that the i i i (and hence also 1 1 1 ) may be deleted, for if i 2 a b i2ab i 2 ab is an occurrence of 2143 for some a > b > i a>b>i a > b > i , then so is k 3 a b k3ab k 3 ab . This leaves the flattened partition 2 k 3 π ′ 2k3\pi' 2 k 3 π ′ , which when standardized is seen to be an arbitrary member of A n − j − m − 2 , k − 1 ∗ A_{n-j-m-2,k-1}^{*} A n − j − m − 2 , k − 1 ∗ , where j = ∣ α ∣ j=|\alpha| j = ∣ α ∣ . Considering all possible k k k , j j j and m m m then accounts for the second summation in (15) and completes the proof. □ \square □
Let A ( x , v ) = ∑ n ≥ 2 ∑ i = 2 n a n , i v i − 2 x n A(x,v)=\sum_{n\ge2}\sum_{i=2}^{n}a_{n,i}v^{i-2}x^n A ( x , v ) = ∑ n ≥ 2 ∑ i = 2 n a n , i v i − 2 x n and B ( x , v ) = ∑ n ≥ 3 ∑ i = 3 n a n , i ∗ v i − 3 x n B(x,v)=\sum_{n\ge3}\sum_{i=3}^{n}a_{n,i}^{*}v^{i-3}x^n B ( x , v ) = ∑ n ≥ 3 ∑ i = 3 n a n , i ∗ v i − 3 x n .
Lemma 3.2. We have
A ( x , v ) = x 2 + x A ( x , 1 ) + v ( 1 − x ) 2 B ( x 1 − x , v ( 1 − x ) ) (16) A(x,v)=x^2+xA(x,1)+v(1-x)^2B\left(\frac{x}{1-x},v(1-x)\right) \tag*{(16)} A ( x , v ) = x 2 + x A ( x , 1 ) + v ( 1 − x ) 2 B ( 1 − x x , v ( 1 − x ) ) (16)
and
( 1 − v x 1 − x − v 2 x 2 ( 1 − x ) ( 1 − v − v x ) ) B ( x , v ) = x 3 1 − x − v x 4 + x 2 v ( 1 − v x ) A ( v x , 1 ) − x 2 ( 1 − v x ) 2 ( 1 ( 1 − x ) ( 1 − v − v x ) + 1 v ) B ( v x 1 − v x , 1 − v x ) . (17) \left(1-\frac{vx}{1-x}-\frac{v^2x^2}{(1-x)(1-v-vx)}\right)B(x,v)
=
\frac{x^3}{1-x}-vx^4+\frac{x^2}{v}(1-vx)A(vx,1)-x^2(1-vx)^2\left(\frac{1}{(1-x)(1-v-vx)}+\frac{1}{v}\right)B\left(\frac{vx}{1-vx},1-vx\right). \tag*{(17)} ( 1 − 1 − x v x − ( 1 − x ) ( 1 − v − v x ) v 2 x 2 ) B ( x , v ) = 1 − x x 3 − v x 4 + v x 2 ( 1 − v x ) A ( v x , 1 ) − x 2 ( 1 − v x ) 2 ( ( 1 − x ) ( 1 − v − v x ) 1 + v 1 ) B ( 1 − v x v x , 1 − v x ) . (17)
Proof. By (14) , we have
A ( x , v ) − ∑ n ≥ 3 a n − 1 x n − x 2 = ∑ n ≥ 3 x n ∑ i = 3 n v i − 2 ∑ j = 0 n − i ( n − i j ) a n − j , i ∗ , A(x,v)-\sum_{n\geq3}a_{n-1}x^n-x^2
=
\sum_{n\geq3}x^n\sum_{i=3}^{n}v^{i-2}\sum_{j=0}^{n-i}\binom{n-i}{j}a^*_{n-j,i}, A ( x , v ) − n ≥ 3 ∑ a n − 1 x n − x 2 = n ≥ 3 ∑ x n i = 3 ∑ n v i − 2 j = 0 ∑ n − i ( j n − i ) a n − j , i ∗ ,
and hence
A ( x , v ) − x A ( x , 1 ) − x 2 = ∑ i ≥ 3 v i − 2 ∑ n ≥ i x n ∑ j = i n ( n − i n − j ) a j , i ∗ = ∑ i ≥ 3 ∑ j ≥ i a j , i ∗ v i − 2 ∑ n ≥ j ( n − i j − i ) x n = ∑ i ≥ 3 ∑ j ≥ i a j , i ∗ v i − 2 x j ( 1 − x ) j − i + 1 = ∑ j ≥ 3 x j ( 1 − x ) j ∑ i = 3 j a j , i ∗ v i − 2 ( 1 − x ) i − 1 = v ( 1 − x ) 2 B ( x 1 − x , v ( 1 − x ) ) , \begin{aligned}
A(x,v)-xA(x,1)-x^2
=
\sum_{i\geq3}v^{i-2}\sum_{n\geq i}x^n\sum_{j=i}^{n}\binom{n-i}{n-j}a^*_{j,i}
=
\sum_{i\geq3}\sum_{j\geq i}a^*_{j,i}v^{i-2}\sum_{n\geq j}\binom{n-i}{j-i}x^n \\
&=
\sum_{i\geq3}\sum_{j\geq i}a^*_{j,i}v^{i-2}\frac{x^j}{(1-x)^{j-i+1}}
=
\sum_{j\geq3}\frac{x^j}{(1-x)^j}\sum_{i=3}^{j}a^*_{j,i}v^{i-2}(1-x)^{i-1} \\
&=
v(1-x)^2B\left(\frac{x}{1-x},v(1-x)\right),
\end{aligned} A ( x , v ) − x A ( x , 1 ) − x 2 = i ≥ 3 ∑ v i − 2 n ≥ i ∑ x n j = i ∑ n ( n − j n − i ) a j , i ∗ = i ≥ 3 ∑ j ≥ i ∑ a j , i ∗ v i − 2 n ≥ j ∑ ( j − i n − i ) x n = i ≥ 3 ∑ j ≥ i ∑ a j , i ∗ v i − 2 ( 1 − x ) j − i + 1 x j = j ≥ 3 ∑ ( 1 − x ) j x j i = 3 ∑ j a j , i ∗ v i − 2 ( 1 − x ) i − 1 = v ( 1 − x ) 2 B ( 1 − x x , v ( 1 − x ) ) ,
which yields (16) .
By (15) , we have
B ( x , v ) − x 3 1 − x − x 2 v A ( v x , 1 ) = ∑ n ≥ 5 ∑ i = 4 n − 1 a n , i ∗ v i − 3 x n = ∑ n ≥ 5 ∑ i = 4 n − 1 ( a n − 1 , i − 1 ∗ + ∑ m = 1 n − i a n − m − 1 , i − 1 ∗ + ∑ k = 4 i − 1 ∑ j = 0 i − k − 1 ∑ m = 0 n − i ( i − k − 1 j ) a n − j − m − 2 , k − 1 ∗ ) v i − 3 x n = v x ( B ( x , v ) − x 2 v A ( v x , 1 ) − x 3 ) + ∑ n ≥ 5 ∑ i = 4 n − 1 ( ∑ m = 1 n − i a n − m − 1 , i − 1 ∗ v i − 3 x n + ∑ k = 4 i − 1 ∑ j = 0 i − k − 1 ∑ m = 0 n − i ( i − k − 1 j ) a n − j − m − 2 , k − 1 ∗ v i − 3 x n ) . \begin{aligned}
B(x,v)-\frac{x^3}{1-x}-\frac{x^2}{v}A(vx,1)
=
\sum_{n\geq5}\sum_{i=4}^{n-1}a^*_{n,i}v^{i-3}x^n \\
&=
\sum_{n\geq5}\sum_{i=4}^{n-1}
\left(
a^*_{n-1,i-1}
+\sum_{m=1}^{n-i}a^*_{n-m-1,i-1}
+\sum_{k=4}^{i-1}\sum_{j=0}^{i-k-1}\sum_{m=0}^{n-i}\binom{i-k-1}{j}a^*_{n-j-m-2,k-1}
\right)v^{i-3}x^n \\
&=
vx\left(B(x,v)-\frac{x^2}{v}A(vx,1)-x^3\right)
+\sum_{n\geq5}\sum_{i=4}^{n-1}
\left(
\sum_{m=1}^{n-i}a^*_{n-m-1,i-1}v^{i-3}x^n
+\sum_{k=4}^{i-1}\sum_{j=0}^{i-k-1}\sum_{m=0}^{n-i}\binom{i-k-1}{j}a^*_{n-j-m-2,k-1}v^{i-3}x^n
\right).
\end{aligned} B ( x , v ) − 1 − x x 3 − v x 2 A ( v x , 1 ) = n ≥ 5 ∑ i = 4 ∑ n − 1 a n , i ∗ v i − 3 x n = n ≥ 5 ∑ i = 4 ∑ n − 1 ( a n − 1 , i − 1 ∗ + m = 1 ∑ n − i a n − m − 1 , i − 1 ∗ + k = 4 ∑ i − 1 j = 0 ∑ i − k − 1 m = 0 ∑ n − i ( j i − k − 1 ) a n − j − m − 2 , k − 1 ∗ ) v i − 3 x n = v x ( B ( x , v ) − v x 2 A ( v x , 1 ) − x 3 ) + n ≥ 5 ∑ i = 4 ∑ n − 1 ( m = 1 ∑ n − i a n − m − 1 , i − 1 ∗ v i − 3 x n + k = 4 ∑ i − 1 j = 0 ∑ i − k − 1 m = 0 ∑ n − i ( j i − k − 1 ) a n − j − m − 2 , k − 1 ∗ v i − 3 x n ) .
Working separately on the last two multi-sum expressions, we get
∑ n ≥ 5 ∑ i = 4 n − 1 ∑ m = 1 n − i a n − m − 1 , i − 1 ∗ v i − 3 x n = ∑ i ≥ 4 ∑ n ≥ i + 1 ∑ m = 1 n − i a m − 1 , i − 1 ∗ v i − 3 x n = ∑ i ≥ 4 ∑ m ≥ i a m − 1 , i − 1 ∗ v i − 3 x m + 1 1 − x = x 1 − x ∑ m ≥ 4 ∑ i = 4 m a m − 1 , i − 1 ∗ v i − 3 x m = v x 2 1 − x B ( x , v ) \begin{aligned}
\sum_{n\geq5}\sum_{i=4}^{n-1}\sum_{m=1}^{n-i}a^*_{n-m-1,i-1}v^{i-3}x^n
=
\sum_{i\geq4}\sum_{n\geq i+1}\sum_{m=1}^{n-i}a^*_{m-1,i-1}v^{i-3}x^n \\
&=
\sum_{i\geq4}\sum_{m\geq i}a^*_{m-1,i-1}v^{i-3}\frac{x^{m+1}}{1-x}
=
\frac{x}{1-x}\sum_{m\geq4}\sum_{i=4}^{m}a^*_{m-1,i-1}v^{i-3}x^m
=
\frac{vx^2}{1-x}B(x,v)
\end{aligned} n ≥ 5 ∑ i = 4 ∑ n − 1 m = 1 ∑ n − i a n − m − 1 , i − 1 ∗ v i − 3 x n = i ≥ 4 ∑ n ≥ i + 1 ∑ m = 1 ∑ n − i a m − 1 , i − 1 ∗ v i − 3 x n = i ≥ 4 ∑ m ≥ i ∑ a m − 1 , i − 1 ∗ v i − 3 1 − x x m + 1 = 1 − x x m ≥ 4 ∑ i = 4 ∑ m a m − 1 , i − 1 ∗ v i − 3 x m = 1 − x v x 2 B ( x , v )
and
∑ n ≥ 5 ∑ i = 1 n − 1 ∑ k = 4 i − 1 ∑ j = 0 i − k − 1 ∑ m = 0 n − i ( i − k − 1 j ) a n − j − m − 2 , k − 1 ∗ v i − 3 x n = ∑ k ≥ 4 ∑ i ≥ 1 ∑ n ≥ i + k + 1 ∑ j = 0 i − 1 ∑ m = 0 n − i − k ( i − 1 j ) a n − j − m − 2 , k − 1 ∗ v i + k − 3 x n = ∑ k ≥ 3 ∑ i ≥ 1 ∑ n ≥ k + 2 ∑ j = 0 i − 1 ∑ m = 0 n − i − k ( i − 1 j ) a n + i − j − m − 2 , k ∗ v i + k − 2 x n + i = ∑ k ≥ 3 ∑ n ≥ k + 2 ∑ j ≥ 0 ∑ i ≥ 1 ∑ m = 0 n − k − 1 ( i + j − 1 j ) a n + i − m − 2 , k ∗ v i + j + k − 2 x n + i + j = ∑ k ≥ 3 ∑ i ≥ 1 ∑ n ≥ i + k + 2 ∑ m = 0 n − i − k − 1 a n − m − 2 , k ∗ v i + k − 2 x n ∑ j ≥ 0 ( i + j − 1 j ) ( v x ) j = ∑ k ≥ 3 ∑ i ≥ 1 ∑ n ≥ i + k + 2 ∑ m = i + k − 1 n − 2 a m , k ∗ v i + k − 2 x n ( 1 − v x ) i . \begin{aligned}
&\sum_{n\geq5}\sum_{i=1}^{n-1}\sum_{k=4}^{i-1}\sum_{j=0}^{i-k-1}\sum_{m=0}^{n-i}\binom{i-k-1}{j}a^*_{n-j-m-2,k-1}v^{i-3}x^n \\
={}&\sum_{k\geq4}\sum_{i\geq1}\sum_{n\geq i+k+1}\sum_{j=0}^{i-1}\sum_{m=0}^{n-i-k}\binom{i-1}{j}a^*_{n-j-m-2,k-1}v^{i+k-3}x^n \\
={}&\sum_{k\geq3}\sum_{i\geq1}\sum_{n\geq k+2}\sum_{j=0}^{i-1}\sum_{m=0}^{n-i-k}\binom{i-1}{j}a^*_{n+i-j-m-2,k}v^{i+k-2}x^{n+i} \\
={}&\sum_{k\geq3}\sum_{n\geq k+2}\sum_{j\geq0}\sum_{i\geq1}\sum_{m=0}^{n-k-1}\binom{i+j-1}{j}a^*_{n+i-m-2,k}v^{i+j+k-2}x^{n+i+j} \\
={}&\sum_{k\geq3}\sum_{i\geq1}\sum_{n\geq i+k+2}\sum_{m=0}^{n-i-k-1}a^*_{n-m-2,k}v^{i+k-2}x^n\sum_{j\geq0}\binom{i+j-1}{j}(vx)^j \\
={}&\sum_{k\geq3}\sum_{i\geq1}\sum_{n\geq i+k+2}\sum_{m=i+k-1}^{n-2}\frac{a^*_{m,k}v^{i+k-2}x^n}{(1-vx)^i}.
\end{aligned} = = = = = n ≥ 5 ∑ i = 1 ∑ n − 1 k = 4 ∑ i − 1 j = 0 ∑ i − k − 1 m = 0 ∑ n − i ( j i − k − 1 ) a n − j − m − 2 , k − 1 ∗ v i − 3 x n k ≥ 4 ∑ i ≥ 1 ∑ n ≥ i + k + 1 ∑ j = 0 ∑ i − 1 m = 0 ∑ n − i − k ( j i − 1 ) a n − j − m − 2 , k − 1 ∗ v i + k − 3 x n k ≥ 3 ∑ i ≥ 1 ∑ n ≥ k + 2 ∑ j = 0 ∑ i − 1 m = 0 ∑ n − i − k ( j i − 1 ) a n + i − j − m − 2 , k ∗ v i + k − 2 x n + i k ≥ 3 ∑ n ≥ k + 2 ∑ j ≥ 0 ∑ i ≥ 1 ∑ m = 0 ∑ n − k − 1 ( j i + j − 1 ) a n + i − m − 2 , k ∗ v i + j + k − 2 x n + i + j k ≥ 3 ∑ i ≥ 1 ∑ n ≥ i + k + 2 ∑ m = 0 ∑ n − i − k − 1 a n − m − 2 , k ∗ v i + k − 2 x n j ≥ 0 ∑ ( j i + j − 1 ) ( v x ) j k ≥ 3 ∑ i ≥ 1 ∑ n ≥ i + k + 2 ∑ m = i + k − 1 ∑ n − 2 ( 1 − v x ) i a m , k ∗ v i + k − 2 x n .
This last sum may be written as the difference of two sums as
∑ k ≥ 3 ∑ i ≥ 1 ∑ n ≥ i + k + 1 ∑ m = i + k − 1 n − 2 a m , k ∗ v i + k − 2 x n ( 1 − v x ) i − ∑ k ≥ 3 ∑ i ≥ 1 a i + k − 1 , k ∗ v i + k − 2 x i + k + 1 ( 1 − v x ) i = ∑ k ≥ 3 ∑ i ≥ 1 ∑ m ≥ i + k − 1 a m , k ∗ v i + k − 2 x m + 2 ( 1 − x ) ( 1 − v x ) i − ∑ k ≥ 3 ∑ i ≥ k a i , k ∗ v i − 1 x i + 2 ( 1 − v x ) i − k + 1 = ∑ k ≥ 3 ∑ m ≥ k a m , k ∗ v k − 1 x m + 2 1 − x ⋅ 1 − ( v 1 − v x ) m − k + 1 1 − v − v x − x 2 v ∑ i ≥ 3 ∑ k = 3 i a i , k ∗ ( v x 1 − v x ) i ( 1 − v x ) k − 1 = v 2 x 2 ( 1 − x ) ( 1 − v − v x ) ∑ m ≥ 3 ∑ k = 3 m a m , k ∗ v k − 3 x m ( 1 − ( v 1 − v x ) m − k + 1 ) − x 2 v ( 1 − v x ) 2 B ( v x 1 − v x , 1 − v x ) = v 2 x 2 ( 1 − x ) ( 1 − v − v x ) ( B ( x , v ) − ( 1 − v x ) 2 v 2 B ( v x 1 − v x , 1 − v x ) ) − x 2 v ( 1 − v x ) 2 B ( v x 1 − v x , 1 − v x ) . \begin{aligned}
&\sum_{k\geq3}\sum_{i\geq1}\sum_{n\geq i+k+1}\sum_{m=i+k-1}^{n-2}\frac{a^*_{m,k}v^{i+k-2}x^n}{(1-vx)^i}
-\sum_{k\geq3}\sum_{i\geq1}\frac{a^*_{i+k-1,k}v^{i+k-2}x^{i+k+1}}{(1-vx)^i} \\
={}&\sum_{k\geq3}\sum_{i\geq1}\sum_{m\geq i+k-1}\frac{a^*_{m,k}v^{i+k-2}x^{m+2}}{(1-x)(1-vx)^i}
-\sum_{k\geq3}\sum_{i\geq k}\frac{a^*_{i,k}v^{i-1}x^{i+2}}{(1-vx)^{i-k+1}} \\
={}&\sum_{k\geq3}\sum_{m\geq k}\frac{a^*_{m,k}v^{k-1}x^{m+2}}{1-x}\cdot\frac{1-\left(\frac{v}{1-vx}\right)^{m-k+1}}{1-v-vx}
-\frac{x^2}{v}\sum_{i\geq3}\sum_{k=3}^{i}a^*_{i,k}\left(\frac{vx}{1-vx}\right)^i(1-vx)^{k-1} \\
={}&\frac{v^2x^2}{(1-x)(1-v-vx)}\sum_{m\geq3}\sum_{k=3}^{m}a^*_{m,k}v^{k-3}x^m\left(1-\left(\frac{v}{1-vx}\right)^{m-k+1}\right)
-\frac{x^2}{v}(1-vx)^2B\left(\frac{vx}{1-vx},1-vx\right) \\
={}&\frac{v^2x^2}{(1-x)(1-v-vx)}
\left(B(x,v)-\frac{(1-vx)^2}{v^2}B\left(\frac{vx}{1-vx},1-vx\right)\right)
-\frac{x^2}{v}(1-vx)^2B\left(\frac{vx}{1-vx},1-vx\right).
\end{aligned} = = = = k ≥ 3 ∑ i ≥ 1 ∑ n ≥ i + k + 1 ∑ m = i + k − 1 ∑ n − 2 ( 1 − v x ) i a m , k ∗ v i + k − 2 x n − k ≥ 3 ∑ i ≥ 1 ∑ ( 1 − v x ) i a i + k − 1 , k ∗ v i + k − 2 x i + k + 1 k ≥ 3 ∑ i ≥ 1 ∑ m ≥ i + k − 1 ∑ ( 1 − x ) ( 1 − v x ) i a m , k ∗ v i + k − 2 x m + 2 − k ≥ 3 ∑ i ≥ k ∑ ( 1 − v x ) i − k + 1 a i , k ∗ v i − 1 x i + 2 k ≥ 3 ∑ m ≥ k ∑ 1 − x a m , k ∗ v k − 1 x m + 2 ⋅ 1 − v − v x 1 − ( 1 − v x v ) m − k + 1 − v x 2 i ≥ 3 ∑ k = 3 ∑ i a i , k ∗ ( 1 − v x v x ) i ( 1 − v x ) k − 1 ( 1 − x ) ( 1 − v − v x ) v 2 x 2 m ≥ 3 ∑ k = 3 ∑ m a m , k ∗ v k − 3 x m ( 1 − ( 1 − v x v ) m − k + 1 ) − v x 2 ( 1 − v x ) 2 B ( 1 − v x v x , 1 − v x ) ( 1 − x ) ( 1 − v − v x ) v 2 x 2 ( B ( x , v ) − v 2 ( 1 − v x ) 2 B ( 1 − v x v x , 1 − v x ) ) − v x 2 ( 1 − v x ) 2 B ( 1 − v x v x , 1 − v x ) .
Combining with the prior computations, we get
B ( x , v ) − x 3 1 − x − x 2 v A ( v x , 1 ) = v x 1 − x B ( x , v ) − x 3 A ( v x , 1 ) − v x 4 + v 2 x 2 ( 1 − x ) ( 1 − v − v x ) B ( x , v ) − x 2 ( 1 − v x ) 2 ( 1 ( 1 − x ) ( 1 − v − v x ) + 1 v ) B ( v x 1 − v x , 1 − v x ) , \begin{aligned}
B(x,v)-\frac{x^3}{1-x}-\frac{x^2}{v}A(vx,1)
={}&\frac{vx}{1-x}B(x,v)-x^3A(vx,1)-vx^4+\frac{v^2x^2}{(1-x)(1-v-vx)}B(x,v)\\
&-x^2(1-vx)^2\left(\frac{1}{(1-x)(1-v-vx)}+\frac{1}{v}\right)B\left(\frac{vx}{1-vx},1-vx\right),
\end{aligned} B ( x , v ) − 1 − x x 3 − v x 2 A ( v x , 1 ) = 1 − x v x B ( x , v ) − x 3 A ( v x , 1 ) − v x 4 + ( 1 − x ) ( 1 − v − v x ) v 2 x 2 B ( x , v ) − x 2 ( 1 − v x ) 2 ( ( 1 − x ) ( 1 − v − v x ) 1 + v 1 ) B ( 1 − v x v x , 1 − v x ) ,
which may be rewritten as (17).
It is possible to guess and then verify the solution to the system of functional equations (16) and (17). Note that reversing the steps of Lemma 3.2 shows that this system has a unique power series solution.
Theorem 3.3. We have
A ( x , v ) = x ( 1 − 1 − 4 x ) 2 − v x 2 ( 1 − 3 x − ( 1 − x ) 1 − 4 v x ) 2 ( 1 − 2 x − v ( 1 − x ) 2 ) A(x,v)=\frac{x(1-\sqrt{1-4x})}{2}-\frac{vx^2(1-3x-(1-x)\sqrt{1-4vx})}{2(1-2x-v(1-x)^2)} A ( x , v ) = 2 x ( 1 − 1 − 4 x ) − 2 ( 1 − 2 x − v ( 1 − x ) 2 ) v x 2 ( 1 − 3 x − ( 1 − x ) 1 − 4 v x )
and
B ( x , v ) = − x 2 ( 1 − 2 x − 1 − 4 v x ) 2 ( 1 − v − x ) . B(x,v)=-\frac{x^2(1-2x-\sqrt{1-4vx})}{2(1-v-x)}. B ( x , v ) = − 2 ( 1 − v − x ) x 2 ( 1 − 2 x − 1 − 4 v x ) .
In particular, upon taking v = 1 v=1 v = 1 , we have p n ( 2143 ) = C n − 1 p_n(2143)=C_{n-1} p n ( 2143 ) = C n − 1 for all n ≥ 1 n\ge1 n ≥ 1 , with the cardinality of the subset of P n ( 2143 ) \mathcal{P}_n(2143) P n ( 2143 ) whose members have third letter 2 2 2 given by C n − 2 C_{n-2} C n − 2 for n ≥ 3 n\ge3 n ≥ 3 .
We now consider the case of avoiding 2314 2314 2314 . Given n ≥ 2 n\ge2 n ≥ 2 with i , j ∈ [ n ] i,j\in[n] i , j ∈ [ n ] and i ≠ j i\ne j i = j , let b n , i , j b_{n,i,j} b n , i , j denote the number of members of B n = P n ( 2314 ) \mathcal{B}_n=\mathcal{P}_n(2314) B n = P n ( 2314 ) whose last two letters are i , j i,j i , j . Note that b n = ∑ i = 1 n ∑ j = 1 j ≠ i n b n , i , j b_n=\sum_{i=1}^{n}\sum_{\substack{j=1\\j\ne i}}^{n}b_{n,i,j} b n = ∑ i = 1 n ∑ j = 1 j = i n b n , i , j for all n ≥ 2 n\ge2 n ≥ 2 , where b n = p n ( 2314 ) b_n=p_n(2314) b n = p n ( 2314 ) . Clearly, we have b n , i , 1 = b n , 1 , j = 0 b_{n,i,1}=b_{n,1,j}=0 b n , i , 1 = b n , 1 , j = 0 if n ≥ 3 n\ge3 n ≥ 3 for all i i i and j j j , with b 2 , 1 , 2 = 1 b_{2,1,2}=1 b 2 , 1 , 2 = 1 , b 2 , 2 , 1 = 0 b_{2,2,1}=0 b 2 , 2 , 1 = 0 .
The b n , i , j b_{n,i,j} b n , i , j satisfy the following recurrence relations.
Lemma 3.4. If n ≥ 3 n\ge3 n ≥ 3 , then
b n , i , j = ∑ k = 0 i − j − 1 ∑ s = 1 j − 1 ( i − j − 1 k ) b n − k − 1 , s , i − k − 1 , 2 ≤ j < i ≤ n , (18) b_{n,i,j}=\sum_{k=0}^{i-j-1}\sum_{s=1}^{j-1}\binom{i-j-1}{k}b_{n-k-1,s,i-k-1},\qquad2\le j<i\le n, \tag*{(18)} b n , i , j = k = 0 ∑ i − j − 1 s = 1 ∑ j − 1 ( k i − j − 1 ) b n − k − 1 , s , i − k − 1 , 2 ≤ j < i ≤ n , (18) b n , i , i + 1 = ∑ s = 1 s ≠ i n − 1 b n − 1 , s , i , 2 ≤ i ≤ n − 1 , (19) b_{n,i,i+1}=\sum_{\substack{s=1\\s\ne i}}^{n-1}b_{n-1,s,i},\qquad2\le i\le n-1, \tag*{(19)} b n , i , i + 1 = s = 1 s = i ∑ n − 1 b n − 1 , s , i , 2 ≤ i ≤ n − 1 , (19) and
b n , i , j = ∑ m = 0 1 ∑ s = 1 i − 1 b n − m − 1 , s , j − m − 1 + ∑ m = 0 1 ∑ r = j + 1 n ∑ k = 0 r − j − 1 ∑ s = 1 i − 1 ( r − j − 1 k ) b n − k − m − 2 , s , r − k − m − 2 , (20) b_{n,i,j}=\sum_{m=0}^{1}\sum_{s=1}^{i-1}b_{n-m-1,s,j-m-1}+\sum_{m=0}^{1}\sum_{r=j+1}^{n}\sum_{k=0}^{r-j-1}\sum_{s=1}^{i-1}\binom{r-j-1}{k}b_{n-k-m-2,s,r-k-m-2}, \tag*{(20)} b n , i , j = m = 0 ∑ 1 s = 1 ∑ i − 1 b n − m − 1 , s , j − m − 1 + m = 0 ∑ 1 r = j + 1 ∑ n k = 0 ∑ r − j − 1 s = 1 ∑ i − 1 ( k r − j − 1 ) b n − k − m − 2 , s , r − k − m − 2 , (20) for 2 ≤ i < j − 1 ≤ n − 1 2\le i<j-1\le n-1 2 ≤ i < j − 1 ≤ n − 1 .
Proof. Let B n , i , j \mathcal{B}_{n,i,j} B n , i , j denote the subset of B n \mathcal{B}_n B n enumerated by b n , i , j b_{n,i,j} b n , i , j and B n , j = ⋃ i = 1 i ≠ j n B n , i , j \mathcal{B}_{n,j}=\bigcup_{\substack{i=1\\i\ne j}}^{n}\mathcal{B}_{n,i,j} B n , j = ⋃ i = 1 i = j n B n , i , j . If i > j i>j i > j , then π ∈ B n , i , j \pi\in\mathcal{B}_{n,i,j} π ∈ B n , i , j may be decomposed as π = π ′ s α i j \pi=\pi' s\alpha i j π = π ′ s α ij , where α \alpha α consists of letters in [ j + 1 , i − 1 ] [j+1,i-1] [ j + 1 , i − 1 ] in ascending order and s ∈ [ j − 1 ] s\in[j-1] s ∈ [ j − 1 ] . Then we may clearly delete the terminal j j j , due to i > j i>j i > j directly preceding it, as well as the entirety of section α \alpha α , since these letters occur in ascending order and are of intermediate value between s s s and i i i (and hence none of them are actually needed in serving as a ‘1’ or ‘4’ in a possible occurrence of 2314 2314 2314 ). These deletions are seen to result after standardization in a member of B n − k − 1 , s , i − k − 1 \mathcal{B}_{n-k-1,s,i-k-1} B n − k − 1 , s , i − k − 1 , where k = ∣ α ∣ k=|\alpha| k = ∣ α ∣ . As there are ( i − j − 1 k ) \binom{i-j-1}{k} ( k i − j − 1 ) possibilities for α \alpha α , summing over all k k k and s s s yields (18). Furthermore, within a member of B n , i , i + 1 \mathcal{B}_{n,i,i+1} B n , i , i + 1 , where 2 ≤ i ≤ n − 1 2\le i\le n-1 2 ≤ i ≤ n − 1 , the final letter may clearly be deleted, resulting in an arbitrary member of B n − 1 , i \mathcal{B}_{n-1,i} B n − 1 , i whose cardinality is given by the right side of (19).
To show (20), suppose π ∈ B n , i , j \pi\in\mathcal{B}_{n,i,j} π ∈ B n , i , j , where n ≥ 4 n\ge4 n ≥ 4 and 2 ≤ i < j − 1 ≤ n − 1 2\le i<j-1\le n-1 2 ≤ i < j − 1 ≤ n − 1 . Let r r r denote the antepenultimate letter of π \pi π and we consider cases on r r r . If r < i r<i r < i , then we may delete i i i , yielding ∑ s = 1 i − 1 b n − 1 , s , j − 1 \sum_{s=1}^{i-1}b_{n-1,s,j-1} ∑ s = 1 i − 1 b n − 1 , s , j − 1 possibilities. On the other hand, if i < r < j i<r<j i < r < j , then we must have r = i + 1 r=i+1 r = i + 1 , for if i + 1 < r < j i+1<r<j i + 1 < r < j , then ( i + 1 ) r i j (i+1)rij ( i + 1 ) r ij is a 2314 2314 2314 . Since the descent bottoms within a member of P n \mathcal{P}_n P n are increasing, the predecessor of i + 1 i+1 i + 1 must be less than i i i . In this case, we may delete both i i i and i + 1 i+1 i + 1 as they are extraneous concerning the avoidance of 2314 2314 2314 . This leaves a member of B n − 2 , s , j − 2 \mathcal{B}_{n-2,s,j-2} B n − 2 , s , j − 2 for some s ∈ [ i − 1 ] s\in[i-1] s ∈ [ i − 1 ] , and hence there are ∑ s = 1 i − 1 b n − 2 , s , j − 2 \sum_{s=1}^{i-1}b_{n-2,s,j-2} ∑ s = 1 i − 1 b n − 2 , s , j − 2 possibilities for π \pi π . The preceding two cases may be combined to give the first summation expression on the right-hand side of (20).
Now suppose r ∈ [ j + 1 , n ] r\in[j+1,n] r ∈ [ j + 1 , n ] . Then we have
π = π ′ s δ β r i j , \pi=\pi' s\delta\beta r i j, π = π ′ sδ β r ij ,
where s ∈ [ i − 1 ] s\in[i-1] s ∈ [ i − 1 ] , δ \delta δ is either empty or represents the letter i + 1 i+1 i + 1 , and β \beta β is a possibly empty sequence of letters in [ j + 1 , r − 1 ] [j+1,r-1] [ j + 1 , r − 1 ] in increasing order. Note that δ \delta δ is as described due to π \pi π ending in i , j i,j i , j , with i < j − 1 i<j-1 i < j − 1 . Further, the presence of both s < i s<i s < i and r > j r>j r > j within the increasing run directly preceding i i i implies that i i i and j j j are redundant concerning the avoidance of 2314 2314 2314 (outside of the restriction placed on δ \delta δ ). Thus, we may delete both i i i and j j j and, in turn, all of the letters in δ \delta δ and β \beta β as well. Let m = ∣ δ ∣ m=|\delta| m = ∣ δ ∣ and k = ∣ β ∣ k=|\beta| k = ∣ β ∣ , and hence m = 0 m=0 m = 0 or 1 1 1 and 0 ≤ k ≤ r − j − 1 0\le k\le r-j-1 0 ≤ k ≤ r − j − 1 , with ( r − j − 1 k ) \binom{r-j-1}{k} ( k r − j − 1 ) possibilities for β \beta β . Then performing all of these deletions on π \pi π is seen to result in an arbitrary member of B n − k − m − 2 , s , r − k − m − 2 \mathcal{B}_{n-k-m-2,s,r-k-m-2} B n − k − m − 2 , s , r − k − m − 2 . Thus, for each m , r , k m,r,k m , r , k and s s s , there are ( r − j − 1 k ) b n − k − m − 2 , s , r − k − m − 2 \binom{r-j-1}{k}b_{n-k-m-2,s,r-k-m-2} ( k r − j − 1 ) b n − k − m − 2 , s , r − k − m − 2 possibilities for π \pi π . Considering all possible values of these parameters accounts for the second summation in (20) and completes the proof. □
It is convenient to consider the following two generating functions:
B + ( x , u , v ) = ∑ n ≥ 2 ∑ i = 1 n − 1 ∑ j = i + 1 n b n , i , j u i − 1 v j − i − 1 x n B_{+}(x,u,v)=\sum_{n\ge2}\sum_{i=1}^{n-1}\sum_{j=i+1}^{n}b_{n,i,j}u^{i-1}v^{j-i-1}x^n B + ( x , u , v ) = n ≥ 2 ∑ i = 1 ∑ n − 1 j = i + 1 ∑ n b n , i , j u i − 1 v j − i − 1 x n
and
B − ( x , u , v ) = ∑ n ≥ 2 ∑ i = 2 n ∑ j = 1 i − 1 b n , i , j u i − 1 v j − i − 1 x n . B_{-}(x,u,v)=\sum_{n\ge2}\sum_{i=2}^{n}\sum_{j=1}^{i-1}b_{n,i,j}u^{i-1}v^{j-i-1}x^n. B − ( x , u , v ) = n ≥ 2 ∑ i = 2 ∑ n j = 1 ∑ i − 1 b n , i , j u i − 1 v j − i − 1 x n .
Translation of the recurrences in Lemma 3.4 (the details of which are lengthy and we omit) yields the following system of functional equations.
Lemma 3.5. We have
B − ( x , u , v ) = u 2 x v ( 1 − v + u x ) ( 1 v − u x B + ( x , u , u v − u x ) − B + ( x , u , u ) ) , (21) B_{-}(x,u,v)=\frac{u^2x}{v(1-v+ux)}\left(\frac{1}{v-ux}B_{+}\left(x,u,\frac{u}{v-ux}\right)-B_{+}(x,u,u)\right), \tag*{(21)} B − ( x , u , v ) = v ( 1 − v + ux ) u 2 x ( v − ux 1 B + ( x , u , v − ux u ) − B + ( x , u , u ) ) , (21) B + ( x , u , v ) = x 2 + u v x u − v ( B + ( x , u , u ) − B + ( x , u , v ) ) + u v x 2 u − v ( u B + ( x , u , u ) − v B + ( x , u , v ) ) + u x 2 ( 1 − v + v x ) ( 1 − u + u x ) ( u − v ) ( ( u v x − u v − u + v ) ( B + ( x , u , v ) − B + ( x , u , 1 1 − x ) ) + u v ( B + ( x , u , v ) − v ( 1 − x ) B + ( x , u , 1 1 − x ) ) − u v ( 1 − v + v x ) B + ( x , u , u ) ) + u v x 3 ( 1 − v + v x ) ( 1 − u + u x ) ( u − v ) ( ( u v x − u v − u + v ) ( v B + ( x , u , v ) − 1 1 − x B + ( x , u , 1 1 − x ) ) + u v ( B + ( x , u , v ) − B + ( x , u , 1 1 − x ) ) − u 2 ( 1 − v + v x ) B + ( x , u , u ) ) + u x ( B − ( x , u , u ) + B + ( x , u , u ) ) . (22) \begin{aligned}
B_{+}(x,u,v)={}&x^2+\frac{uvx}{u-v}\left(B_{+}(x,u,u)-B_{+}(x,u,v)\right)\\
&+\frac{uvx^2}{u-v}\left(uB_{+}(x,u,u)-vB_{+}(x,u,v)\right)\\
&+\frac{ux^2}{(1-v+vx)(1-u+ux)(u-v)}
\left((uvx-uv-u+v)\left(B_{+}(x,u,v)-B_{+}\left(x,u,\frac{1}{1-x}\right)\right)\right.\\
&\qquad\left.+uv\left(B_{+}(x,u,v)-v(1-x)B_{+}\left(x,u,\frac{1}{1-x}\right)\right)-uv(1-v+vx)B_{+}(x,u,u)\right)\\
&+\frac{uvx^3}{(1-v+vx)(1-u+ux)(u-v)}
\left((uvx-uv-u+v)\left(vB_{+}(x,u,v)-\frac{1}{1-x}B_{+}\left(x,u,\frac{1}{1-x}\right)\right)\right.\\
&\qquad\left.+uv\left(B_{+}(x,u,v)-B_{+}\left(x,u,\frac{1}{1-x}\right)\right)-u^2(1-v+vx)B_{+}(x,u,u)\right)\\
&+ux\left(B_{-}(x,u,u)+B_{+}(x,u,u)\right). \tag*{(22)}
\end{aligned} B + ( x , u , v ) = x 2 + u − v uv x ( B + ( x , u , u ) − B + ( x , u , v ) ) + u − v uv x 2 ( u B + ( x , u , u ) − v B + ( x , u , v ) ) + ( 1 − v + v x ) ( 1 − u + ux ) ( u − v ) u x 2 ( ( uv x − uv − u + v ) ( B + ( x , u , v ) − B + ( x , u , 1 − x 1 ) ) + uv ( B + ( x , u , v ) − v ( 1 − x ) B + ( x , u , 1 − x 1 ) ) − uv ( 1 − v + v x ) B + ( x , u , u ) ) + ( 1 − v + v x ) ( 1 − u + ux ) ( u − v ) uv x 3 ( ( uv x − uv − u + v ) ( v B + ( x , u , v ) − 1 − x 1 B + ( x , u , 1 − x 1 ) ) + uv ( B + ( x , u , v ) − B + ( x , u , 1 − x 1 ) ) − u 2 ( 1 − v + v x ) B + ( x , u , u ) ) + ux ( B − ( x , u , u ) + B + ( x , u , u ) ) . (22)
By substituting (21) into (22) , we obtain after some algebra the following functional equation for B + ( x , u , v ) B_{+}(x,u,v) B + ( x , u , v ) :
( x − 1 ) ( u x − u + 1 ) ( u v 3 x 2 − u v 2 x 2 + u v 2 x − 2 u v x + v 2 x + u v − v 2 − u + v ) B + ( x , u , v ) = u 2 x ( x − 1 ) ( v x − v + 1 ) ( v x + 1 ) ( u − 1 ) B + ( x , u , u ) + u x 2 ( v x + 1 ) ( u − v ) B + ( x , u , 1 1 − x ) − x 2 ( x − 1 ) ( u x − u + 1 ) ( v x − v + 1 ) ( u − v ) . (23) \begin{aligned}
&(x-1)(ux-u+1)(uv^3x^2-uv^2x^2+uv^2x-2uvx+v^2x+uv-v^2-u+v)B_{+}(x,u,v)\\
&=u^2x(x-1)(vx-v+1)(vx+1)(u-1)B_{+}(x,u,u)\\
&\quad+ux^2(vx+1)(u-v)B_{+}\left(x,u,\frac{1}{1-x}\right)-x^2(x-1)(ux-u+1)(vx-v+1)(u-v). \tag*{(23)}
\end{aligned} ( x − 1 ) ( ux − u + 1 ) ( u v 3 x 2 − u v 2 x 2 + u v 2 x − 2 uv x + v 2 x + uv − v 2 − u + v ) B + ( x , u , v ) = u 2 x ( x − 1 ) ( v x − v + 1 ) ( v x + 1 ) ( u − 1 ) B + ( x , u , u ) + u x 2 ( v x + 1 ) ( u − v ) B + ( x , u , 1 − x 1 ) − x 2 ( x − 1 ) ( ux − u + 1 ) ( v x − v + 1 ) ( u − v ) . (23)
In order to solve (23) , we apply the kernel method and let v i = v i ( x , u ) v_i=v_i(x,u) v i = v i ( x , u ) for 0 ≤ i ≤ 2 0\le i\le2 0 ≤ i ≤ 2 denote the roots of the polynomial equation
u x 2 v 3 − ( 1 − x ) ( 1 − u x ) v 2 + ( 1 + u − 2 u x ) v − u = 0. ux^2v^3-(1-x)(1-ux)v^2+(1+u-2ux)v-u=0. u x 2 v 3 − ( 1 − x ) ( 1 − ux ) v 2 + ( 1 + u − 2 ux ) v − u = 0.
The v i v_i v i have the following series expansions (where we assume 0 < ∣ u ∣ , ∣ x ∣ < 1 0<|u|,|x|<1 0 < ∣ u ∣ , ∣ x ∣ < 1 ):
v 0 = 1 u x − 2 − u + 1 u x − 1 − u − ( u 2 + 1 ) x − ( 2 u 3 + u 2 + u + 1 ) x 2 + ⋯ , v_0=\frac{1}{u}x^{-2}-\frac{u+1}{u}x^{-1}-u-(u^2+1)x-(2u^3+u^2+u+1)x^2+\cdots, v 0 = u 1 x − 2 − u u + 1 x − 1 − u − ( u 2 + 1 ) x − ( 2 u 3 + u 2 + u + 1 ) x 2 + ⋯ ,
v 1 = u + u 2 x + u 3 ( 2 u − 1 ) u − 1 x 2 + u 4 ( 4 u − 1 ) u − 1 x 3 + ⋯ , v_1=u+u^2x+\frac{u^3(2u-1)}{u-1}x^2+\frac{u^4(4u-1)}{u-1}x^3+\cdots, v 1 = u + u 2 x + u − 1 u 3 ( 2 u − 1 ) x 2 + u − 1 u 4 ( 4 u − 1 ) x 3 + ⋯ ,
v 2 = 1 + x − 1 u − 1 x 2 − 2 u + 1 u − 1 x 3 + ⋯ . v_2=1+x-\frac{1}{u-1}x^2-\frac{2u+1}{u-1}x^3+\cdots. v 2 = 1 + x − u − 1 1 x 2 − u − 1 2 u + 1 x 3 + ⋯ .
Substituting v = v 1 v=v_1 v = v 1 and v = v 2 v=v_2 v = v 2 into (23) , and solving the resulting system in the quantities B + ( x , u , u ) B_{+}(x,u,u) B + ( x , u , u ) and B + ( x , u , 1 1 − x ) B_{+}\left(x,u,\frac{1}{1-x}\right) B + ( x , u , 1 − x 1 ) , we obtain
B + ( x , u , u ) = ( u − v 1 ) ( u − v 2 ) x ( 1 + v 1 x ) ( 1 + v 2 x ) ( 1 − u ) u 2 , B_{+}(x,u,u)=\frac{(u-v_1)(u-v_2)x}{(1+v_1x)(1+v_2x)(1-u)u^2}, B + ( x , u , u ) = ( 1 + v 1 x ) ( 1 + v 2 x ) ( 1 − u ) u 2 ( u − v 1 ) ( u − v 2 ) x ,
B + ( x , u , 1 1 − x ) = − ( 1 − x ) ( 1 − v 1 + v 1 x ) ( 1 − v 2 + v 2 x ) ( 1 + u x ) u ( 1 + v 1 x ) ( 1 + v 2 x ) . B_{+}\left(x,u,\frac{1}{1-x}\right)=-\frac{(1-x)(1-v_1+v_1x)(1-v_2+v_2x)(1+ux)}{u(1+v_1x)(1+v_2x)}. B + ( x , u , 1 − x 1 ) = − u ( 1 + v 1 x ) ( 1 + v 2 x ) ( 1 − x ) ( 1 − v 1 + v 1 x ) ( 1 − v 2 + v 2 x ) ( 1 + ux ) .
Substituting these expressions into (23) , we obtain
B + ( x , u , v ) = ( v − v 1 ) ( v − v 2 ) ( 1 + u x ) x 2 ( u + ( 2 u x − u − 1 ) v + ( 1 − x ) ( 1 − u x ) v 2 − u x 2 v 3 ) ( 1 + v 1 x ) ( 1 + v 2 x ) . (24) B_{+}(x,u,v)=\frac{(v-v_{1})(v-v_{2})(1+ux)x^{2}}{\left(u+(2ux-u-1)v+(1-x)(1-ux)v^{2}-ux^{2}v^{3}\right)(1+v_{1}x)(1+v_{2}x)}. \tag*{(24)} B + ( x , u , v ) = ( u + ( 2 ux − u − 1 ) v + ( 1 − x ) ( 1 − ux ) v 2 − u x 2 v 3 ) ( 1 + v 1 x ) ( 1 + v 2 x ) ( v − v 1 ) ( v − v 2 ) ( 1 + ux ) x 2 . (24)
Let B ( x , u , v ) = ∑ n ≥ 2 ∑ i = 1 n ∑ j = 1 j ≠ i n b n , i , j u i − 1 v j − i − 1 x n B(x,u,v)=\sum_{n\geq2}\sum_{i=1}^{n}\sum_{\substack{j=1\\j\ne i}}^{n}b_{n,i,j}u^{i-1}v^{j-i-1}x^{n} B ( x , u , v ) = ∑ n ≥ 2 ∑ i = 1 n ∑ j = 1 j = i n b n , i , j u i − 1 v j − i − 1 x n . Note that B ( x , u , v ) = B + ( x , u , v ) + B − ( x , u , v ) B(x,u,v)=B_{+}(x,u,v)+B_{-}(x,u,v) B ( x , u , v ) = B + ( x , u , v ) + B − ( x , u , v ) , by the definitions. From (21) , we obtain the following result.
Theorem 3.6. The generating function B ( x , u , v ) B(x,u,v) B ( x , u , v ) equals
B + ( x , u , v ) + u 2 x v ( 1 − v + u x ) ( 1 v − u x B + ( x , u , u v − u x ) − B + ( x , u , u ) ) , (25) B_{+}(x,u,v)+\frac{u^{2}x}{v(1-v+ux)}\left(\frac{1}{v-ux}B_{+}\left(x,u,\frac{u}{v-ux}\right)-B_{+}(x,u,u)\right), \tag*{(25)} B + ( x , u , v ) + v ( 1 − v + ux ) u 2 x ( v − ux 1 B + ( x , u , v − ux u ) − B + ( x , u , u ) ) , (25) where B + ( x , u , v ) B_{+}(x,u,v) B + ( x , u , v ) is given by (24) .
Using the facts v 0 v 1 v 2 = 1 x 2 v_{0}v_{1}v_{2}=\frac{1}{x^{2}} v 0 v 1 v 2 = x 2 1 and v 0 + v 1 + v 2 = ( 1 − x ) ( 1 − u x ) u x 2 v_{0}+v_{1}+v_{2}=\frac{(1-x)(1-ux)}{ux^{2}} v 0 + v 1 + v 2 = u x 2 ( 1 − x ) ( 1 − ux ) , one can obtain the following formula for B ( x , u , v ) B(x,u,v) B ( x , u , v ) in terms of v 0 v_{0} v 0 only.
Theorem 3.7. The generating function B ( x , u , v ) B(x,u,v) B ( x , u , v ) is given by (25) , where
B + ( x , u , v ) = x ( u x + 1 ) ( u v 2 v 0 x 2 + u v v 0 2 x 2 − u v v 0 x 2 + u v v 0 x + v v 0 x − v v 0 + u ) ( u v 0 2 x 2 − u v 0 x 2 − u x + v 0 x − v 0 ) ( u v 3 x 2 − u v 2 x 2 + u v 2 x − 2 u v x + v 2 x + u v − v 2 − u + v ) . B_{+}(x,u,v)=\frac{x(ux+1)\left(uv^{2}v_{0}x^{2}+uvv_{0}^{2}x^{2}-uvv_{0}x^{2}+uvv_{0}x+vv_{0}x-vv_{0}+u\right)}{\left(uv_{0}^{2}x^{2}-uv_{0}x^{2}-ux+v_{0}x-v_{0}\right)\left(uv^{3}x^{2}-uv^{2}x^{2}+uv^{2}x-2uvx+v^{2}x+uv-v^{2}-u+v\right)}. B + ( x , u , v ) = ( u v 0 2 x 2 − u v 0 x 2 − ux + v 0 x − v 0 ) ( u v 3 x 2 − u v 2 x 2 + u v 2 x − 2 uv x + v 2 x + uv − v 2 − u + v ) x ( ux + 1 ) ( u v 2 v 0 x 2 + uv v 0 2 x 2 − uv v 0 x 2 + uv v 0 x + v v 0 x − v v 0 + u ) .
Note that one may take u = v = 1 u=v=1 u = v = 1 in Theorem 3.7. Doing so, and noting v 0 ∣ u = 1 = 1 x 2 − 2 x − C 2 ( x ) v_{0}\big|_{u=1}=\frac{1}{x^{2}}-\frac{2}{x}-C^{2}(x) v 0 u = 1 = x 2 1 − x 2 − C 2 ( x ) , we get
B ( x , 1 , 1 ) = 1 1 − x B + ( x , 1 , 1 1 − x ) = 1 − 2 x − 1 − 4 x 2 , B(x,1,1)=\frac{1}{1-x}B_{+}\left(x,1,\frac{1}{1-x}\right)=\frac{1-2x-\sqrt{1-4x}}{2}, B ( x , 1 , 1 ) = 1 − x 1 B + ( x , 1 , 1 − x 1 ) = 2 1 − 2 x − 1 − 4 x ,
which yields the following result.
Corollary 3.8. We have B ( x , 1 , 1 ) = 1 − 2 x − 1 − 4 x 2 = x ( C − 1 ) B(x,1,1)=\frac{1-2x-\sqrt{1-4x}}{2}=x(C-1) B ( x , 1 , 1 ) = 2 1 − 2 x − 1 − 4 x = x ( C − 1 ) , and hence p n ( 2314 ) = C n − 1 p_n(2314)=C_{n-1} p n ( 2314 ) = C n − 1 for all n ≥ 1 n\geq1 n ≥ 1 .
Remark: One also obtains from Theorem 3.7 the formula
B + ( x , 1 , 1 ) = 1 − x − ( 1 + x ) 1 − 4 x 2 ( 2 + x ) , B_{+}(x,1,1)=\frac{1-x-(1+x)\sqrt{1-4x}}{2(2+x)}, B + ( x , 1 , 1 ) = 2 ( 2 + x ) 1 − x − ( 1 + x ) 1 − 4 x ,
from which B − ( x , 1 , 1 ) B_{-}(x,1,1) B − ( x , 1 , 1 ) may be found by subtraction from B ( x , 1 , 1 ) B(x,1,1) B ( x , 1 , 1 ) .
3214, 4213 and 4312
In this section, we prove Theorem 1.2 and first treat the pattern 3214. Let d n = p n ( 3214 ) d_n=p_n(3214) d n = p n ( 3214 ) . To determine d n d_n d n , we proceed in a manner analogous to that used in the derivation of the result for 2314. Given n ≥ 2 n\geq2 n ≥ 2 with i , j ∈ [ n ] i,j\in[n] i , j ∈ [ n ] and i ≠ j i\ne j i = j , let d n , i , j d_{n,i,j} d n , i , j denote the number of members of D n = P n ( 3214 ) D_n=P_n(3214) D n = P n ( 3214 ) whose last two letters are i , j i,j i , j . Note that d n = ∑ i = 1 n ∑ j = 1 j ≠ i n d n , i , j d_n=\sum_{i=1}^{n}\sum_{\substack{j=1\\j\ne i}}^{n}d_{n,i,j} d n = ∑ i = 1 n ∑ j = 1 j = i n d n , i , j for all n ≥ 2 n\geq2 n ≥ 2 . Furthermore, d n , i , 1 = d n , 1 , j = 0 d_{n,i,1}=d_{n,1,j}=0 d n , i , 1 = d n , 1 , j = 0 if n ≥ 3 n\geq3 n ≥ 3 for all i i i and j j j , with d 2 , 1 , 2 = 1 d_{2,1,2}=1 d 2 , 1 , 2 = 1 , d 2 , 2 , 1 = 0 d_{2,2,1}=0 d 2 , 2 , 1 = 0 .
The d n , i , j d_{n,i,j} d n , i , j are determined recursively as follows.
Lemma 4.1. If n ≥ 3 n\geq3 n ≥ 3 , then
d n , i , j = ∑ k = 0 i − j − 1 ∑ s = 1 j − 1 ( i − j − 1 k ) d n − k − 1 , s , i − k − 1 , 2 ≤ j < i ≤ n , (26) d_{n,i,j}=\sum_{k=0}^{i-j-1}\sum_{s=1}^{j-1}\binom{i-j-1}{k}d_{n-k-1,s,i-k-1},\qquad2\leq j<i\leq n, \tag*{(26)} d n , i , j = k = 0 ∑ i − j − 1 s = 1 ∑ j − 1 ( k i − j − 1 ) d n − k − 1 , s , i − k − 1 , 2 ≤ j < i ≤ n , (26) d n , i , i + 1 = ∑ s = 1 s ≠ i n − 1 d n − 1 , s , i , 2 ≤ i ≤ n − 1 , (27) d_{n,i,i+1}=\sum_{\substack{s=1\\s\ne i}}^{n-1}d_{n-1,s,i},\qquad2\leq i\leq n-1, \tag*{(27)} d n , i , i + 1 = s = 1 s = i ∑ n − 1 d n − 1 , s , i , 2 ≤ i ≤ n − 1 , (27)
and
d n , i , j = ∑ m = 0 j − i − 1 ∑ s = 1 i − 1 d n − m − 1 , s , j − m − 1 + ∑ m = 0 j − i − 1 ∑ r = j + 1 n ∑ k = 0 r − j − 1 ∑ s = 1 i − 1 ( r − j − 1 k ) d n − k − m − 2 , s , r − k − m − 2 , (28) d_{n,i,j}=\sum_{m=0}^{j-i-1}\sum_{s=1}^{i-1}d_{n-m-1,s,j-m-1}+\sum_{m=0}^{j-i-1}\sum_{r=j+1}^{n}\sum_{k=0}^{r-j-1}\sum_{s=1}^{i-1}\binom{r-j-1}{k}d_{n-k-m-2,s,r-k-m-2}, \tag*{(28)} d n , i , j = m = 0 ∑ j − i − 1 s = 1 ∑ i − 1 d n − m − 1 , s , j − m − 1 + m = 0 ∑ j − i − 1 r = j + 1 ∑ n k = 0 ∑ r − j − 1 s = 1 ∑ i − 1 ( k r − j − 1 ) d n − k − m − 2 , s , r − k − m − 2 , (28)
for 2 ≤ i < j − 1 ≤ n − 1 2\le i<j-1\le n-1 2 ≤ i < j − 1 ≤ n − 1 .
Proof. Formulas (26) and (27) may be justified as (18) and (19) were above, so we focus on (28). Let D n , i , j D_{n,i,j} D n , i , j denote the subset of D n D_n D n enumerated by d n , i , j d_{n,i,j} d n , i , j . Suppose π ∈ D n , i , j \pi\in D_{n,i,j} π ∈ D n , i , j , where 2 ≤ i < j − 1 2\le i<j-1 2 ≤ i < j − 1 . Let s s s denote the rightmost letter of π \pi π belonging to [ i − 1 ] [i-1] [ i − 1 ] and let r r r be the antepenultimate letter of π \pi π . If r ∈ [ i + 1 , j − 1 ] r\in[i+1,j-1] r ∈ [ i + 1 , j − 1 ] , then we must have r = j − 1 r=j-1 r = j − 1 in order to avoid 3214, and hence π \pi π is expressible as π = π ′ ( s ( j − m ) ( j − m + 1 ) ⋯ ( j − 1 ) i j \pi=\pi'(s(j-m)(j-m+1)\cdots(j-1)ij π = π ′ ( s ( j − m ) ( j − m + 1 ) ⋯ ( j − 1 ) ij for some 1 ≤ m ≤ j − i − 1 1\le m\le j-i-1 1 ≤ m ≤ j − i − 1 . Allowing m m m to equal zero accounts for the case in which r < i r<i r < i . Note that each of the letters j − m , … , j − 1 j-m,\ldots,j-1 j − m , … , j − 1 and i i i may be deleted, leaving a member of D n − m − 1 , s , j − m − 1 D_{n-m-1,s,j-m-1} D n − m − 1 , s , j − m − 1 . Considering all possible m m m and s s s yields the first summation on the right side of (28). If r > j r>j r > j , then the same argument applies as the one used in justifying the second summation in (20) except that now the number of letters in [ i + 1 , j − 1 ] [i+1,j-1] [ i + 1 , j − 1 ] occurring between s s s and i i i may range from 0 to j − i − 1 j-i-1 j − i − 1 , with these letters being j − m , j − m + 1 , … , j − 1 j-m,j-m+1,\ldots,j-1 j − m , j − m + 1 , … , j − 1 for each m m m . Thus, one need only replace ∑ m = 0 i − 1 \sum_{m=0}^{i-1} ∑ m = 0 i − 1 with ∑ m = 0 j − i − 1 \sum_{m=0}^{j-i-1} ∑ m = 0 j − i − 1 within the second summation in (20) to account for those members of D n , i , j D_{n,i,j} D n , i , j wherein i < j − 1 i<j-1 i < j − 1 for which r > j r>j r > j . Combining the prior cases then yields (28) and completes the proof.
Define the generating functions
D + ( x , u , v ) = ∑ n ≥ 2 ∑ i = 1 n − 1 ∑ j = i + 1 n d n , i , j u i − 1 v j − i − 1 x n D_{+}(x,u,v)=\sum_{n\ge2}\sum_{i=1}^{n-1}\sum_{j=i+1}^{n}d_{n,i,j}u^{i-1}v^{j-i-1}x^n D + ( x , u , v ) = n ≥ 2 ∑ i = 1 ∑ n − 1 j = i + 1 ∑ n d n , i , j u i − 1 v j − i − 1 x n
and
D − ( x , u , v ) = ∑ n ≥ 2 ∑ i = 2 n ∑ j = 1 i − 1 d n , i , j u i − 1 v j − i − 1 x n . D_{-}(x,u,v)=\sum_{n\ge2}\sum_{i=2}^{n}\sum_{j=1}^{i-1}d_{n,i,j}u^{i-1}v^{j-i-1}x^n. D − ( x , u , v ) = n ≥ 2 ∑ i = 2 ∑ n j = 1 ∑ i − 1 d n , i , j u i − 1 v j − i − 1 x n .
Translating the recurrences (26)–(28) to generating functions (we omit the details) yields the following functional equations.
Lemma 4.2. We have
D − ( x , u , v ) = u 2 x v ( 1 − v + u x ) ( 1 v − u x D + ( x , u , u v − u x ) − D + ( x , u , u ) ) . (29) D_{-}(x,u,v)=\frac{u^2x}{v(1-v+ux)}\left(\frac{1}{v-ux}D_{+}\left(x,u,\frac{u}{v-ux}\right)-D_{+}(x,u,u)\right). \tag*{(29)} D − ( x , u , v ) = v ( 1 − v + ux ) u 2 x ( v − ux 1 D + ( x , u , v − ux u ) − D + ( x , u , u ) ) . (29)
D + ( x , u , v ) = x 2 + u x ( D − ( x , u , u ) + D + ( x , u , u ) ) + u x ( 1 − v x ) ( u − v ) ( u D + ( x , u , u ) − v D + ( x , u , v ) ) − u x D + ( x , u , u ) + x 2 ( 1 − v x ) ( u − v ) ( u 2 ( 1 − x ) ( 1 − u + u x ) ( D + ( x , u , 1 1 − x ) − u ( 1 − x ) D + ( x , u , u ) ) + u v ( 1 − x ) ( 1 − v + v x ) ( v ( 1 − x ) D + ( x , u , v ) − D + ( x , u , 1 1 − x ) ) ) − u x 2 ( 1 − x ) ( 1 − u + u x ) ( D + ( x , u , 1 1 − x ) − u ( 1 − x ) D + ( x , u , u ) ) . (30) \begin{aligned}
D_{+}(x,u,v)={}&x^2+ux\bigl(D_{-}(x,u,u)+D_{+}(x,u,u)\bigr)\\
&+\frac{ux}{(1-vx)(u-v)}\bigl(uD_{+}(x,u,u)-vD_{+}(x,u,v)\bigr)-uxD_{+}(x,u,u)\\
&+\frac{x^2}{(1-vx)(u-v)}\left(\frac{u^2}{(1-x)(1-u+ux)}\left(D_{+}\left(x,u,\frac{1}{1-x}\right)-u(1-x)D_{+}(x,u,u)\right)\right.\\
&\qquad\left.+\frac{uv}{(1-x)(1-v+vx)}\left(v(1-x)D_{+}(x,u,v)-D_{+}\left(x,u,\frac{1}{1-x}\right)\right)\right)\\
&-\frac{ux^2}{(1-x)(1-u+ux)}\left(D_{+}\left(x,u,\frac{1}{1-x}\right)-u(1-x)D_{+}(x,u,u)\right). \tag*{(30)}
\end{aligned} D + ( x , u , v ) = x 2 + ux ( D − ( x , u , u ) + D + ( x , u , u ) ) + ( 1 − v x ) ( u − v ) ux ( u D + ( x , u , u ) − v D + ( x , u , v ) ) − ux D + ( x , u , u ) + ( 1 − v x ) ( u − v ) x 2 ( ( 1 − x ) ( 1 − u + ux ) u 2 ( D + ( x , u , 1 − x 1 ) − u ( 1 − x ) D + ( x , u , u ) ) + ( 1 − x ) ( 1 − v + v x ) uv ( v ( 1 − x ) D + ( x , u , v ) − D + ( x , u , 1 − x 1 ) ) ) − ( 1 − x ) ( 1 − u + ux ) u x 2 ( D + ( x , u , 1 − x 1 ) − u ( 1 − x ) D + ( x , u , u ) ) . (30)
Upon substituting (29) into (30), and simplifying, we obtain the following functional equation for D + ( x , u , v ) D_{+}(x,u,v) D + ( x , u , v ) :
u v 2 x 2 + v 3 x ( 1 − x ) + u v ( 1 − x ) − v 2 − u + v ( u − v ) ( 1 − v x ) ( 1 − v + v x ) D + ( x , u , v ) = u 2 x ( u − 1 ) ( u − v ) ( 1 − v x ) ( 1 − u + u x ) D + ( x , u , u ) − u x 2 ( 1 − x ) ( 1 − v x ) ( 1 − u + u x ) ( 1 − v + v x ) D + ( x , u , 1 1 − x ) − x 2 . (31) \frac{uv^2x^2+v^3x(1-x)+uv(1-x)-v^2-u+v}{(u-v)(1-vx)(1-v+vx)}D_{+}(x,u,v)
=
\frac{u^2x(u-1)}{(u-v)(1-vx)(1-u+ux)}D_{+}(x,u,u)
-\frac{ux^2}{(1-x)(1-vx)(1-u+ux)(1-v+vx)}D_{+}\left(x,u,\frac{1}{1-x}\right)-x^2. \tag*{(31)} ( u − v ) ( 1 − v x ) ( 1 − v + v x ) u v 2 x 2 + v 3 x ( 1 − x ) + uv ( 1 − x ) − v 2 − u + v D + ( x , u , v ) = ( u − v ) ( 1 − v x ) ( 1 − u + ux ) u 2 x ( u − 1 ) D + ( x , u , u ) − ( 1 − x ) ( 1 − v x ) ( 1 − u + ux ) ( 1 − v + v x ) u x 2 D + ( x , u , 1 − x 1 ) − x 2 . (31)
In order to solve (31) , let v i = v i ( x , u ) v_i=v_i(x,u) v i = v i ( x , u ) for 0 ≤ i ≤ 2 0\le i\le2 0 ≤ i ≤ 2 denote the roots of x ( 1 − x ) v 3 − ( 1 − u x 2 ) v 2 + ( 1 + u − u x ) v − u = 0 x(1-x)v^3-(1-ux^2)v^2+(1+u-ux)v-u=0 x ( 1 − x ) v 3 − ( 1 − u x 2 ) v 2 + ( 1 + u − ux ) v − u = 0 , which have series expansions
v 0 = x − 1 − u − u ( u + 1 ) x − u ( 2 u 2 + u + 2 ) x 2 + ⋯ , v_0=x^{-1}-u-u(u+1)x-u(2u^2+u+2)x^2+\cdots, v 0 = x − 1 − u − u ( u + 1 ) x − u ( 2 u 2 + u + 2 ) x 2 + ⋯ ,
v 1 = u + u 2 x + u 3 ( 2 u − 1 ) u − 1 x 2 + u 4 ( 5 u − 2 ) u − 1 x 3 + ⋯ , v_1=u+u^2x+\frac{u^3(2u-1)}{u-1}x^2+\frac{u^4(5u-2)}{u-1}x^3+\cdots, v 1 = u + u 2 x + u − 1 u 3 ( 2 u − 1 ) x 2 + u − 1 u 4 ( 5 u − 2 ) x 3 + ⋯ ,
v 2 = 1 + x − 1 u − 1 x 2 − 2 u + 1 u − 1 x 3 + ⋯ . v_2=1+x-\frac{1}{u-1}x^2-\frac{2u+1}{u-1}x^3+\cdots. v 2 = 1 + x − u − 1 1 x 2 − u − 1 2 u + 1 x 3 + ⋯ .
assuming 0 < ∣ u ∣ , ∣ x ∣ < 1 0<|u|,|x|<1 0 < ∣ u ∣ , ∣ x ∣ < 1 . By letting v = v 1 v=v_1 v = v 1 or v = v 2 v=v_2 v = v 2 in (31) , and solving the resulting system for D + ( x , u , u ) D_+(x,u,u) D + ( x , u , u ) and D + ( x , u , 1 1 − x ) D_+\left(x,u,\frac{1}{1-x}\right) D + ( x , u , 1 − x 1 ) , we obtain
D + ( x , u , u ) = ( u − v 1 ) ( u − v 2 ) x ( 1 − x ( 1 − x ) ( v 1 + v 2 ) ) u 2 ( 1 − u ) . D_+(x,u,u)=\frac{(u-v_1)(u-v_2)x(1-x(1-x)(v_1+v_2))}{u^2(1-u)}. D + ( x , u , u ) = u 2 ( 1 − u ) ( u − v 1 ) ( u − v 2 ) x ( 1 − x ( 1 − x ) ( v 1 + v 2 )) .
D + ( x , u , 1 1 − x ) = − ( 1 − x ) ( 1 − v 1 + v 1 x ) ( 1 − v 2 + v 2 x ) ( 1 + x ( u − v 1 − v 2 ) ) u . D_+\left(x,u,\frac{1}{1-x}\right)=-\frac{(1-x)(1-v_1+v_1x)(1-v_2+v_2x)(1+x(u-v_1-v_2))}{u}. D + ( x , u , 1 − x 1 ) = − u ( 1 − x ) ( 1 − v 1 + v 1 x ) ( 1 − v 2 + v 2 x ) ( 1 + x ( u − v 1 − v 2 )) .
Substituting these expressions into (31) yields
D + ( x , u , v ) = ( v − v 1 ) ( v − v 2 ) ( ( u − v − v 1 − v 2 ) x ( x − 1 ) − 1 ) x 2 v 2 ( u − v ) x 2 + v ( v 2 − u ) x − v 2 + u v − u + v (32) D_+(x,u,v)=\frac{(v-v_1)(v-v_2)((u-v-v_1-v_2)x(x-1)-1)x^2}{v^2(u-v)x^2+v(v^2-u)x-v^2+uv-u+v} \tag*{(32)} D + ( x , u , v ) = v 2 ( u − v ) x 2 + v ( v 2 − u ) x − v 2 + uv − u + v ( v − v 1 ) ( v − v 2 ) (( u − v − v 1 − v 2 ) x ( x − 1 ) − 1 ) x 2 (32)
Let D ( x , u , v ) = ∑ n ≥ 2 ∑ i = 1 n ∑ j = 1 j ≠ i n d n , i , j u i − 1 v j − i − 1 x n D(x,u,v)=\sum_{n\ge2}\sum_{i=1}^{n}\sum_{\substack{j=1\\j\ne i}}^{n}d_{n,i,j}u^{i-1}v^{j-i-1}x^n D ( x , u , v ) = ∑ n ≥ 2 ∑ i = 1 n ∑ j = 1 j = i n d n , i , j u i − 1 v j − i − 1 x n .
Theorem 4.3. The generating function D ( x , u , v ) D(x,u,v) D ( x , u , v ) is given by D ( x , u , v ) = D + ( x , u , v ) + D − ( x , u , v ) D(x,u,v)=D_+(x,u,v)+D_-(x,u,v) D ( x , u , v ) = D + ( x , u , v ) + D − ( x , u , v ) , where D + ( x , u , v ) D_+(x,u,v) D + ( x , u , v ) and D − ( x , u , v ) D_-(x,u,v) D − ( x , u , v ) are as in (32) and (29) , respectively.
Using the facts v 0 v 1 v 2 = u x ( 1 − x ) v_0v_1v_2=\frac{u}{x(1-x)} v 0 v 1 v 2 = x ( 1 − x ) u and v 0 + v 1 + v 2 = 1 − u x 2 x ( 1 − x ) v_0+v_1+v_2=\frac{1-ux^2}{x(1-x)} v 0 + v 1 + v 2 = x ( 1 − x ) 1 − u x 2 in (32) , one can obtain a formula for D ( x , u , v ) D(x,u,v) D ( x , u , v ) involving only v 0 v_0 v 0 .
Theorem 4.4. We have
D ( x , u , v ) = D + ( x , u , v ) + u 2 x v ( 1 − v + u x ) ( 1 v − u x D + ( x , u , u v − u x ) − D + ( x , u , u ) ) , D(x,u,v)=D_+(x,u,v)+\frac{u^2x}{v(1-v+ux)}\left(\frac{1}{v-ux}D_+\left(x,u,\frac{u}{v-ux}\right)-D_+(x,u,u)\right), D ( x , u , v ) = D + ( x , u , v ) + v ( 1 − v + ux ) u 2 x ( v − ux 1 D + ( x , u , v − ux u ) − D + ( x , u , u ) ) , where
D + ( x , u , v ) = x 2 ( v x − v 0 x + u − v + v 0 ) ( u v v 0 x 2 − v 2 v 0 x 2 − v v 0 2 x 2 + v 2 v 0 x + v v 0 2 x − v v 0 + u ) v 0 ( x − 1 ) ( u v 2 x 2 − v 3 x 2 + v 3 x − u v x + u v − v 2 − u + v ) . D_+(x,u,v)=\frac{x^2(vx-v_0x+u-v+v_0)(uvv_0x^2-v^2v_0x^2-vv_0^2x^2+v^2v_0x+vv_0^2x-vv_0+u)}{v_0(x-1)(uv^2x^2-v^3x^2+v^3x-uvx+uv-v^2-u+v)}. D + ( x , u , v ) = v 0 ( x − 1 ) ( u v 2 x 2 − v 3 x 2 + v 3 x − uv x + uv − v 2 − u + v ) x 2 ( v x − v 0 x + u − v + v 0 ) ( uv v 0 x 2 − v 2 v 0 x 2 − v v 0 2 x 2 + v 2 v 0 x + v v 0 2 x − v v 0 + u ) .
Taking u = v = 1 u=v=1 u = v = 1 in Theorem 4.4, and observing v 0 ∣ u = 1 = − 3 2 x + 1 2 x 1 − 5 x 1 − x v_0|_{u=1}=-\frac{3}{2x}+\frac{1}{2x}\sqrt{\frac{1-5x}{1-x}} v 0 ∣ u = 1 = − 2 x 3 + 2 x 1 1 − x 1 − 5 x , we have
D + ( x , 1 , 1 ) = x ( 1 + x − 4 x 2 + 2 x 3 − 1 − 6 x + 5 x 2 ) 2 ( 1 − x ) ( 2 − x ) . D_+(x,1,1)=\frac{x(1+x-4x^2+2x^3-\sqrt{1-6x+5x^2})}{2(1-x)(2-x)}. D + ( x , 1 , 1 ) = 2 ( 1 − x ) ( 2 − x ) x ( 1 + x − 4 x 2 + 2 x 3 − 1 − 6 x + 5 x 2 ) .
and
D − ( x , 1 , 1 ) = x ( 1 − 3 x + 2 x 2 − 1 − 6 x + 5 x 2 ) 2 ( 2 − x ) , D_-(x,1,1)=\frac{x(1-3x+2x^2-\sqrt{1-6x+5x^2})}{2(2-x)}, D − ( x , 1 , 1 ) = 2 ( 2 − x ) x ( 1 − 3 x + 2 x 2 − 1 − 6 x + 5 x 2 ) ,
which yields the following result.
Corollary 4.5. The generating function ∑ n ≥ 2 p n ( 3214 ) x n \sum_{n\ge2}p_n(3214)x^n ∑ n ≥ 2 p n ( 3214 ) x n is given by
D ( x , 1 , 1 ) = x ( 1 − x − 1 − 6 x + 5 x 2 ) 2 ( 1 − x ) , D(x,1,1)=\frac{x(1-x-\sqrt{1-6x+5x^2})}{2(1-x)}, D ( x , 1 , 1 ) = 2 ( 1 − x ) x ( 1 − x − 1 − 6 x + 5 x 2 ) , and hence p n ( 3214 ) = ∑ k = 0 n − 2 ( n − 2 k ) C k p_n(3214)=\sum_{k=0}^{n-2}\binom{n-2}{k}C_k p n ( 3214 ) = ∑ k = 0 n − 2 ( k n − 2 ) C k for all n ≥ 2 n\ge2 n ≥ 2 .
We now consider the cases of avoiding 4213 or 4312, which may be treated together. Let e n = p n ( 4213 ) e_n=p_n(4213) e n = p n ( 4213 ) for n ≥ 1 n\ge1 n ≥ 1 . To determine e n e_n e n , we consider a refinement of e n e_n e n as follows. Given n ≥ 3 n\ge3 n ≥ 3 and 3 ≤ i ≤ n 3\le i\le n 3 ≤ i ≤ n , let E n , i \mathcal{E}_{n,i} E n , i denote the subset of E n = P n ( 4213 ) \mathcal{E}_n=\mathcal{P}_n(4213) E n = P n ( 4213 ) whose members have first descent top i i i and let E n , i ∗ ⊆ E n , i \mathcal{E}^{*}_{n,i}\subseteq\mathcal{E}_{n,i} E n , i ∗ ⊆ E n , i consist of those members that start 1 i 2 1i2 1 i 2 . Let e n , i = ∣ E n , i ∣ e_{n,i}=|\mathcal{E}_{n,i}| e n , i = ∣ E n , i ∣ and e n , i ∗ = ∣ E n , i ∗ ∣ e^{*}_{n,i}=|\mathcal{E}^{*}_{n,i}| e n , i ∗ = ∣ E n , i ∗ ∣ . For example, when n = 5 n=5 n = 5 and i = 4 i=4 i = 4 , then we have e 5 , 4 = 4 e_{5,4}=4 e 5 , 4 = 4 , the enumerated members of E 5 \mathcal{E}_5 E 5 comprising { 12435 , 13425 , 14235 , 14253 } \{12435,13425,14235,14253\} { 12435 , 13425 , 14235 , 14253 } , and e 5 , 4 ∗ = 2 e^{*}_{5,4}=2 e 5 , 4 ∗ = 2 , which accounts for { 14235 , 14253 } \{14235,14253\} { 14235 , 14253 } . Note e n , i e_{n,i} e n , i and e n , i ∗ e^{*}_{n,i} e n , i ∗ may assume nonzero values only for n ≥ 3 n\ge3 n ≥ 3 and i ∈ [ 3 , n ] i\in[3,n] i ∈ [ 3 , n ] .
The e n , i e_{n,i} e n , i and e n , i ∗ e^{*}_{n,i} e n , i ∗ satisfy the following system of recurrences.
Lemma 4.6. We have
e n = 1 + ∑ i = 3 n e n , i , n ≥ 3 , (33) e_n=1+\sum_{i=3}^{n}e_{n,i},\qquad n\ge3, \tag*{(33)} e n = 1 + i = 3 ∑ n e n , i , n ≥ 3 , (33) e n , i = ∑ j = 0 i − 3 ( i − 2 j ) e n − j , i − j ∗ , 3 ≤ i ≤ n , (34) e_{n,i}=\sum_{j=0}^{i-3}\binom{i-2}{j}e^{*}_{n-j,i-j},\qquad3\le i\le n, \tag*{(34)} e n , i = j = 0 ∑ i − 3 ( j i − 2 ) e n − j , i − j ∗ , 3 ≤ i ≤ n , (34) and
e n , i ∗ = ∑ m = 1 i − 3 e n − m , i − m ∗ + ∑ k = i + 1 n ∑ j = 0 k − i − 1 ∑ m = 2 i − 2 ( k − i − 1 j ) e n − m − j , k − m − j ∗ , 5 ≤ i ≤ n − 1 , (35) e^{*}_{n,i}=\sum_{m=1}^{i-3}e^{*}_{n-m,i-m}+\sum_{k=i+1}^{n}\sum_{j=0}^{k-i-1}\sum_{m=2}^{i-2}\binom{k-i-1}{j}e^{*}_{n-m-j,k-m-j},\qquad5\le i\le n-1, \tag*{(35)} e n , i ∗ = m = 1 ∑ i − 3 e n − m , i − m ∗ + k = i + 1 ∑ n j = 0 ∑ k − i − 1 m = 2 ∑ i − 2 ( j k − i − 1 ) e n − m − j , k − m − j ∗ , 5 ≤ i ≤ n − 1 , (35) with e 1 = e 2 = 1 e_1=e_2=1 e 1 = e 2 = 1 , e n , 3 ∗ = e n − 2 e^{*}_{n,3}=e_{n-2} e n , 3 ∗ = e n − 2 for n ≥ 3 n\ge3 n ≥ 3 , e n , 4 ∗ = e n − 2 e^{*}_{n,4}=e_{n-2} e n , 4 ∗ = e n − 2 and e n , n ∗ = 2 n − 4 e^{*}_{n,n}=2^{n-4} e n , n ∗ = 2 n − 4 for n ≥ 4 n\ge4 n ≥ 4 . Moreover, the same recurrences and initial conditions are seen to hold if the arrays e n , i e_{n,i} e n , i and e n , i ∗ e^{*}_{n,i} e n , i ∗ are defined in conjunction with the pattern 4312 instead of 4213, and hence, in particular, p n ( 4312 ) = p n ( 4213 ) p_n(4312)=p_n(4213) p n ( 4312 ) = p n ( 4213 ) for all $n\ge 1.
Proof. Formula (33) follows from the definitions, where the extra added one prior to the sum accounts for the no descents permutation 12 ⋯ n 12\cdots n 12 ⋯ n . A member π ∈ E n , i \pi\in\mathcal{E}_{n,i} π ∈ E n , i for 3 ≤ i ≤ n 3\le i\le n 3 ≤ i ≤ n is expressible as π = 1 α i 2 β \pi=1\alpha i2\beta π = 1 α i 2 β , where α \alpha α consists of elements of a subset of [ 2 , i − 1 ] [2,i-1] [ 2 , i − 1 ] in increasing order. Note that this subset must be proper or else i i i would not be a descent top. The letters in α \alpha α are extraneous concerning the avoidance of 4213 as they are followed by i i i and thus may be deleted, leaving an arbitrary member of E n − j , i − j ∗ \mathcal{E}^{*}_{n-j,i-j} E n − j , i − j ∗ after standardization, where j = ∣ α ∣ j=|\alpha| j = ∣ α ∣ . Considering all possible 0 ≤ j ≤ i − 3 0\le j\le i-3 0 ≤ j ≤ i − 3 then implies (34) .
Deletion of the first two letters of a member of E n , 3 ∗ \mathcal{E}^{*}_{n,3} E n , 3 ∗ or E n , 4 ∗ \mathcal{E}^{*}_{n,4} E n , 4 ∗ results in a member of E n − 2 \mathcal{E}_{n-2} E n − 2 with no restrictions, whence e n , 3 ∗ = e n , 4 ∗ = e n − 2 e^{*}_{n,3}=e^{*}_{n,4}=e_{n-2} e n , 3 ∗ = e n , 4 ∗ = e n − 2 . Further, π ∈ E n , n ∗ \pi\in\mathcal{E}^{*}_{n,n} π ∈ E n , n ∗ implies π = 1 n π ′ \pi=1n\pi' π = 1 n π ′ , where π ′ \pi' π ′ is 213-avoiding. In [12 Theorem 4] , it was shown p n ( 213 ) = 2 n − 2 p_n(213)=2^{n-2} p n ( 213 ) = 2 n − 2 for all n ≥ 2 n\ge2 n ≥ 2 , which implies e n , n ∗ = 2 n − 4 e^{*}_{n,n}=2^{n-4} e n , n ∗ = 2 n − 4 for n ≥ 4 n\ge4 n ≥ 4 . Finally, suppose π ∈ E n , i ∗ \pi\in\mathcal{E}^{*}_{n,i} π ∈ E n , i ∗ , where n ≥ 6 n\ge6 n ≥ 6 and 5 ≤ i ≤ n − 1 5\le i\le n-1 5 ≤ i ≤ n − 1 , and suppose π = 1 i 2 x π ′ \pi=1i2x\pi' π = 1 i 2 x π ′ , where x ≥ 3 x\ge3 x ≥ 3 . We consider several cases on x x x . If x = 3 x=3 x = 3 , then 3 may clearly be deleted, giving e n − 1 , i − 1 ∗ e^{*}_{n-1,i-1} e n − 1 , i − 1 ∗ possibilities. Now assume x ∈ [ 4 , i − 1 ] x\in[4,i-1] x ∈ [ 4 , i − 1 ] . If x < i − 1 x<i-1 x < i − 1 , then x x x must be directly followed by x + 1 , x + 2 , … , i − 1 x+1,x+2,\ldots,i-1 x + 1 , x + 2 , … , i − 1 , for otherwise the subsequence i x 3 ( x + 1 ) ix3(x+1) i x 3 ( x + 1 ) is an occurrence of 4213. In particular, if x ∈ [ 4 , i − 1 ] x\in[4,i-1] x ∈ [ 4 , i − 1 ] , then i − 1 i-1 i − 1 must occur somewhere between 2 and 3 within π \pi π . If 3 directly follows i − 1 i-1 i − 1 , then the letters x , x + 1 , … , i − 2 x,x+1,\ldots,i-2 x , x + 1 , … , i − 2 as well as 1 and i i i may all be deleted, and thus we get ∑ m = 2 i − 3 e n − m , i − m ∗ \sum_{m=2}^{i-3}e^{*}_{n-m,i-m} ∑ m = 2 i − 3 e n − m , i − m ∗ possibilities for π \pi π upon allowing x x x to vary. Combining this with the prior case wherein x = 3 x=3 x = 3 accounts for the first summation on the right-hand side of (35) .
So assume either x ∈ [ i + 1 , n ] x\in[i+1,n] x ∈ [ i + 1 , n ] or x ∈ [ 4 , i − 1 ] x\in[4,i-1] x ∈ [ 4 , i − 1 ] , with at least one letter in [ i + 1 , n ] [i+1,n] [ i + 1 , n ] occurring prior to 3 in the latter case. Let k ∈ [ i + 1 , n ] k\in[i+1,n] k ∈ [ i + 1 , n ] denote the predecessor of 3 in either case. Then we may write π = 1 i 2 α β k 3 π ′ \pi=1i2\alpha\beta k3\pi' π = 1 i 2 α β k 3 π ′ , where α \alpha α , β \beta β and π ′ \pi' π ′ are possibly empty and α \alpha α and β \beta β are increasing and consist of letters in [ 4 , i − 1 ] [4,i-1] [ 4 , i − 1 ] and [ i + 1 , k − 1 ] [i+1,k-1] [ i + 1 , k − 1 ] , respectively. Let m = ∣ α ∣ m=|\alpha| m = ∣ α ∣ and j = ∣ β ∣ j=|\beta| j = ∣ β ∣ , where 0 ≤ m ≤ i − 4 0\le m\le i-4 0 ≤ m ≤ i − 4 and 0 ≤ j ≤ k − i − 1 0\le j\le k-i-1 0 ≤ j ≤ k − i − 1 . Then we must have α = ( i − m ) + ⋯ + ( i − 1 ) \alpha=(i-m)+\cdots+(i-1) α = ( i − m ) + ⋯ + ( i − 1 ) in order to avoid 4213, which provides ( k − i − 1 j ) \binom{k-i-1}{j} ( j k − i − 1 ) possibilities for β \beta β . Note that all of the letters in α \alpha α and β \beta β as well as 1 and i i i may be deleted, as they place no further restriction on π ′ \pi' π ′ with regard to 4213 due to k k k directly following them. Thus, the subsequence 2 k 3 π ′ 2k3\pi' 2 k 3 π ′ is seen to correspond to an arbitrary member of E n − m − j − 2 , k − m − j − 2 ∗ \mathcal{E}^{*}_{n-m-j-2,k-m-j-2} E n − m − j − 2 , k − m − j − 2 ∗ . Conversely, any π \pi π of the stated form satisfying all of the requirements given above concerning α \alpha α , β \beta β and π ′ \pi' π ′ is seen to avoid 4213. Considering all possible k k k , j j j , and m m m , and replacing m m m by m − 2 m-2 m − 2 , accounts for the second summation in (35) and thus completes the proof of (35).
Concerning the final statement, we leave it as an exercise for the reader to verify that the same recurrences and initial conditions apply to the arrays e n , i e_{n,i} e n , i and e n , i ∗ e^{*}_{n,i} e n , i ∗ if they are defined in conjunction with the pattern 4312 instead of 4213. The argument follows a similar course. If desired, it is also possible to define a recursive bijection between E n \mathcal{E}_n E n and P n ( 4312 ) \mathcal{P}_n(4312) P n ( 4312 ) drawing upon the various cases used above in proving (35). ∎
Let E ( x , v ) = ∑ n ≥ 3 ∑ i = 3 n e n , i ∗ v i − 3 x n E(x,v)=\sum_{n\ge3}\sum_{i=3}^{n}e^*_{n,i}v^{i-3}x^n E ( x , v ) = ∑ n ≥ 3 ∑ i = 3 n e n , i ∗ v i − 3 x n , F ( x , v ) = ∑ n ≥ 3 ∑ i = 3 n e n , i ∗ v i − 3 x n F(x,v)=\sum_{n\ge3}\sum_{i=3}^{n}e^*_{n,i}v^{i-3}x^n F ( x , v ) = ∑ n ≥ 3 ∑ i = 3 n e n , i ∗ v i − 3 x n and G ( x ) = ∑ n ≥ 2 e n x n G(x)=\sum_{n\ge2}e_nx^n G ( x ) = ∑ n ≥ 2 e n x n . We obtain the following system of functional equations.
Lemma 4.7. We have
G ( x ) = x 2 1 − x + E ( x , 1 ) , (36) G(x)=\frac{x^2}{1-x}+E(x,1), \tag*{(36)} G ( x ) = 1 − x x 2 + E ( x , 1 ) , (36) E ( x , v ) = 1 ( 1 − v x ) 2 F ( x , v 1 − v x ) , (37) E(x,v)=\frac{1}{(1-vx)^2}F\left(x,\frac{v}{1-vx}\right), \tag*{(37)} E ( x , v ) = ( 1 − v x ) 2 1 F ( x , 1 − v x v ) , (37) ( 1 − v x 1 − v x + v 2 x 2 ( 1 − v x ) ( 1 − v + v x ) ) F ( x , v ) = x 3 ( 1 − v x ) + x 2 ( 1 + v − v x ) G ( x ) + v x 2 1 − x ( 1 ( 1 − v x ) ( 1 − v + v x ) − 1 ) F ( x , 1 1 − x ) . (38) \begin{aligned}
\left(1-\frac{vx}{1-vx}+\frac{v^2x^2}{(1-vx)(1-v+vx)}\right)F(x,v)
={}&x^3(1-vx)+x^2(1+v-vx)G(x)\\
&+\frac{vx^2}{1-x}\left(\frac{1}{(1-vx)(1-v+vx)}-1\right)
F\left(x,\frac{1}{1-x}\right). \tag*{(38)}
\end{aligned} ( 1 − 1 − v x v x + ( 1 − v x ) ( 1 − v + v x ) v 2 x 2 ) F ( x , v ) = x 3 ( 1 − v x ) + x 2 ( 1 + v − v x ) G ( x ) + 1 − x v x 2 ( ( 1 − v x ) ( 1 − v + v x ) 1 − 1 ) F ( x , 1 − x 1 ) . (38)
Proof. (36) follows from (33) and the definitions of the respective generating functions. From (34), we get
E ( x , v ) = ∑ n ≥ 3 ∑ i = 3 n ∑ j = 0 i − 3 ( i − 2 j ) e n − j , i − j ∗ v i − 3 x n = ∑ j ≥ 0 ∑ n ≥ j + 3 ∑ i = j + 3 n ( i − 2 j ) e n − j , i − j ∗ v i − 3 x n = ∑ j ≥ 0 ∑ n ≥ 3 ∑ i = 3 n ( i + j − 2 j ) e n , i ∗ v i + j − 3 x n + j = ∑ n ≥ 3 ∑ i = 3 n e n , i ∗ v i − 3 x n ⋅ 1 ( 1 − v x ) i − 1 = 1 ( 1 − v x ) 2 F ( x , v 1 − v x ) , \begin{aligned}
E(x,v)
&=\sum_{n\ge3}\sum_{i=3}^{n}\sum_{j=0}^{i-3}
\binom{i-2}{j}e^*_{n-j,i-j}v^{i-3}x^n\\
&=\sum_{j\ge0}\sum_{n\ge j+3}\sum_{i=j+3}^{n}
\binom{i-2}{j}e^*_{n-j,i-j}v^{i-3}x^n\\
&=\sum_{j\ge0}\sum_{n\ge3}\sum_{i=3}^{n}
\binom{i+j-2}{j}e^*_{n,i}v^{i+j-3}x^{n+j}\\
&=\sum_{n\ge3}\sum_{i=3}^{n}e^*_{n,i}v^{i-3}x^n
\cdot\frac{1}{(1-vx)^{i-1}}
=\frac{1}{(1-vx)^2}F\left(x,\frac{v}{1-vx}\right),
\end{aligned} E ( x , v ) = n ≥ 3 ∑ i = 3 ∑ n j = 0 ∑ i − 3 ( j i − 2 ) e n − j , i − j ∗ v i − 3 x n = j ≥ 0 ∑ n ≥ j + 3 ∑ i = j + 3 ∑ n ( j i − 2 ) e n − j , i − j ∗ v i − 3 x n = j ≥ 0 ∑ n ≥ 3 ∑ i = 3 ∑ n ( j i + j − 2 ) e n , i ∗ v i + j − 3 x n + j = n ≥ 3 ∑ i = 3 ∑ n e n , i ∗ v i − 3 x n ⋅ ( 1 − v x ) i − 1 1 = ( 1 − v x ) 2 1 F ( x , 1 − v x v ) ,
which yields (37). For (38), first note that by the formulas for e n , i ∗ e^*_{n,i} e n , i ∗ when i = 2 i=2 i = 2 , 3 3 3 or n n n , we have
∑ n ≥ 6 ∑ i = 5 n − 1 e n , i ∗ v i − 3 x n = F ( x , v ) − ∑ n ≥ 3 e n − 2 x n − v ∑ n ≥ 4 e n − 2 x n − ∑ n ≥ 5 2 n − 4 v n − 3 x n = F ( x , v ) − x 3 − x 2 ( 1 + v ) G ( x ) − 2 v 2 x 5 1 − 2 v x . (39) \begin{aligned}
\sum_{n\ge6}\sum_{i=5}^{n-1}e^*_{n,i}v^{i-3}x^n
&=F(x,v)-\sum_{n\ge3}e_{n-2}x^n-v\sum_{n\ge4}e_{n-2}x^n-\sum_{n\ge5}2^{n-4}v^{n-3}x^n\\
&=F(x,v)-x^3-x^2(1+v)G(x)-\frac{2v^2x^5}{1-2vx}. \tag*{(39)}
\end{aligned} n ≥ 6 ∑ i = 5 ∑ n − 1 e n , i ∗ v i − 3 x n = F ( x , v ) − n ≥ 3 ∑ e n − 2 x n − v n ≥ 4 ∑ e n − 2 x n − n ≥ 5 ∑ 2 n − 4 v n − 3 x n = F ( x , v ) − x 3 − x 2 ( 1 + v ) G ( x ) − 1 − 2 v x 2 v 2 x 5 . (39)
On the other hand, multiplying both sides of (35) by v i − 3 x n v^{i-3}x^n v i − 3 x n , and summing over all 5 ≤ i ≤ n − 1 5\le i\le n-1 5 ≤ i ≤ n − 1 , we get
∑ n ≥ 6 ∑ i = 5 n − 1 e n , i ∗ v i − 3 x n = ∑ n ≥ 6 ∑ i = 5 n − 1 ∑ m = 1 i − 3 e n − m , i − m ∗ v i − 3 x n + ∑ n ≥ 6 ∑ i = 5 n − 1 ∑ k = i + 1 n − 1 ∑ j = 0 k − i − 1 ∑ m = 2 i − 2 ( k − i − 1 j ) e n − m − j , k − m − j ∗ v i − 3 x n . (40) \begin{aligned}
\sum_{n\ge6}\sum_{i=5}^{n-1}e^*_{n,i}v^{i-3}x^n
={}&\sum_{n\ge6}\sum_{i=5}^{n-1}\sum_{m=1}^{i-3}e^*_{n-m,i-m}v^{i-3}x^n\\
&+\sum_{n\ge6}\sum_{i=5}^{n-1}\sum_{k=i+1}^{n-1}\sum_{j=0}^{k-i-1}\sum_{m=2}^{i-2}
\binom{k-i-1}{j}e^*_{n-m-j,k-m-j}v^{i-3}x^n. \tag*{(40)}
\end{aligned} n ≥ 6 ∑ i = 5 ∑ n − 1 e n , i ∗ v i − 3 x n = n ≥ 6 ∑ i = 5 ∑ n − 1 m = 1 ∑ i − 3 e n − m , i − m ∗ v i − 3 x n + n ≥ 6 ∑ i = 5 ∑ n − 1 k = i + 1 ∑ n − 1 j = 0 ∑ k − i − 1 m = 2 ∑ i − 2 ( j k − i − 1 ) e n − m − j , k − m − j ∗ v i − 3 x n . (40)
Working separately on the last two sums, we have that the first sum is given by
∑ n ≥ 6 ∑ i = 5 n − 1 ∑ m = 1 i − 3 e n − m , i − m ∗ v i − 3 x n = ∑ n ≥ 6 ∑ m = 1 n − 4 ∑ i = m + 3 n − 1 e n − m , i − m ∗ v i − 3 x n − v ∑ n ≥ 6 e n − 1 , 3 ∗ x n = ∑ m ≥ 1 ∑ n ≥ m + 4 ∑ i = m + 3 n − 1 e n − m , i − m ∗ v i − 3 x n − v ∑ n ≥ 5 e n − 1 , 3 ∗ x n = ∑ m ≥ 1 ∑ n ≥ 4 ∑ i = 3 n e n , i ∗ v i + m − 3 x n + m − v ∑ n ≥ 5 e n − 3 x n . = ∑ n ≥ 4 ∑ i = 3 n − 1 e n , i ∗ v i − 3 x n ⋅ v x 1 − v x − v x 3 G ( x ) = v x 1 − v x ( F ( x , v ) − x 3 − v x 4 1 − 2 v x ) − v x 3 G ( x ) . \begin{aligned}
\sum_{n\ge6}\sum_{i=5}^{n-1}\sum_{m=1}^{i-3}e^*_{n-m,i-m}v^{i-3}x^n
={}&\sum_{n\ge6}\sum_{m=1}^{n-4}\sum_{i=m+3}^{n-1}e^*_{n-m,i-m}v^{i-3}x^n
-v\sum_{n\ge6}e^*_{n-1,3}x^n\\
={}&\sum_{m\ge1}\sum_{n\ge m+4}\sum_{i=m+3}^{n-1}e^*_{n-m,i-m}v^{i-3}x^n
-v\sum_{n\ge5}e^*_{n-1,3}x^n\\
={}&\sum_{m\ge1}\sum_{n\ge4}\sum_{i=3}^{n}e^*_{n,i}v^{i+m-3}x^{n+m}
-v\sum_{n\ge5}e_{n-3}x^n. \\
&= \sum_{n\ge4}\sum_{i=3}^{n-1} e^*_{n,i}v^{i-3}x^n\cdot\frac{vx}{1-vx}-vx^3G(x) \\
&= \frac{vx}{1-vx}\left(F(x,v)-x^3-\frac{vx^4}{1-2vx}\right)-vx^3G(x).
\end{aligned} n ≥ 6 ∑ i = 5 ∑ n − 1 m = 1 ∑ i − 3 e n − m , i − m ∗ v i − 3 x n = = = n ≥ 6 ∑ m = 1 ∑ n − 4 i = m + 3 ∑ n − 1 e n − m , i − m ∗ v i − 3 x n − v n ≥ 6 ∑ e n − 1 , 3 ∗ x n m ≥ 1 ∑ n ≥ m + 4 ∑ i = m + 3 ∑ n − 1 e n − m , i − m ∗ v i − 3 x n − v n ≥ 5 ∑ e n − 1 , 3 ∗ x n m ≥ 1 ∑ n ≥ 4 ∑ i = 3 ∑ n e n , i ∗ v i + m − 3 x n + m − v n ≥ 5 ∑ e n − 3 x n . = n ≥ 4 ∑ i = 3 ∑ n − 1 e n , i ∗ v i − 3 x n ⋅ 1 − v x v x − v x 3 G ( x ) = 1 − v x v x ( F ( x , v ) − x 3 − 1 − 2 v x v x 4 ) − v x 3 G ( x ) .
For the second sum on the right side of (40) , we get
∑ n ≥ 6 ∑ i = 5 n − 1 ∑ k = i + 1 n ∑ j = 0 k − i − 1 ∑ m = 2 i − 2 ( k − i − 1 j ) e n − m − j , k − m − j ∗ v i − 3 x n = ∑ n ≥ 6 ∑ j = 0 n − 6 ∑ i = 5 n − j − 1 ∑ m = 2 i − 2 ∑ k = i + j + 1 n ( k − i − 1 j ) e n − m − j , k − m − j ∗ v i − 3 x n = ∑ j ≥ 0 ∑ n ≥ j + 6 ∑ m = 2 n − j − 3 ∑ i = m + 2 n − j − 1 ∑ k = i + j + 1 n ( k − i − 1 j ) e n − m − j , k − m − j ∗ v i − 3 x n − S , \begin{aligned}
\sum_{n\ge6}\sum_{i=5}^{n-1}\sum_{k=i+1}^{n}\sum_{j=0}^{k-i-1}\sum_{m=2}^{i-2}\binom{k-i-1}{j}e^*_{n-m-j,k-m-j}v^{i-3}x^n \\
&= \sum_{n\ge6}\sum_{j=0}^{n-6}\sum_{i=5}^{n-j-1}\sum_{m=2}^{i-2}\sum_{k=i+j+1}^{n}\binom{k-i-1}{j}e^*_{n-m-j,k-m-j}v^{i-3}x^n \\
&= \sum_{j\ge0}\sum_{n\ge j+6}\sum_{m=2}^{n-j-3}\sum_{i=m+2}^{n-j-1}\sum_{k=i+j+1}^{n}\binom{k-i-1}{j}e^*_{n-m-j,k-m-j}v^{i-3}x^n-S,
\end{aligned} n ≥ 6 ∑ i = 5 ∑ n − 1 k = i + 1 ∑ n j = 0 ∑ k − i − 1 m = 2 ∑ i − 2 ( j k − i − 1 ) e n − m − j , k − m − j ∗ v i − 3 x n = n ≥ 6 ∑ j = 0 ∑ n − 6 i = 5 ∑ n − j − 1 m = 2 ∑ i − 2 k = i + j + 1 ∑ n ( j k − i − 1 ) e n − m − j , k − m − j ∗ v i − 3 x n = j ≥ 0 ∑ n ≥ j + 6 ∑ m = 2 ∑ n − j − 3 i = m + 2 ∑ n − j − 1 k = i + j + 1 ∑ n ( j k − i − 1 ) e n − m − j , k − m − j ∗ v i − 3 x n − S ,
where S = v ∑ j ≥ 0 ∑ n ≥ j + 6 ∑ k = j + 5 n ( k − 5 j ) e n − j − 2 , k − j − 2 x n S=v\sum_{j\ge0}\sum_{n\ge j+6}\sum_{k=j+5}^{n}\binom{k-5}{j}e_{n-j-2,k-j-2}x^n S = v ∑ j ≥ 0 ∑ n ≥ j + 6 ∑ k = j + 5 n ( j k − 5 ) e n − j − 2 , k − j − 2 x n , upon adding and subtracting to the summation the case when i = 4 i=4 i = 4 . Considering separately the cases when m ≥ 3 m\ge3 m ≥ 3 or m = 2 m=2 m = 2 , one obtains
∑ j ≥ 0 ∑ m ≥ 3 ∑ n ≥ j + m + 3 ∑ i = m + 2 n − j − 1 ∑ k = i + j + 1 n ( k − i − 1 j ) e n − m − j , k − m − j ∗ v i − 3 x n + ∑ j ≥ 0 ∑ n ≥ j + 6 ∑ i = 4 n − j − 1 ∑ k = i + j + 1 n ( k − i − 1 j ) e n − j − 2 , k − j − 2 ∗ v i − 3 x n − S = ∑ j ≥ 0 ∑ m ≥ 3 ∑ i ≥ m + 2 ∑ n ≥ i + j + 1 ∑ k = i + j + 1 n ( k − i − 1 j ) e n − m − j , k − m − j ∗ v i − 3 x n + ∑ j ≥ 0 ∑ i ≥ 5 ∑ n ≥ i + j + 1 ∑ k = i + j + 1 n ( k − i − 1 j ) e n − j − 2 , k − j − 2 ∗ v i − 3 x n = ∑ j ≥ 0 ∑ m ≥ 3 ∑ i ≥ 2 ∑ n ≥ i + j + 1 ∑ k = i + 1 n ( k + j − i − 1 j ) e n , k ∗ v i + m − 3 x n + m + j + ∑ j ≥ 0 ∑ i ≥ 5 ∑ n ≥ i − 1 ∑ k = i − 1 n ( k + j − i + 1 j ) e n , k ∗ v i − 3 x n + j + 2 = x 3 1 − v x ∑ i ≥ 2 ∑ n ≥ i + 1 ∑ k = i + 1 n e n , k ∗ v i x n ⋅ 1 ( 1 − x ) k − i + ∑ i ≥ 5 ∑ n ≥ i − 1 ∑ k = i − 1 n e n , k ∗ v i − 3 x n + 2 ⋅ 1 ( 1 − x ) k − i + 2 . \begin{aligned}
\sum_{j\ge0}\sum_{m\ge3}\sum_{n\ge j+m+3}\sum_{i=m+2}^{n-j-1}\sum_{k=i+j+1}^{n}\binom{k-i-1}{j}e^*_{n-m-j,k-m-j}v^{i-3}x^n \\
&+\sum_{j\ge0}\sum_{n\ge j+6}\sum_{i=4}^{n-j-1}\sum_{k=i+j+1}^{n}\binom{k-i-1}{j}e^*_{n-j-2,k-j-2}v^{i-3}x^n-S \\
&= \sum_{j\ge0}\sum_{m\ge3}\sum_{i\ge m+2}\sum_{n\ge i+j+1}\sum_{k=i+j+1}^{n}\binom{k-i-1}{j}e^*_{n-m-j,k-m-j}v^{i-3}x^n \\
&+\sum_{j\ge0}\sum_{i\ge5}\sum_{n\ge i+j+1}\sum_{k=i+j+1}^{n}\binom{k-i-1}{j}e^*_{n-j-2,k-j-2}v^{i-3}x^n \\
&= \sum_{j\ge0}\sum_{m\ge3}\sum_{i\ge2}\sum_{n\ge i+j+1}\sum_{k=i+1}^{n}\binom{k+j-i-1}{j}e^*_{n,k}v^{i+m-3}x^{n+m+j} \\
&+\sum_{j\ge0}\sum_{i\ge5}\sum_{n\ge i-1}\sum_{k=i-1}^{n}\binom{k+j-i+1}{j}e^*_{n,k}v^{i-3}x^{n+j+2} \\
&= \frac{x^3}{1-vx}\sum_{i\ge2}\sum_{n\ge i+1}\sum_{k=i+1}^{n}e^*_{n,k}v^ix^n\cdot\frac{1}{(1-x)^{k-i}}+\sum_{i\ge5}\sum_{n\ge i-1}\sum_{k=i-1}^{n}e^*_{n,k}v^{i-3}x^{n+2}\cdot\frac{1}{(1-x)^{k-i+2}}.
\end{aligned} j ≥ 0 ∑ m ≥ 3 ∑ n ≥ j + m + 3 ∑ i = m + 2 ∑ n − j − 1 k = i + j + 1 ∑ n ( j k − i − 1 ) e n − m − j , k − m − j ∗ v i − 3 x n + j ≥ 0 ∑ n ≥ j + 6 ∑ i = 4 ∑ n − j − 1 k = i + j + 1 ∑ n ( j k − i − 1 ) e n − j − 2 , k − j − 2 ∗ v i − 3 x n − S = j ≥ 0 ∑ m ≥ 3 ∑ i ≥ m + 2 ∑ n ≥ i + j + 1 ∑ k = i + j + 1 ∑ n ( j k − i − 1 ) e n − m − j , k − m − j ∗ v i − 3 x n + j ≥ 0 ∑ i ≥ 5 ∑ n ≥ i + j + 1 ∑ k = i + j + 1 ∑ n ( j k − i − 1 ) e n − j − 2 , k − j − 2 ∗ v i − 3 x n = j ≥ 0 ∑ m ≥ 3 ∑ i ≥ 2 ∑ n ≥ i + j + 1 ∑ k = i + 1 ∑ n ( j k + j − i − 1 ) e n , k ∗ v i + m − 3 x n + m + j + j ≥ 0 ∑ i ≥ 5 ∑ n ≥ i − 1 ∑ k = i − 1 ∑ n ( j k + j − i + 1 ) e n , k ∗ v i − 3 x n + j + 2 = 1 − v x x 3 i ≥ 2 ∑ n ≥ i + 1 ∑ k = i + 1 ∑ n e n , k ∗ v i x n ⋅ ( 1 − x ) k − i 1 + i ≥ 5 ∑ n ≥ i − 1 ∑ k = i − 1 ∑ n e n , k ∗ v i − 3 x n + 2 ⋅ ( 1 − x ) k − i + 2 1 .
Interchanging the sum in i i i with the others now gives
x 3 1 − v x ∑ n ≥ 3 ∑ k = 3 n e n , k ∗ x n ( 1 − x ) k ∑ i = 2 k − 1 ( v ( 1 − x ) ) i + ∑ n ≥ 4 ∑ k = 4 n e n , k ∗ x n + 2 v ( 1 − x ) k ∑ i = 5 k + 1 ( v ( 1 − x ) ) i − 2 = x 3 1 − v x ∑ n ≥ 3 ∑ k = 3 n e n , k ∗ x n ( 1 − x ) k ⋅ ( v ( 1 − x ) ) 2 − ( v ( 1 − x ) ) k 1 − v + v x + ∑ n ≥ 3 ∑ k = 3 n e n , k ∗ x n + 2 v ( 1 − x ) k ⋅ ( v ( 1 − x ) ) 3 − ( v ( 1 − x ) ) k 1 − v + v x = v 2 x 3 ( 1 − v x ) ( 1 − v + v x ) ( 1 1 − x F ( x , 1 1 − x ) − v F ( x , v ) ) + v 2 x 2 1 − v + v x ( F ( x , 1 1 − x ) − F ( x , v ) ) . \begin{aligned}
\frac{x^3}{1-vx}\sum_{n\ge3}\sum_{k=3}^{n}e^*_{n,k}\frac{x^n}{(1-x)^k}\sum_{i=2}^{k-1}(v(1-x))^i+\sum_{n\ge4}\sum_{k=4}^{n}e^*_{n,k}\frac{x^{n+2}}{v(1-x)^k}\sum_{i=5}^{k+1}(v(1-x))^{i-2} \\
&= \frac{x^3}{1-vx}\sum_{n\ge3}\sum_{k=3}^{n}e^*_{n,k}\frac{x^n}{(1-x)^k}\cdot\frac{(v(1-x))^2-(v(1-x))^k}{1-v+vx} \\
&+\sum_{n\ge3}\sum_{k=3}^{n}e^*_{n,k}\frac{x^{n+2}}{v(1-x)^k}\cdot\frac{(v(1-x))^3-(v(1-x))^k}{1-v+vx} \\
&= \frac{v^2x^3}{(1-vx)(1-v+vx)}\left(\frac{1}{1-x}F\left(x,\frac{1}{1-x}\right)-vF(x,v)\right)+\frac{v^2x^2}{1-v+vx}\left(F\left(x,\frac{1}{1-x}\right)-F(x,v)\right).
\end{aligned} 1 − v x x 3 n ≥ 3 ∑ k = 3 ∑ n e n , k ∗ ( 1 − x ) k x n i = 2 ∑ k − 1 ( v ( 1 − x ) ) i + n ≥ 4 ∑ k = 4 ∑ n e n , k ∗ v ( 1 − x ) k x n + 2 i = 5 ∑ k + 1 ( v ( 1 − x ) ) i − 2 = 1 − v x x 3 n ≥ 3 ∑ k = 3 ∑ n e n , k ∗ ( 1 − x ) k x n ⋅ 1 − v + v x ( v ( 1 − x ) ) 2 − ( v ( 1 − x ) ) k + n ≥ 3 ∑ k = 3 ∑ n e n , k ∗ v ( 1 − x ) k x n + 2 ⋅ 1 − v + v x ( v ( 1 − x ) ) 3 − ( v ( 1 − x ) ) k = ( 1 − v x ) ( 1 − v + v x ) v 2 x 3 ( 1 − x 1 F ( x , 1 − x 1 ) − v F ( x , v ) ) + 1 − v + v x v 2 x 2 ( F ( x , 1 − x 1 ) − F ( x , v ) ) .
Comparing (39) and (40) , and combining the prior calculations, we have
F ( x , v ) − x 3 − x 2 ( 1 + v ) G ( x ) − 2 v 2 x 5 1 − 2 v x = v x 1 − v x ( F ( x , v ) − x 3 − v x 4 1 − 2 v x ) − v x 3 G ( x ) + v 2 x 3 ( 1 − v x ) ( 1 − v + v x ) ( 1 1 − x F ( x , 1 1 − x ) − v F ( x , v ) ) + v 2 x 2 1 − v + v x ( F ( x , 1 1 − x ) − F ( x , v ) ) . \begin{aligned}
F(x,v)-x^3-x^2(1+v)G(x)-\frac{2v^2x^5}{1-2vx}
&=\frac{vx}{1-vx}\left(F(x,v)-x^3-\frac{vx^4}{1-2vx}\right)-vx^3G(x)\\
&\quad+\frac{v^2x^3}{(1-vx)(1-v+vx)}\left(\frac{1}{1-x}F\left(x,\frac{1}{1-x}\right)-vF(x,v)\right)\\
&\quad+\frac{v^2x^2}{1-v+vx}\left(F\left(x,\frac{1}{1-x}\right)-F(x,v)\right).
\end{aligned} F ( x , v ) − x 3 − x 2 ( 1 + v ) G ( x ) − 1 − 2 v x 2 v 2 x 5 = 1 − v x v x ( F ( x , v ) − x 3 − 1 − 2 v x v x 4 ) − v x 3 G ( x ) + ( 1 − v x ) ( 1 − v + v x ) v 2 x 3 ( 1 − x 1 F ( x , 1 − x 1 ) − v F ( x , v ) ) + 1 − v + v x v 2 x 2 ( F ( x , 1 − x 1 ) − F ( x , v ) ) .
The last equality may be rewritten as (38) , which completes the proof.
Theorem 4.8. We have
E ( x , v ) = x 3 ( 1 − v − 3 v x + 2 v 2 x + v 2 x 2 ) + x 2 ( 1 − 3 v x + v 2 x + v 2 x 2 ) G ( x ) ( 1 − v x ) 2 ( 1 − v − 3 v x + 3 v 2 x + v 2 x 2 ) (41) E(x,v)=\frac{x^3(1-v-3vx+2v^2x+v^2x^2)+x^2(1-3vx+v^2x+v^2x^2)G(x)}{(1-vx)^2(1-v-3vx+3v^2x+v^2x^2)} \tag*{(41)} E ( x , v ) = ( 1 − v x ) 2 ( 1 − v − 3 v x + 3 v 2 x + v 2 x 2 ) x 3 ( 1 − v − 3 v x + 2 v 2 x + v 2 x 2 ) + x 2 ( 1 − 3 v x + v 2 x + v 2 x 2 ) G ( x ) (41) where G ( x ) = x ( 1 − x − 1 − 6 x + 5 x 2 ) 2 ( 1 − x ) G(x)=\frac{x(1-x-\sqrt{1-6x+5x^2})}{2(1-x)} G ( x ) = 2 ( 1 − x ) x ( 1 − x − 1 − 6 x + 5 x 2 ) . In particular, the formula for the generating function ∑ n ≥ 2 p n ( τ ) x n \sum_{n\geq2}p_n(\tau)x^n ∑ n ≥ 2 p n ( τ ) x n , where τ ∈ { 4213 , 4312 } \tau\in\{4213,4312\} τ ∈ { 4213 , 4312 } , is given by G ( x ) = E ( x , 1 ) + x 2 1 − x G(x)=E(x,1)+\frac{x^2}{1-x} G ( x ) = E ( x , 1 ) + 1 − x x 2 .
Proof. The second statement follows from the first, upon taking v = 1 v=1 v = 1 , so we need only prove the first. By (37) when v = 1 v=1 v = 1 and (36) , we have
F ( x , 1 1 − x ) = ( 1 − x ) 2 G ( x ) − x 2 ( 1 − x ) . (42) F\left(x,\frac{1}{1-x}\right)=(1-x)^2G(x)-x^2(1-x). \tag*{(42)} F ( x , 1 − x 1 ) = ( 1 − x ) 2 G ( x ) − x 2 ( 1 − x ) . (42)
Substituting (42) into (38) , and simplifying, we get
( 1 − v x 1 − v x + v 2 x 2 ( 1 − v x ) ( 1 − v + v x ) ) F ( x , v ) = x 3 ( 1 − v x ) ( 1 − v + v x ) − v x 4 ( 1 − v x ) ( 1 − v + v x ) + x 2 ( ( 1 − v x ) ( 1 − v + v x ) + v − v x ) ( 1 − v x ) ( 1 − v + v x ) G ( x ) . (43) \left(1-\frac{vx}{1-vx}+\frac{v^2x^2}{(1-vx)(1-v+vx)}\right)F(x,v)
=\frac{x^3(1-vx)(1-v+vx)-vx^4}{(1-vx)(1-v+vx)}
+\frac{x^2((1-vx)(1-v+vx)+v-vx)}{(1-vx)(1-v+vx)}G(x). \tag*{(43)} ( 1 − 1 − v x v x + ( 1 − v x ) ( 1 − v + v x ) v 2 x 2 ) F ( x , v ) = ( 1 − v x ) ( 1 − v + v x ) x 3 ( 1 − v x ) ( 1 − v + v x ) − v x 4 + ( 1 − v x ) ( 1 − v + v x ) x 2 (( 1 − v x ) ( 1 − v + v x ) + v − v x ) G ( x ) . (43)
Taking v = v 0 = 1 + x − 1 − 6 x + 5 x 2 2 x ( 2 − x ) v=v_0=\frac{1+x-\sqrt{1-6x+5x^2}}{2x(2-x)} v = v 0 = 2 x ( 2 − x ) 1 + x − 1 − 6 x + 5 x 2 in (43) is seen to cancel out the left-hand side, and solving for G ( x ) G(x) G ( x ) , we find
G ( x ) = − x ( 1 − v 0 x ) ( 1 − v 0 + v 0 x ) − v 0 x 2 ( 1 − v 0 x ) ( 1 − v 0 + v 0 x ) + v 0 ( 1 − x ) . G(x)=-\frac{x(1-v_0x)(1-v_0+v_0x)-v_0x^2}{(1-v_0x)(1-v_0+v_0x)+v_0(1-x)}. G ( x ) = − ( 1 − v 0 x ) ( 1 − v 0 + v 0 x ) + v 0 ( 1 − x ) x ( 1 − v 0 x ) ( 1 − v 0 + v 0 x ) − v 0 x 2 .
Using the relation ( 1 − v 0 x ) ( 1 − v 0 + v 0 x ) = v 0 x ( 1 − v 0 ) (1-v_0x)(1-v_0+v_0x)=v_0x(1-v_0) ( 1 − v 0 x ) ( 1 − v 0 + v 0 x ) = v 0 x ( 1 − v 0 ) gives
G ( x ) = − v 0 x 2 ( 1 − v 0 ) − v 0 x 2 v 0 x ( 1 − v 0 ) + v 0 ( 1 − x ) = v 0 x 2 1 − v 0 x = x ( 1 − x − 1 − 6 x + 5 x 2 ) 2 ( 1 − x ) . G(x)=-\frac{v_0x^2(1-v_0)-v_0x^2}{v_0x(1-v_0)+v_0(1-x)}
=\frac{v_0x^2}{1-v_0x}
=\frac{x(1-x-\sqrt{1-6x+5x^2})}{2(1-x)}. G ( x ) = − v 0 x ( 1 − v 0 ) + v 0 ( 1 − x ) v 0 x 2 ( 1 − v 0 ) − v 0 x 2 = 1 − v 0 x v 0 x 2 = 2 ( 1 − x ) x ( 1 − x − 1 − 6 x + 5 x 2 ) .
Note that the choice of the minus sign prior to the radical term in v 0 v_0 v 0 is dictated by the requirement that G ( x ) / x G(x)/x G ( x ) / x evaluated at x = 0 x=0 x = 0 be zero. Substituting this expression for G ( x ) G(x) G ( x ) back into (43) , solving for F ( x , v ) F(x,v) F ( x , v ) and using (37) yields (41) , which completes the proof.
Further results
In this section, we discuss further results concerning the avoidance of a single pattern of length four by members of P n P_n P n . We start with the following general result, wherein τ ′ = 1 ( τ + 1 ) \tau'=1(\tau+1) τ ′ = 1 ( τ + 1 ) and τ + 1 \tau+1 τ + 1 is obtained from τ \tau τ by adding one to each entry of τ \tau τ .
Proposition 5.1. Let τ \tau τ be a pattern. Then p n ( τ ) = p n ( τ ′ ) p_n(\tau)=p_n(\tau') p n ( τ ) = p n ( τ ′ ) for all n ≥ 1 n\geq1 n ≥ 1 if and only if τ \tau τ does not start with 1.
Proof. For the sufficiency, suppose π ∈ P n \pi\in\mathcal{P}_n π ∈ P n contains an occurrence of τ \tau τ witnessed by the subsequence x y z xyz x y z . Then τ \tau τ not starting with 1 implies x ≠ 1 x \ne1 x = 1 and hence 1 x y z 1xyz 1 x y z is an occurrence of τ ′ \tau' τ ′ . This implies indeed P n ( τ ) = P n ( τ ′ ) \mathcal{P}_n(\tau) = \mathcal{P}_n(\tau') P n ( τ ) = P n ( τ ′ ) , and hence p n ( τ ) = p n ( τ ′ ) p_n(\tau) = p_n(\tau') p n ( τ ) = p n ( τ ′ ) , for all n ≥ 1 n \ge1 n ≥ 1 .
For the necessity, we show that if τ \tau τ starts with 1, then there exists n ≥ 1 n \ge1 n ≥ 1 such that p n ( τ ) ≠ p n ( τ ′ ) p_n(\tau) \ne p_n(\tau') p n ( τ ) = p n ( τ ′ ) . Clearly, we may assume τ \tau τ has length at least two. Let m m m be the smallest n n n such that p n ( τ ) ≠ B n − 1 p_n(\tau) \ne B_{n-1} p n ( τ ) = B n − 1 , i.e., there exists a member of P n \mathcal{P}_n P n that contains an occurrence of τ \tau τ . Note that m m m exists for any pattern τ \tau τ . We wish to show p m ( τ ′ ) = B m − 1 p_m(\tau') = B_{m-1} p m ( τ ′ ) = B m − 1 , which would establish the necessity. Suppose, to the contrary, that p m ( τ ′ ) ≠ B m − 1 p_m(\tau') \ne B_{m-1} p m ( τ ′ ) = B m − 1 and let π ∈ P m \pi\in\mathcal{P}_m π ∈ P m contain an occurrence s s s of τ ′ \tau' τ ′ . We may assume that the role of ‘1’ in s s s is played by the actual letter 1 and let x x x denote the letter of π \pi π playing the role of the ‘2’ in s s s . First suppose x x x corresponds to a descent bottom of π \pi π . Then deletion of the first run of π \pi π followed by standardization yields a member of P k \mathcal{P}_k P k that contains an occurrence of τ \tau τ for some k < m k < m k < m , since the letters of π \pi π excluding its first run would contain τ \tau τ in this case. But then p k ( τ ) ≠ B k − 1 p_k(\tau) \ne B_{k-1} p k ( τ ) = B k − 1 , which contradicts the minimality of m m m . So assume x x x does not correspond to a descent bottom of π \pi π . Then it is seen that one may delete x x x in this case and remain a flattened partition as x x x does not start a run. The resulting member of P m − 1 \mathcal{P}_{m-1} P m − 1 contains τ \tau τ , as witnessed by the remaining letters of s s s (the first of which is assumed to be 1). Again, this contradicts the minimality of m m m , and hence we must have p m ( τ ′ ) = B m − 1 p_m(\tau') = B_{m-1} p m ( τ ′ ) = B m − 1 , as desired.
In Table 2 above, we present the Wilf-equivalence classes corresponding to the avoidance of a single pattern of length four by distinct flattened partitions. They are arranged in increasing order with respect to the growth rate of the corresponding avoidance counting sequences. Combining results from Table 1 above with Proposition 5.1 accounts for the facts witnessed in Table 2 that p n ( 1324 ) = p n ( 1423 ) = 2 n − 2 p_n(1324)=p_n(1423)=2^{n-2} p n ( 1324 ) = p n ( 1423 ) = 2 n − 2 for all n ≥ 2 n\ge2 n ≥ 2 , p n ( 1342 ) = M n − 1 p_n(1342)=M_{n-1} p n ( 1342 ) = M n − 1 and p n ( 1432 ) = C n − 1 p_n(1432)=C_{n-1} p n ( 1432 ) = C n − 1 for n ≥ 1 n\ge1 n ≥ 1 . Further, we have p n ( 4132 ) = p n ( 321 ) = C n − 1 p_n(4132)=p_n(321)=C_{n-1} p n ( 4132 ) = p n ( 321 ) = C n − 1 , for if π ∈ P n \pi\in\mathcal{P}_n π ∈ P n contains an occurrence of 321 witnessed by the subsequence x y z xyz x y z , then x w y z xwyz x w y z is a 4132, where w w w denote the first letter in the run containing y y y . Combining these observation with Theorems 1.1 and 1.2 above accounts for all of the Wilf-classes of size greater than one except for the possible equivalence observed between 2431 and 3241. We state this last equivalence as a conjecture below, which has been confirmed up to n = 14 n=14 n = 14 numerically. All of the other Wilf-classes are singletons whose various counting sequences are differentiated on numerical grounds requiring at most n = 10 n=10 n = 10 . Further, we have that 2341 is a singleton class wherein p n ( 2341 ) p_n(2341) p n ( 2341 ) appears to correspond to the ( n − 1 ) (n-1) ( n − 1 ) -st term of entry A307786 in [14 ] for all n ≥ 1 n\ge1 n ≥ 1 , which has been confirmed up to n = 15 n=15 n = 15 .
Table 1. Enumeration of τ \tau τ -avoiding flattened partitions for patterns of length 3
Conjecture 5.2. If n ≥ 1 n\ge1 n ≥ 1 , then p n ( 2431 ) = p n ( 3241 ) p_n(2431)=p_n(3241) p n ( 2431 ) = p n ( 3241 ) .
Conjecture 5.3. If n ≥ 1 n\ge1 n ≥ 1 , then p n ( 2341 ) = A 307786 ( n − 1 ) p_n(2341)=A307786(n-1) p n ( 2341 ) = A 307786 ( n − 1 ) .
Note that the results contained herein combined with Conjecture 5.2 would complete the Wilf-classification for the avoidance of a single pattern of length four.
One may verify directly the first six terms of the sequence p n ( 1234 ) p_n(1234) p n ( 1234 ) given in Table 2 and that p n ( 1234 ) = 0 p_n(1234)=0 p n ( 1234 ) = 0 for all n ≥ 7 n\ge7 n ≥ 7 . Indeed, for the pattern τ = 12 ⋯ r \tau=12\cdots r τ = 12 ⋯ r , where r ≥ 2 r\ge2 r ≥ 2 , we have that
is the largest n n n such that p n ( τ ) ≠ 0 p_n(\tau)\ne0 p n ( τ ) = 0 . To see this, first note that π = 1 α r − 2 2 α r − 3 3 ⋯ α 1 ( r − 1 ) \pi=1\alpha_{r-2}2\alpha_{r-3}3\cdots\alpha_1(r-1) π = 1 α r − 2 2 α r − 3 3 ⋯ α 1 ( r − 1 ) , where
α j = ( r + ( j 2 ) ) ( r + ( j 2 ) + 1 ) ⋯ ( r + ( j + 1 2 ) − 1 ) , 1 ≤ j ≤ r − 2 , \alpha_j=\left(r+\binom{j}{2}\right)\left(r+\binom{j}{2}+1\right)\cdots\left(r+\binom{j+1}{2}-1\right),\qquad1\le j\le r-2, α j = ( r + ( 2 j ) ) ( r + ( 2 j ) + 1 ) ⋯ ( r + ( 2 j + 1 ) − 1 ) , 1 ≤ j ≤ r − 2 ,
is seen to avoid τ \tau τ . Further, it is apparent from the construction of π \pi π that any flattened partition of length greater than ∣ π ∣ = ( r 2 ) |\pi|=\binom{r}{2} ∣ π ∣ = ( 2 r ) must contain τ \tau τ , and hence p n ( τ ) = 0 p_n(\tau)=0 p n ( τ ) = 0 for all n > ( r 2 ) n>\binom{r}{2} n > ( 2 r ) . By an elementary enumeration, one can show p n ( 1243 ) = ( n − 1 2 ) + 1 p_n(1243)=\binom{n-1}{2}+1 p n ( 1243 ) = ( 2 n − 1 ) + 1 for all n ≥ 1 n\ge1 n ≥ 1 , and hence we see that the pattern pairs 123/1234 and 132/1243 demonstrate the necessity of Proposition 5.1.
Concerning the determination of p n ( τ ) p_n(\tau) p n ( τ ) in other cases where τ \tau τ comprises its own Wilf-class, the problems are of varying degrees of difficulty. The patterns ending in 1 seem to be more difficult to enumerate than the others, especially 4321. We conclude with the following result where we enumerate the cases 3124, 4123 and 2134, which completes the enumeration of all the patterns of length four not ending in 1. We again make use of systems of functional equations in establishing these cases.
Theorem 5.4. Let r n = p n ( 3124 ) r_n=p_n(3124) r n = p n ( 3124 ) , s n = p n ( 4123 ) s_n=p_n(4123) s n = p n ( 4123 ) and t n = p n ( 2134 ) t_n=p_n(2134) t n = p n ( 2134 ) for n ≥ 1 n\ge1 n ≥ 1 . Then we have
r n = 5 r n − 1 − 8 r n − 2 + 5 r n − 3 , n ≥ 5 , (44) r_n=5r_{n-1}-8r_{n-2}+5r_{n-3},\qquad n\ge5, \tag*{(44)} r n = 5 r n − 1 − 8 r n − 2 + 5 r n − 3 , n ≥ 5 , (44) s n = 4 s n − 1 − 4 s n − 2 + 2 s n − 3 , n ≥ 5 , (45) s_n=4s_{n-1}-4s_{n-2}+2s_{n-3},\qquad n\ge5, \tag*{(45)} s n = 4 s n − 1 − 4 s n − 2 + 2 s n − 3 , n ≥ 5 , (45) and
∑ n ≥ 2 t n x n = ( 1 − x ) ( 1 − 3 x + x 2 − x 3 ) − ( 1 − x ) 2 1 − 4 x + 2 x 2 + x 4 2 x 2 , (46) \sum_{n\ge2}t_nx^n=\frac{(1-x)(1-3x+x^2-x^3)-(1-x)^2\sqrt{1-4x+2x^2+x^4}}{2x^2}, \tag*{(46)} n ≥ 2 ∑ t n x n = 2 x 2 ( 1 − x ) ( 1 − 3 x + x 2 − x 3 ) − ( 1 − x ) 2 1 − 4 x + 2 x 2 + x 4 , (46) where r n r_n r n and s n s_n s n satisfy the same initial conditions r 1 = r 2 = 1 r_1=r_2=1 r 1 = r 2 = 1 , r 3 = 2 r_3=2 r 3 = 2 , r 4 = 5 r_4=5 r 4 = 5 .
Proof. We demonstrate only (44) and outline its proof as follows. Given n ≥ 2 n\ge2 n ≥ 2 and i , j ∈ [ n ] i,j\in[n] i , j ∈ [ n ] with i ≠ j i\ne j i = j , let r n , i , j r_{n,i,j} r n , i , j denote the number of members of P n ( 3124 ) \mathcal{P}_n(3124) P n ( 3124 ) ending in i , j i,j i , j . Then one can argue combinatorially the recurrences
r n , i , j = ∑ m = 0 i − j − 1 ∑ s = 1 j − 1 r n − m − 1 , s , i − m − 1 , 2 ≤ j < i ≤ n , (47) r_{n,i,j}=\sum_{m=0}^{i-j-1}\sum_{s=1}^{j-1}r_{n-m-1,s,i-m-1},\qquad2\leq j<i\leq n, \tag*{(47)} r n , i , j = m = 0 ∑ i − j − 1 s = 1 ∑ j − 1 r n − m − 1 , s , i − m − 1 , 2 ≤ j < i ≤ n , (47)
r n , i , i + 1 = ∑ s = 1 s ≠ i n − 1 r n − 1 , s , i , 2 ≤ i ≤ n − 1 , (48) r_{n,i,i+1}=\sum_{\substack{s=1\\s\ne i}}^{n-1}r_{n-1,s,i},\qquad2\leq i\leq n-1, \tag*{(48)} r n , i , i + 1 = s = 1 s = i ∑ n − 1 r n − 1 , s , i , 2 ≤ i ≤ n − 1 , (48)
r n , i , j = ∑ k = j n ∑ s = 1 i − 1 r n − k + i , s , i , 2 ≤ i < j − 1 ≤ n − 1 , (49) r_{n,i,j}=\sum_{k=j}^{n}\sum_{s=1}^{i-1}r_{n-k+i,s,i},\qquad2\leq i<j-1\leq n-1, \tag*{(49)} r n , i , j = k = j ∑ n s = 1 ∑ i − 1 r n − k + i , s , i , 2 ≤ i < j − 1 ≤ n − 1 , (49)
with r 2 , 1 , 2 = 1 r_{2,1,2}=1 r 2 , 1 , 2 = 1 , r 2 , 2 , 1 = 0 r_{2,2,1}=0 r 2 , 2 , 1 = 0 and r n , i , 1 = r n , 1 , j = 0 r_{n,i,1}=r_{n,1,j}=0 r n , i , 1 = r n , 1 , j = 0 for all i i i and j j j if n ≥ 3 n\geq3 n ≥ 3 . Define the generating functions
R + ( x , u , v ) = ∑ n ≥ 2 ∑ i = 1 n − 1 ∑ j = i + 1 n r n , i , j u i − 1 v j − i − 1 x n R_{+}(x,u,v)=\sum_{n\geq2}\sum_{i=1}^{n-1}\sum_{j=i+1}^{n}r_{n,i,j}u^{i-1}v^{j-i-1}x^n R + ( x , u , v ) = n ≥ 2 ∑ i = 1 ∑ n − 1 j = i + 1 ∑ n r n , i , j u i − 1 v j − i − 1 x n
and
R − ( x , u , v ) = ∑ n ≥ 2 ∑ i = 2 n ∑ j = 1 i − 1 r n , i , j u i − 1 v j − i − 1 x n . R_{-}(x,u,v)=\sum_{n\geq2}\sum_{i=2}^{n}\sum_{j=1}^{i-1}r_{n,i,j}u^{i-1}v^{j-i-1}x^n. R − ( x , u , v ) = n ≥ 2 ∑ i = 2 ∑ n j = 1 ∑ i − 1 r n , i , j u i − 1 v j − i − 1 x n .
Translating (47) –(49) , we have
R + ( x , u , v ) = x 2 + u x ( R + ( x , u , u ) + R − ( x , u , u ) ) + u v x 2 ( 1 − x ) ( 1 − v x ) R + ( x , u , u ) , (50) R_{+}(x,u,v)=x^2+ux\bigl(R_{+}(x,u,u)+R_{-}(x,u,u)\bigr)+\frac{uvx^2}{(1-x)(1-vx)}R_{+}(x,u,u), \tag*{(50)} R + ( x , u , v ) = x 2 + ux ( R + ( x , u , u ) + R − ( x , u , u ) ) + ( 1 − x ) ( 1 − v x ) uv x 2 R + ( x , u , u ) , (50)
R − ( x , u , v ) = u 2 x v ( 1 − v ) ( v − u x ) ( R + ( x , u , u / v ) − v R + ( x , u , u ) ) . (51) R_{-}(x,u,v)=\frac{u^2x}{v(1-v)(v-ux)}\bigl(R_{+}(x,u,u/v)-vR_{+}(x,u,u)\bigr). \tag*{(51)} R − ( x , u , v ) = v ( 1 − v ) ( v − ux ) u 2 x ( R + ( x , u , u / v ) − v R + ( x , u , u ) ) . (51)
Using (51) in (50) yields
R + ( x , u , v ) = x 2 + u x 2 ( 1 − u ) ( 1 − x ) ( R + ( x , u , 1 ) − u R + ( x , u , u ) ) + u x R + ( x , u , u ) + u v x 2 ( 1 − x ) ( 1 − v x ) R + ( x , u , u ) . (52) R_{+}(x,u,v)=x^2+\frac{ux^2}{(1-u)(1-x)}\bigl(R_{+}(x,u,1)-uR_{+}(x,u,u)\bigr)+uxR_{+}(x,u,u)+\frac{uvx^2}{(1-x)(1-vx)}R_{+}(x,u,u). \tag*{(52)} R + ( x , u , v ) = x 2 + ( 1 − u ) ( 1 − x ) u x 2 ( R + ( x , u , 1 ) − u R + ( x , u , u ) ) + ux R + ( x , u , u ) + ( 1 − x ) ( 1 − v x ) uv x 2 R + ( x , u , u ) . (52)
First letting v = 1 v=1 v = 1 and then v = u v=u v = u in (52) , one obtains a system of equations in the quantities R + ( x , u , 1 ) R_{+}(x,u,1) R + ( x , u , 1 ) and R + ( x , u , u ) R_{+}(x,u,u) R + ( x , u , u ) . Solving this system yields
R + ( x , u , 1 ) = − x 2 ( x − 1 ) ( u 2 x 2 + u x 3 − 3 u x 2 + u x − x 2 + 2 x − 1 ) u 2 x 4 − u x 4 + 4 u x 3 − 5 u x 2 + x 3 + 2 u x − 3 x 2 + 3 x − 1 , R_{+}(x,u,1)=-\frac{x^2(x-1)(u^2x^2+ux^3-3ux^2+ux-x^2+2x-1)}{u^2x^4-ux^4+4ux^3-5ux^2+x^3+2ux-3x^2+3x-1}, R + ( x , u , 1 ) = − u 2 x 4 − u x 4 + 4 u x 3 − 5 u x 2 + x 3 + 2 ux − 3 x 2 + 3 x − 1 x 2 ( x − 1 ) ( u 2 x 2 + u x 3 − 3 u x 2 + ux − x 2 + 2 x − 1 ) ,
R + ( x , u , u ) = − x 2 ( x − 1 ) 3 ( u x − 1 ) u 2 x 4 − u x 4 + 4 u x 3 − 5 u x 2 + x 3 + 2 u x − 3 x 2 + 3 x − 1 . R_{+}(x,u,u)=-\frac{x^2(x-1)^3(ux-1)}{u^2x^4-ux^4+4ux^3-5ux^2+x^3+2ux-3x^2+3x-1}. R + ( x , u , u ) = − u 2 x 4 − u x 4 + 4 u x 3 − 5 u x 2 + x 3 + 2 ux − 3 x 2 + 3 x − 1 x 2 ( x − 1 ) 3 ( ux − 1 ) .
Taking v = u v=u v = u in (51) , and using these last two expressions, we find
R − ( x , u , u ) = x 3 ( u x 3 − 3 u x 2 + u x − x 2 + 2 x − 1 ) u 2 x 4 − u x 4 + 4 u x 3 − 5 u x 2 + x 3 + 2 u x − 3 x 2 + 3 x − 1 . R_{-}(x,u,u)=\frac{x^3(ux^3-3ux^2+ux-x^2+2x-1)}{u^2x^4-ux^4+4ux^3-5ux^2+x^3+2ux-3x^2+3x-1}. R − ( x , u , u ) = u 2 x 4 − u x 4 + 4 u x 3 − 5 u x 2 + x 3 + 2 ux − 3 x 2 + 3 x − 1 x 3 ( u x 3 − 3 u x 2 + ux − x 2 + 2 x − 1 ) .
By the definitions, the generating function ∑ n ≥ 1 r n x n \sum_{n\geq1}r_nx^n ∑ n ≥ 1 r n x n is given by
x + R + ( x , 1 , 1 ) + R − ( x , 1 , 1 ) = x ( 2 x − 1 ) ( x − 1 ) 2 5 x 3 − 8 x 2 + 5 x − 1 , x+R_{+}(x,1,1)+R_{-}(x,1,1)=\frac{x(2x-1)(x-1)^2}{5x^3-8x^2+5x-1}, x + R + ( x , 1 , 1 ) + R − ( x , 1 , 1 ) = 5 x 3 − 8 x 2 + 5 x − 1 x ( 2 x − 1 ) ( x − 1 ) 2 ,
which implies recurrence (44) and recovers the initial values of r n r_n r n . Comparable proofs may be given for (45) and (46), upon considering the parameters and distributions used above in the respective cases 4213 and 2143. Note that from (45) and (46), one obtains new combinatorial interpretations of the OEIS sequences A159035 and A273900, respectively.