Preprint
Article

This version is not peer-reviewed.

Generating Trees Unifying Several Classes of Four-Letter Pattern-Avoiding Descent Sequences

A peer-reviewed version of this preprint was published in:
Axioms 2026, 15(6), 450. https://doi.org/10.3390/axioms15060450

Submitted:

14 May 2026

Posted:

15 May 2026

You are already at the latest version

Abstract
A descent sequence is a word π = π1π2 · · · πn of nonnegative integers satisfying π1 = 0 and πi ≤ 1 + des(π1π2 · · · πi-1) for i = 2, 3, . . . , n, where des(π1π2 · · · πm) denotes the number of indices j such that πj > πj+1. In this work, we study descent sequences subject to the additional restriction of avoiding a given pattern of length four. We analyze seven distinct avoidance classes and provide enumerative results for each of them. Our approach is based on the construction of generating trees with one or two labels, from which we derive succession rules and corresponding systems of recurrence relations. These recurrences are then used to compute explicit generating functions for the number of descent sequences of length n avoiding either 0001, 0010, 0011, 0012, 0021, 0110, 0112, 0123, or 0132.
Keywords: 
;  ;  ;  

1. Introduction

A descent in a sequence of integers w 1 w 2 w m is a pair of adjacent entries w j w j + 1 such that w j > w j + 1 . A sequence π 1 π 2 π n of non-negative integers is called a descent sequence of length n if it satisfies the following conditions:
  • π 1 = 0 ,
  • for all i with 2 i n , we have π i des ( π 1 π 2 π i 1 ) + 1 ,
where des ( π 1 π 2 π m ) denotes the number of descents in the sequence π 1 π 2 π m . For example, the word 010203 is a descent sequence, but 01103 is not. Descent sequences were introduced by Callan [3]. Later, the author and Callan [5] studied descent sequences avoiding two patterns of length three.
We recall the notion of pattern avoidance for descent sequences. Let w = w 1 w 2 w n be a sequence of integers. Let τ = τ 1 τ m be a pattern, that is, a word of length m over the alphabet { 0 , 1 , , } that includes each symbol 0 , 1 , , at least once, for some 0 and m 1 . We say that the sequence wcontains the pattern τ if there exists a subsequence w f 1 w f 2 w f m of w, with 1 f 1 < f 2 < < f m n , such that w f i X w f j if and only if τ i X τ j , for all 1 i , j m and X { < , > , = } . If no such subsequence exists, we say that wavoids the pattern τ . For example, the descent sequence 010201303 contains all patterns of length three, but avoids the pattern 0321. We denote by D S n ( { τ ( 1 ) , , τ ( m ) } ) , or simply D S n ( τ ( 1 ) , , τ ( m ) ) , the set of descent sequences of D S n that avoid τ ( j ) for all j = 1 , 2 , , m . Two collections of patterns T and R are called D-Wilf-equivalent, denoted T d R , if the number of descent sequences of D S n ( T ) equals the number of descent sequences of D S n ( R ) for all n 0 .
Callan and Mansour [5] established that the D-Wilf-equivalence classification consists of 9 classes for one pattern of length three, 23 classes for pairs of length-three patterns, and 69 classes for patterns of length four. In particular, they showed that F 1002 ( x ) = F 1012 ( x ) = x ( 1 2 x ) ( 1 x ) ( 1 3 x + x 2 ) and F 0100 ( x ) = F 0101 ( x ) = F 0102 ( x ) = x 1 2 x . Here, F τ ( x ) denotes the generating function for the number of nonempty descent sequences of D S n ( τ ) .
In this paper, we study the generating function F τ ( x ) for seven different patterns of length four. Specifically, for each class, we construct a generating tree with 1–2 labels, derive a system of recurrence relations from the set of the succession rules, and find an explicit formula for the generating function counting nonempty descent sequences of D S n that avoid either 0001, 0010, 0011, 0012, 0021, 0110, 0112, 0123, or 0132.

2. Generating Trees and the Strategy for the Proofs

We start by recalling the generating tree T ( P ) for pattern-avoiding descent sequences of D S ( P ) = n 1 D S n ( P ) as described in [5] (extension of [1,2,4,6,7,8,9]), for any set of patterns P. The tree T ( P ) begins with the root labeled 0, which is positioned at level 1, and the children of a sequence π 1 π n 1 D S n 1 ( P ) are obtained from the set
{ π = π 1 π 2 π n 1 π n π n = 0 , 1 , , des ( π 1 π n 1 ) + 1 , π a v o i d s P } ,
Define T ( P ; π ) as the subtree of T ( P ) rooted at π which includes all of its descendants. For any two nodes π , π D S ( P ) , we say that the subtrees T ( P ; π ) and T ( P ; π ) are isomorphic, and write π π , if they are isomorphic as left-right ordered plane trees. Let T [ P ] be the tree obtained from T ( P ) by replacing each node π with the first node π D S ( P ) , in a top-to-bottom and left-to-right order, for which π π . From this point forward, we treat T ( P ) and T [ P ] as the same.
 Example 1.
Let P = { 0021 } . Clearly, the children of 0 T ( P ) are 00 and 01, which leads to the succession rule 0 00 , 01 .
Clearly, the children of 00 T ( P ) are 000 and 001. The descent sequence 000 π avoids P if and only if the descent sequence 00 π avoids P, so 000 00 . Also, the descent sequence 001 π avoids P if and only if the descent sequence 00 π avoids P (By removing the third letter in 001 π ), so 001 00 . Thus, we have the succession rule 00 00 , 00 . Similarly, we have 01 010 , 01 and 010 010 , 00 , 010 . Hence, the generating tree T ( P ) is determined by the following succession rules: 0 00 , 01 , 00 00 , 00 , 01 010 , 01 , and 010 010 , 00 , 010 .
For a given set P, we seek to derive an explicit expression for the generating function
F P ( x ) = n 1 ( number of nodes in the n th level of T ( P ) ) x n .
To do so, we refine this definition by defining
F P ; π ( x ) = n 1 ( number of nodes in the n th level of T ( P ; π ) ) x n ,
where π D ( P ) . Clearly, we have F P ( x ) = F P ; 0 ( x ) . Moreover, any succession rule of the form
v v ( 1 ) , , v ( k ) with v , v ( 1 ) , , v ( k ) D ( P )
is equivalent to the equation
F P ; v ( x ) = x + x i = 1 k F P ; v ( i ) ( x ) .
Let P = { 0012 } . By Example 1, we have
F P ; 0 ( x ) = x + x F P ; 00 ( x ) + x F P ; 01 ( x ) , F P ; 00 ( x ) = x + 2 x F P ; 00 ( x ) , F P ; 01 ( x ) = x + x F P ; 010 ( x ) + x F P ; 01 ( x ) , F P ; 010 ( x ) = x + 2 x F P ; 010 ( x ) + x F P ; 00 ( x ) .
From the solution of this system, we obtain the following result.
 Theorem 1.
The generating function F 0012 ( x ) is given by
x ( 1 3 x + 2 x 2 + x 3 ) ( 1 x ) ( 1 2 x ) 2 .
Note that D S n ( 021 ) = D S n ( 0021 ) for all n 1 . Hence, by [5], we have the following formula.
 Theorem 2.
The generating function F 0021 ( x ) is given by
( 1 x ) 2 ( 1 x ) ( 1 3 x x 2 x 3 ) 2 x ( 1 x ) .
We now apply the previously described technique to derive explicit formulas for the remaining six patterns of length 4, as presented in the next six subsections. Note that the proof of a succession rule of the form v v ( 1 ) , , v ( k ) typically involves appending a letter s j to v and verifying that if v s j avoids the given pattern, then v s j v ( j ) for all j = 1 , 2 , , s . Since this verification process is routine, we omit the detailed proofs of the succession rules for the generating trees below and leave them to the interested reader.

2.1. The Pattern 0010

The generating tree T ( { 0010 } ) is determined by the following succession rules:
0 00 , 01 , 00 00 , 001 , 001 001 , 01 a 1 , 011 , 011 f 1 , b 1 , a m a m , d m , e m + 1 , b m f m , b m , c m c m , d m d m , c m + 1 , e m a m , b m , f m f m , d m , c m + 1 ,
where a m = 01021 m ( m 1 ) , b m = a m 1 m m , c m = a m 1 ( m 1 ) m , d m = a m a , e m = a m 1 m , and f m = a m 1 m m ( m 1 ) . By translating these succession rules to equations, we obtain
F { 0010 ; 0 } ( x ) = x + x F { 0010 ; 00 } ( x ) + x F { 0010 ; 01 } ( x ) , F { 0010 ; 00 } ( x ) = x + x F { 0010 ; 00 } ( x ) + x F { 0010 ; 001 } ( x ) , F { 0010 ; 001 } ( x ) = x + x F { 0010 ; 001 } ( x ) , F { 0010 ; 01 } ( x ) = x + x A ( 0 ) + x F { 0010 ; 011 } ( x ) , F { 0010 ; 011 } ( x ) x + x F ( 0 ) + x B ( 0 ) ,
where A ( v ) , B ( v ) and F ( v ) satisfies the following system of equations:
A ( v ) = x 1 v + x A ( v ) + x D ( v ) + x v ( E ( v ) E ( 0 ) ) , B ( v ) = x 1 v + x F ( v ) + x B ( v ) , C ( v ) = x 1 v + x C ( v ) , D ( v ) = x 1 v + x D ( v ) + x v ( C ( v ) C ( 0 ) ) , E ( v ) = x 1 v + x A ( v ) + x B ( v ) , F ( v ) = x 1 v + x F ( v ) + x D ( v ) + x v ( C ( v ) C ( 0 ) )
with K ( v ) = m 1 F { 0010 } ; k m ( x ) v m 1 , for all K { A , B , C , D , E , F } . By solving (2) for B ( v ) , C ( v ) , D ( v ) , F ( v ) , we obtain
B ( v ) = ( 1 2 x + 3 x 2 x 3 ) x ( 1 x ) 4 ( 1 v ) , C ( v ) = x ( 1 x ) ( 1 v ) , D ( v ) = x ( 1 x ) 2 ( 1 v ) , F ( v ) = x ( 1 x ) 3 ( 1 v ) .
By these expressions, (2) reduces to
( 1 x x 2 v ) A ( v ) = x 2 v A ( 0 ) + ( ( 1 x ) 2 + x 3 ) x ( 1 x ) 4 ( 1 v ) .
Thus, by taking v = x 2 / ( 1 x ) , we obtain
A ( 0 ) = ( ( 1 x ) 2 + x 3 ) x ( 1 x x 2 ) ( 1 x ) 4 .
By using expression of A ( 0 ) , we have
A ( v ) = ( ( 1 x ) 2 + x 3 ) x ( 1 x x 2 ) ( 1 x ) 4 ( 1 v ) , E ( v ) = ( 1 2 x + 2 x 2 + x 3 x 4 ) x ( 1 x x 2 ) ( 1 x ) 3 ( 1 v ) ,
Substituting the expressions for A ( v ) , B ( v ) , and F ( v ) into (1), we obtain a linear system. By solving this system yields the following result.
 Theorem 3.
The generating function F 0010 ( x ) is given by
( x 3 + x 2 2 x + 1 ) x ( 1 x x 2 ) ( 1 x ) 3 .

2.2. The Pattern 0011

The generating tree T ( { 0011 } ) is determined by the following succession rules
0 00 , 01 , 00 00 , 001 , 001 0010 , 0010 0010 , 00102 , 00102 001020 , 001020 001020 , j 3 , 01 010 , 01 , 010 010 , 0101 , 0102 , 0101 01010 , 00102 , 01010 01010 , b 2 , 010103 , 010103 f 2 , a 3 , 0102 01010 , b 2 , a m e m , i m + 1 ( m 3 ) , b m f m , j m + 1 ( m 2 ) , c m f m 1 , a m ( m 3 ) , d m e m 1 , b m + 1 ( m 3 ) , e m e m , b m + 1 , c m + 1 ( m 2 ) , f m f m , a m + 1 , d m + 1 , ( m 2 ) , g m g m , j m + 1 ( m 4 ) , h m h m , i m + 1 ( m 3 ) , i m g m ( m 4 ) , j m h m , ( m 3 ) ,
where a m = 01010320540 ( m 2 ) ( m 3 ) 0 m ( m 1 ) , b m = 010210430 ( m 2 ) ( m 3 ) 0 m ( m 1 ) , c m = a m 2 0 m , d m = b m 2 0 m , e m = a m 0 , f m = b m 0 , g m = a m 1 m 0 , h m = b m 1 m 0 , i m = a m 1 m , and j m = b m 1 m . Define K ( v ) = m 3 F { 0011 } ; k m ( x ) v m 2 for K { B , E , F } , K ( v ) = m 3 F { 0011 } ; k m ( x ) v m 3 for K { A , C , D , H , J } , and K ( v ) = m 3 F { 0011 } ; k m ( x ) v m 4 for K { G , I } . By translating these succession rules to equations (as before), and then solving the system, we obtain
A ( v ) = B ( v ) = ( 1 + x ) x ( 1 x 2 x 2 x 3 ) ( 1 v ) , C ( v ) = D ( v ) = ( 1 x 2 x 3 ) x ( 1 x x 2 ) ( 1 x 2 x 2 x 3 ) ( 1 v ) , E ( v ) = F ( v ) = ( 1 + x ) ( 1 x 2 x 3 ) x ( 1 x x 2 ) ( 1 x 2 x 2 x 3 ) ( 1 v ) , G ( v ) = H ( v ) = ( 1 + x ) x ( 1 x x 2 ) ( 1 v ) , I ( v ) = J ( v ) = x ( 1 x x 2 ) ( 1 v ) ,
and then
F { 0011 } ; 0 ( x ) = ( 1 x 2 x 3 ) x ( 1 x ) ( 1 x 2 x 2 x 3 ) , F { 0011 } ; 00 ( x ) = F { 0011 } ; 001020 ( x ) = F { 0011 } ; 0010 ( x ) = ( 1 + x ) x 1 x x 2 , F { 0011 } ; 01 ( x ) = ( 1 x x 2 + x 3 + x 4 ) x ( 1 x ) ( 1 x x 2 ) ( 1 x 2 x 2 x 3 ) , F { 0011 } ; 001 ( x ) = F { 0011 } ; 00102 ( x ) = x 1 x x 2 , F { 0011 } ; 010 ( x ) = F { 0011 } ; 01010 ( x ) = ( 1 + x ) ( 1 x 2 x 3 ) x ( 1 x x 2 ) ( 1 x 2 x 2 x 3 ) , F { 0011 } ; 0101 ( x ) = ( 1 + x ) x 1 x 2 x 2 x 3 , F { 0011 } ; 0102 ( x ) = F { 0011 } ; 010103 ( x ) = ( 1 x 2 x 3 ) x ( 1 x x 2 ) ( 1 x 2 x 2 x 3 ) .
Therefore, we can present the following result.
 Theorem 4.
The generating function F 0011 ( x ) is given by
( 1 x 2 x 3 ) x ( 1 x ) ( 1 x 2 x 2 x 3 ) .

2.3. The Pattern 0110

The generating tree T ( { 0110 } ) is determined by the following succession rules
0 0 , 01 , 01 d 1 , 0 , d 1 , 1 , a m a m , b m + 1 , ( m 1 ) , b m d m , m 1 , d m , m , ( m 2 ) , c m , j d m , j , d m , j + 1 , , d m , m , ( 0 j m 2 ) , d m , m d m , m , ( m 1 ) , d m , j d m , j , d m , j + 1 , , d m , m 1 , a m , c m + 1 , j , ( 0 j m 1 ) ,
where a m = 0102 0 m 0 m , b m = a m 1 m , c m , j = 0102 0 ( m 1 ) j m , and d m , j = 0102 0 m j . Define A ( v ) = m 1 F { 0110 } ; a m ( x ) v m 1 , B ( v ) = m 2 F { 0110 } ; b m ( x ) v m 2 , and
C ( u , v ) = m 2 j = 0 m 2 F { 0110 } ; c m , j ( x ) v m 2 u m 2 j , D ( u , v ) = m 2 j = 0 m 2 F { 0110 } ; d m , j ( x ) v m 1 u m 1 j .
Then, the above succession rules can be written as
A ( v ) = x 1 v + x A ( v ) + x B ( v ) , B ( v ) = x ( 1 x ) ( 1 v ) + x D ( 0 , v ) , C ( u , v ) = x ( 1 v ) ( 1 u v ) + x u v ( 1 u ) ( D ( u , v ) u D ( 1 , u v ) D ( 0 , v ) + u D ( 0 , u v ) ) + x v ( 1 u ) ( D ( 0 , v ) D ( 0 , u v ) ) + x 2 ( 1 x ) ( 1 u ) ( 1 / ( 1 v ) u / ( 1 u v ) ) , D ( u , v ) = x ( 1 v ) ( 1 u v ) + x 1 u ( D ( u , v ) u D ( 1 , u v ) ) + x 1 u ( A ( v ) u A ( u v ) ) + x C ( u , v ) .
To solve this system, we guessed that
D ( 0 , v ) = ( 1 x ) M ( x ) 1 x ( 1 x ) ( 1 v ) ,
based on the initial coefficients of x n in the generating function D ( 0 , v ) , where
M ( x ) = 1 x 1 2 x 3 x 2 2 x 2
is the generating function for the Motzkin numbers (see Sequence A001006 in [10]). We now proceed to solve the system under this assumption. From the system, we have that
A ( v ) = 1 x 1 2 x 3 x 2 2 x ( 1 x ) ( 1 v ) , B ( v ) = 1 x 2 x 2 1 2 x 3 x 2 2 x 2 ( 1 v ) .
Thus, by finding C ( u , v ) from the equation of C ( u , v ) , and substituting it into the equation of D ( u , v ) , we obtain
u v + v x + x 2 v v ( 1 u ) D ( u , v / u ) = x ( v + x ) u v ( 1 u ) D ( 1 , v ) + ( x + v 1 ) 1 2 x 3 x 2 + v x v x 2 2 x + 1 2 x ( 1 x ) v ( 1 v / u ) ( 1 v ) .
By taking u = ( v x + x 2 v ) / v , we have
D ( 1 , v ) = ( x + v 1 ) 1 2 x 3 x 2 + v x v x 2 2 x + 1 2 x ( 1 x ) ( v 2 + v x + x 2 v ) ( 1 v ) .
Using this expression with (3), we obtain
D ( u , v ) = ( x + u v 1 ) 1 2 x 3 x 2 + u v x u v x 2 2 x + 1 2 x ( 1 x ) ( u 2 v 2 + u v x + x 2 u v ) ( 1 v ) , C ( u , v ) = ( ( x 1 ) u 2 v 2 + ( x 2 ) ( x 1 ) u v + x 3 x 2 + 2 x 1 ) 1 2 x 3 x 2 2 x 2 ( 1 x ) ( u 2 v 2 + u v x + x 2 u v ) ( 1 v ) ( 1 u v ) + ( 1 x 2 ) ( 1 2 x ) u 2 v 2 + ( 2 x 4 3 x 3 + 5 x 2 ) u v + 2 x 5 x 4 + x 2 3 x + 1 2 x 2 ( 1 x ) ( u 2 v 2 + u v x + x 2 u v ) ( 1 v ) ( 1 u v ) .
Note that the expressions A ( v ) , B ( v ) , C ( u , v ) , and D ( u , v ) (without any assumptions) satisfy the system, and therefore constitute its solution. Hence, from the first two succession rules, we observe
F P ( x ) = x 1 x + x 1 x ( x + x D ( 0 , 0 ) + x 2 1 x ) ,
which leads to the following result.
 Theorem 5.
The generating function F 0110 ( x ) is given by
1 x 1 2 x 3 x 2 2 x ( 1 x ) .

2.4. The Pattern 0112

The generating tree T ( { 0112 } ) is determined by the following succession rules
0 0 , a 1 , a m c m , b 1 , b 2 , , b m , ( m 1 ) , b m b m , b 1 , b 2 , , b m , ( m 1 ) , c m c m , b 1 , b 2 , , b m , a m + 1 , ( m 1 ) ,
where a m = 0102 0 m , b m = a m m , and c m = a m 0 . As before, we can translate these rules to equations:
F { 0112 } ; 0 ( x ) = x + x F { 0112 } ; 0 ( x ) + x A ( 0 ) , A ( v ) = x 1 v + x C ( v ) + x 1 v B ( v ) , B ( v ) = x 1 v + x B ( v ) + x 1 v B ( v ) , C ( v ) = x 1 v + x C ( v ) + x 1 v B ( v ) + x v ( A ( v ) A ( 0 ) ) .
where K ( v ) = m 1 F P ; k m ( x ) v m 1 for K { A , B , C } . Thus,
F { 0112 } ; 0 ( x ) = x 1 x ( 1 + A ( 0 ) ) , ( 1 x 2 v ( 1 x ) ) A ( v ) = x 2 v ( 1 x ) A ( 0 ) + x 1 2 x v + v x .
By taking v = x 2 / ( 1 x ) , we obtain that A ( 0 ) = x 1 2 x x 2 . Hence, by the first equation, we obtain the following result.
 Theorem 6.
The generating function F 0112 ( x ) is given by
( 1 x x 2 ) x ( 1 x ) ( 1 2 x x 2 ) .

2.5. The Pattern 0123

The generating tree T ( { 0123 } ) is determined by the following succession rules
0 0 , a 1 , a m b m , a m , c m , 2 , c m , 3 , , c m , m , m 1 , b m b m , a m + 1 , f m , 2 , f m , 3 , , f m , m + 1 , m 1 , c m , j d m , j , e m , j , c m + 1 , 2 , c m + 1 , 3 , , c m + 1 , j 1 , c m , j , 2 j m , d m , j d m , j , e m , j , c m , 2 , c m , 3 , , c m , j 1 , c m + 1 , j , 2 j m , e m , j d m + 1 , j , e m , j , c m , 2 , c m , 3 , , c m , j 1 , c m + 1 , j , 2 j m , f m , j g m , j , h m , j , f m + 1 , 2 , f m + 1 , 3 , , f m + 1 , j 1 , f m , j , 2 j m + 1 , g m , j g m , j , h m , j , f m , 2 , f m , 3 , , f m , j 1 , f m + 1 , j , 2 j m + 1 , h m , j g m + 1 , j , h m , j , f m , 2 , f m , 3 , , f m , j 1 , f m + 1 , j , 2 j m + 1 ,
where a m = ( 01 ) m , b m = a m 0 , c m , j = a m j , d m , j = c m , j 0 , e m , j = c m , j 1 , f m , j = a m 0 j , g m , j = f m , j 0 , and h m , j = f m , j 1 .
Now, we define the following eight generating functions:
K ( v ) = m 1 F ( P ; k m ) ( x ) v m 1 , K { A , B } , K ( v , u ) = m 2 j = 2 m F ( P ; k m , j ) ( x ) v m 2 u m j , K { C , D , E } , K ( v , u ) = m 1 j = 1 m + 1 F ( P ; k m , j ) ( x ) v m 1 u m + 1 j , K { F , G , H } .
Then, the above succession rules can be written as
F P ( x ) = x + x F P ( x ) + x A ( 0 ) , A ( v ) = x 1 v + x B ( v ) + x A ( v ) + v x C ( v , 1 ) , B ( v ) = x 1 v + x B ( v ) + x v ( A ( v ) A ( 0 ) ) + x F ( v , 1 )
and
C ( v , u ) = x ( 1 v ) ( 1 v u ) + x D ( v , u ) + x E ( v , u ) + x u v ( 1 u ) ( u C ( v , 1 ) C ( v , u ) + ( 1 u ) C ( v , 0 ) ) + x C ( v , u ) , D ( v , u ) = x ( 1 v ) ( 1 v u ) + x D ( v , u ) + x E ( v , u ) + x 1 u ( C ( v , 1 ) C ( v , u ) ) + x u v ( C ( v , u ) C ( v , 0 ) ) , E ( v , u ) = x ( 1 v ) ( 1 v u ) + x u v ( D ( v , u ) D ( v , 0 ) ) + x E ( v , u ) + x 1 u ( C ( v , 1 ) C ( v , u ) ) + x u v ( C ( v , u ) C ( v , 0 ) ) , F ( v , u ) = x ( 1 v ) ( 1 v u ) + x G ( v , u ) + x H ( v , u ) + x u v ( 1 u ) ( u F ( v , 1 ) F ( v , u ) + ( 1 u ) F ( v , 0 ) ) + x F ( v , u ) , G ( v , u ) = x ( 1 v ) ( 1 v u ) + x G ( v , u ) + x H ( v , u ) + x 1 u ( F ( v , 1 ) F ( v , u ) ) + x u v ( F ( v , u ) F ( v , 0 ) ) , H ( v , u ) = x ( 1 v ) ( 1 v u ) + x u v ( G ( v , u ) G ( v , 0 ) ) + x H ( v , u ) + x 1 u ( F ( v , 1 ) F ( v , u ) ) + x u v ( F ( v , u ) F ( v , 0 ) ) .
 Theorem 7.
We have
A ( v ) = x ( x 2 3 x + 1 ) ( 3 x 1 ) ( x 3 6 x 2 + 5 x 1 ) ( 2 v x v 3 x + 1 ) , B ( v ) = x ( 3 x 1 ) ( 2 x 1 ) ( x 3 6 x 2 + 5 x 1 ) ( 2 v x v 3 x + 1 ) , C ( v , u ) = v x ( u v 1 ) ( 2 v x v 3 x + 1 ) ,
and C ( v , u ) = D ( v , u ) = E ( v , u ) = F ( v , u ) = G ( v , u ) = H ( v , u ) .
 Proof. 
It is very easy to check that the expressions of the generating functions A ( v ) , B ( v ) , C ( v , u ) , D ( v , u ) , E ( v , u ) , F ( v , u ) , G ( v , u ) , and H ( v , u ) satisfy the system of the equations. □
Hence, the above theorem gives A ( 0 ) = x ( x 2 3 x + 1 ) 1 5 x + 6 x 2 x 3 . Thus, by the fact that F P ( x ) = x + x F P ( x ) + x A ( 0 ) , we obtain the following result.
 Theorem 8.
The generating function F 0123 ( x ) is given by
x ( 1 3 x ) 1 5 x + 6 x 2 x 3 .

2.6. The Pattern 0132

The generating tree T ( { 0132 } ) is determined by the following succession rules:
0 0 , a 1 , a m b m , a m , c m , c m 1 , , c 2 , b m b m , a m + 1 , c m + 1 , c m , , c 2 , c m b m , a m + 1 , c m , c m 1 , , c 2 ,
where a m = ( 01 ) m , b m = a m 0 , and c m = a m 2 .
Define K ( v ) = m 1 F P ; k m ( x ) v m 1 with K { A , B } and C ( v ) = m 2 F P ; c m ( x ) v m 2 . Then, the above succession rules lead to the following equations
F P ( x ) = x + x F P ( x ) + x A ( 0 ) , A ( v ) = x 1 v + x B ( v ) + x A ( v ) + v x 1 v C ( v ) , B ( v ) = x 1 v + x B ( v ) + x v ( A ( v ) A ( 0 ) ) + x 1 v C ( v ) , C ( v ) = x 1 v + x v ( B ( v ) B ( 0 ) ) + x v 2 ( A ( v ) A ( 0 ) v d d v A ( v ) v = 0 ) + x 1 v C ( v ) .
Solving the last two equations for B ( v ) and C ( v ) , and then substituting their expressions into the equation of A ( v ) , we obtain
( ( 1 x ) 2 ) v 3 + ( x 3 4 x 2 + 3 x 1 ) v 2 + x 2 ( 3 2 x ) v + x 3 ) A ( v ) = x 2 ( v 2 + v x 2 v x ) A ( 0 ) + v x 2 ( v x v x ) B ( 0 ) + d d v A ( v ) v = 0 + v x ( v x 2 v x x 2 + v ) .
Let v 1 , v 2 , v 3 be the roots of the kernel equation ( 1 x ) 2 ) v 3 + ( x 3 4 x 2 + 3 x 1 ) v 2 + x 2 ( 3 2 x ) v + x 3 = 0 . Note that
v 1 = 1 x 2 x 2 6 x 3 19 x 4 66 x 5 + , v 2 = x x + 3 2 x 2 21 8 x 2 x + 4 x 3 839 128 x 3 x + 11 x 4 19757 1024 x 4 x + 35 x 5 + , v 3 = x x + 3 2 x 2 + 21 8 x 2 x + 4 x 3 + 839 128 x 3 x + 11 x 4 19757 1024 x 4 x + 35 x 5 + .
So, by substituting v = v 1 and v = v 2 within the equation, and solving for A ( 0 ) and B ( 0 ) + d d v A ( v ) v = 0 , we obtain
A ( 0 ) = v 2 v 3 ( x 2 2 x + 2 ) v 2 v 3 + x ( 1 x ) ( v 2 + v 3 ) + x 2 .
By the definitions we have that v 1 v 2 v 3 = x 2 / ( 1 x ) 2 and v 1 + v 2 + v 3 = 1 x + x 2 / ( 1 x ) 2 . Thus,
A ( 0 ) = x 2 x 2 ( x 2 2 x + 2 ) + ( 1 x ) ( x 3 3 x 2 + 2 x 1 ) v 1 + ( 1 x ) 3 v 1 2 .
Hence, by F P ( x ) = x + x F P ( x ) + x A ( 0 ) , we obtain,
F P ( x ) = x 1 x 1 + x 2 x 2 ( x 2 2 x + 2 ) + ( 1 x ) ( x 3 3 x 2 + 2 x 1 ) v 1 + ( 1 x ) 3 v 1 2 .
By expressing v 1 in terms of F P ( x ) , then substituting this expression into the kernel equation ( 1 x ) 2 ) v 3 + ( x 3 4 x 2 + 3 x 1 ) v 2 + x 2 ( 3 2 x ) v + x 3 = 0 , we have the following result.
 Theorem 9.
The generating function f = F 0132 ( x ) satisfies
x 3 + x 2 ( x 2 3 x + 3 ) f + x ( 2 x 3 5 x 2 + 7 x 3 ) f 2 + ( 1 x ) 4 f 3 = 0 .
Moreover,
F { 0132 } ( x ) = x 3 7 x + 5 x 2 2 x 3 2 x A · cos 1 3 arccos x B 2 A A + π 3 3 ( 1 x ) 4 ,
where A = x 5 + x 4 10 x 3 + 20 x 2 14 x + 3 and B = 2 x 7 24 x 6 + 72 x 5 107 x 4 + 90 x 3 60 x 2 + 34 x 9 .

2.7. The Pattern 0001

The generating tree T ( { 0001 } ) is determined by the following succession rules
0 00 , 01 , 00 000 , 00 , 000 000 , 01 a 1 , d 1 , a 2 m + 1 f m + 1 , 0 , g m + 2 , 1 , , f 2 m , 2 m 2 , g 2 m + 1 , 2 m 1 , b 2 m + 1 , 2 m , f 2 m + 1 , 2 m + 1 , b 2 m + 1 , 2 m + 2 , ( m 0 ) , a 2 m g m + 1 , 0 , f m + 1 , 1 , , g 2 m 1 , 2 m 4 , f 2 m 1 , 2 m 3 , g 2 m , 2 m 2 , b 2 m , 2 m 1 , f 2 m , 2 m , b 2 m , 2 m + 1 , ( m 1 ) , b 2 m + 1 , 2 m f m + 1 , 0 , g m + 2 , 1 , , f 2 m , 2 m 2 , g 2 m + 1 , 2 m 1 , b 2 m + 1 , 2 m , ( m 0 ) , b 2 m + 1 , 2 m + 2 f m + 1 , 0 , g m + 2 , 1 , , f 2 m , 2 m 2 , g 2 m + 1 , 2 m 1 , f 2 m + 1 , 2 m , a 2 m + 2 , d 2 m + 2 , ( m 0 ) , b 2 m , 2 m 1 g m + 1 , 0 , f m + 1 , 1 , , g 2 m 1 , 2 m 4 , f 2 m 1 , 2 m 3 , g 2 m , 2 m 2 , b 2 m , 2 m 1 , ( m 1 ) , b 2 m , 2 m + 1 g m + 1 , 0 , f m + 1 , 1 , , g 2 m , 2 m 2 , f 2 m , 2 m 1 , a 2 m + 1 , d 2 m + 1 , ( m 1 ) , c 2 m + 1 g m + 1 , 0 , f m + 1 , 1 , , g 2 m , 2 m 2 , f 2 m , 2 m 1 , e 2 m + 1 , c 2 m + 1 , ( m 0 ) , c 2 m f m , 0 , g m + 1 , 1 , , f 2 m 2 , 2 m 4 , g 2 m 1 , 2 m 3 , f 2 m 1 , 2 m 2 , e 2 m , c 2 m , ( m 1 ) , d 2 m + 1 g m + 1 , 0 , f m + 1 , 1 , , g 2 m , 2 m 2 , f 2 m , 2 m 1 , f 2 m + 1 , 2 m + 1 , c 2 m + 1 , ( m 0 ) , d 2 m f m , 0 , g m + 1 , 1 , , f 2 m 2 , 2 m 4 , g 2 m 1 , 2 m 3 , f 2 m , 2 m , c 2 m , ( m 1 ) , e 2 m + 1 f m + 1 , 0 , g m + 2 , 1 , , f 2 m , 2 m 2 , g 2 m + 1 , 2 m 1 , f 2 m + 1 , 2 m , e 2 m + 1 , ( m 0 ) , e 2 m g m + 1 , 0 , f m + 1 , 1 , , g 2 m , 2 m 2 , f 2 m , 2 m 1 , e 2 m , ( m 1 ) , f 2 m + 1 , 2 m + 1 f m + 1 , 0 , g m + 2 , 1 , , f 2 m , 2 m 2 , g 2 m + 1 , 2 m 1 , f 2 m + 1 , 2 m , e 2 m + 1 , f 2 m + 1 , 2 m + 1 , ( m 0 ) , f 2 m , 2 m g m + 1 , 0 , f m + 1 , 1 , , g 2 m , 2 m 2 , f 2 m , 2 m 1 , e 2 m , f 2 m , 2 m , ( m 1 ) , f 2 m + 1 , 2 j + 1 f 2 m + 1 j , 0 , g 2 m + 1 j , 1 , , f 2 m , 2 j 2 , g 2 m + 1 , 2 j 1 , f 2 m + 1 , 2 j , f 2 m + 1 , 2 j + 1 , ( 0 j m 1 ) , f 2 m + 1 , 2 j g 2 m + 2 j , 0 , f 2 m + 2 j , 1 , , g 2 m + 1 , 2 j 2 , f 2 m + 1 , 2 j 1 , f 2 m + 1 , 2 j , ( 0 j m ) , f 2 m , 2 j + 1 f 2 m j , 0 , g 2 m + 1 j , 1 , , f 2 m 1 , 2 j 1 , g 2 m , 2 j 1 , f 2 m , 2 j , f 2 m , 2 j + 1 , ( 0 j m 1 ) , f 2 m , 2 j g 2 m + 1 j , 0 , f 2 m + 1 j , 1 , , g 2 m , 2 j 2 , f 2 m , 2 j 1 , f 2 m , 2 j , ( 0 j m 1 ) , g 2 m + 1 , 2 j + 1 g 2 m + 1 j , 0 , f 2 m + 1 j , 1 , , f 2 m , 2 j 2 , f 2 m , 2 j 1 , g 2 m + 1 , 2 j , g 2 m + 1 , 2 j + 1 , ( 0 j m 1 ) , g 2 m + 1 , 2 j f 2 m + 1 j , 0 , g 2 m + 2 j , 1 , , f 2 m , 2 j 2 , g 2 m + 1 , 2 j 1 , g 2 m + 1 , 2 j , ( 0 j m ) , g 2 m , 2 j + 1 g 2 m j , 0 , f 2 m j , 1 , , g 2 m 1 , 2 j 2 , f 2 m 1 , 2 j 1 , g 2 m , 2 j , g 2 m , 2 j + 1 , ( 0 j m 1 ) , g 2 m , 2 j f 2 m j , 0 , g 2 m + 1 j , 1 , , f 2 m 1 , 2 j 2 , g 2 m , 2 j 1 , g 2 m , 2 j , ( 0 j m 1 ) ,
where a m = 01021 ( m ( m 1 ) , b m , j = a m j , c m = a m 1 m m m , d m = a m 1 m m , e m = a m m m , f m , j = a m m ( m 1 ) j , and g m , j = a m ( m 2 ) ( m 3 ) j . Then, we translate these succession rules to equations, and solving the system (leaving to the interested reader), we obtain
F { 0001 } ; 0 ( x ) = x ( 1 x + x 3 + x 4 ) ( 1 x x 2 ) ( 1 x ) 2 , F { 0001 } ; 00 ( x ) = x ( 1 x ) 2 , F { 0001 } ; 000 ( x ) = x 1 x , F { 0001 } ; 01 ( x ) = x ( 1 x + x 2 + 2 x 3 ) ( 1 x x 2 ) ( 1 x ) 2 , F { 0001 } ; a m ( x ) = x ( 1 x + x 3 + x 4 ) ( 1 x x 2 ) ( 1 x ) m + 2 , F { 0001 } ; c m ( x ) = x ( 1 x + x 2 ) ( 1 x ) m + 2 , F { 0001 } ; d m ( x ) = x ( 1 x + 2 x 2 ) ( 1 x ) m + 2 , F { 0001 } ; e m ( x ) = x ( 1 x ) m + 1 , F { 0001 } ; b m , m 1 ( x ) = x ( 1 x ) m , F { 0001 } ; b m , m + 1 ( x ) = x ( 1 x + x 2 + 2 x 3 ) ( 1 x x 2 ) ( 1 x ) m + 2 , F { 0001 } ; f m , j ( x ) = x ( 1 x ) j + 1 + δ ( m = j ) , F { 0001 } ; g m , j ( x ) = x ( 1 x ) j + 1 .
Let us give an example explaining how to confirm this formulas. For example, the rule 01 a 1 , d 1 is equivalent to
F { 0001 } ; 01 ( x ) = x + x F { 0001 } ; a 1 ( x ) + x F { 0001 } ; d 1 ( x ) .
Thus, we need to show
x ( 1 x + x 2 + 2 x 3 ) ( 1 x x 2 ) ( 1 x ) 2 = x + x 2 ( 1 x + x 3 + x 4 ) ( 1 x x 2 ) ( 1 x ) 3 + x 2 ( 1 x + 2 x 2 ) ( 1 x ) 3 ,
which it is true.
Therefore, we can present the following formula.
 Theorem 10.
The generating function F 0001 ( x ) is given by
x ( 1 x + x 3 + x 4 ) ( 1 x x 2 ) ( 1 x ) 2 .

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

No datasets were generated or analyzed during the current study.

References

  1. Baril, J.-L.; González, J. F.; Ramírez, J. L. Last symbol distribution in pattern avoiding Catalan words. Math. Comput. Sci. 2024, 18(1). [Google Scholar] [CrossRef]
  2. Benyi, B.; Mansour, T.; Ramírez, J. L. Pattern avoidance in weak ascent sequences. Discret. Math. Theor. Comput. Sci. 2024, 26(1), dmtcs:12273. [Google Scholar] [CrossRef]
  3. Callan, D. On ascent, repetition and descent sequences. arXiv 2019, arXiv:1911.02209. [Google Scholar] [CrossRef]
  4. Callan, D.; Mansour, T. Wilf classes for weak ascent sequences avoiding a pair or triple of length-3 patterns. Discret. Math. 2025a, 348(6), 114438. [Google Scholar] [CrossRef]
  5. Callan, D.; Mansour, T. Wilf classes for descent sequences avoiding a pattern or a pair of patterns of length three. Journal Comb.>, To Appear.
  6. Kotsireas, I.; Mansour, T.; Yildirim, G. An algorithmic approach based on generating trees for enumerating pattern-avoiding inversion sequences. J. Symb. Comput. 2024, 120, 102231. [Google Scholar] [CrossRef]
  7. Lin, Z.; Yan, S. H. F. Eulerian statistics on inversion sequences. Eur. J. Comb. 2015, 44, 54–69. [Google Scholar]
  8. Ma, S.-M. Counting permutations by numbers of excedances, fixed points and cycles. Bull. Aust. Math. Soc. 2011, 84, 97–105. [Google Scholar] [CrossRef]
  9. Ma, S.-M. Some combinatorial sequences associated with context-free grammars. arXiv 2012, arXiv:1208.3104. [Google Scholar] [CrossRef]
  10. Sloane, N. J. A. The On-Line Encyclopedia of Integer Sequences. Available online: http://oeis.org.
  11. Yan, S. H. F. On a conjecture of Savage and Visontai. Eur. J. Comb. 2015, 47, 59–70. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2026 MDPI (Basel, Switzerland) unless otherwise stated

Accessibility

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings