Abstract
A descent sequence is a word of nonnegative integers satisfying that the first term is zero, and each subsequent term is at most one plus the number of descents among the preceding terms, where a descent is a position at which a term is greater than the term immediately following it. 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.
MSC:
05A05; 05A15
1. Introduction
Pattern avoidance has been widely investigated across a variety of combinatorial frameworks such as permutations, set partitions, ascent sequences, inversion sequences, and descent-like structures. This line of research is motivated by deep connections with enumerative combinatorics, generating functions, bijective constructions, and Wilf-equivalence phenomena. Among these objects, descent sequences form an interesting family closely linked to Catalan-type structures and other restricted integer sequences that naturally arise in enumeration problems. Investigating pattern avoidance in this setting extends classical avoidance theory to a broader class of combinatorial sequences and sheds light on their structural and enumerative behavior. Standard references include [1,2,3].
A descent in an integer sequence is an index j such that . We call a sequence of nonnegative integers a descent sequence of length n if it satisfies:
- the initial condition ,
- for each i with , the inequality holds,
where counts the number of descents in the given prefix. For instance, 010203 satisfies these conditions and is a descent sequence, whereas 01103 fails to satisfy them. These sequences were first introduced by Callan [4], and later studied jointly by the author and Callan in the context of avoidance of pairs of length-three patterns [5].
We now recall the notion of pattern containment for integer sequences. Let be a word over the integers. A pattern is a word over in which every symbol in this alphabet appears at least once. We say that w contains if there exist indices such that the subsequence is order-isomorphic to . Equivalently, for any , the relations between and (less than, greater than, or equal) match exactly those between and . If no such subsequence exists, then w is said to avoid . As an illustration, the descent sequence 010201303 realizes every pattern of length three but avoids the pattern 0321. We write for the set of descent sequences of length n that avoid all patterns . Two pattern sets T and R are said to be D-Wilf-equivalent, written , if for all .
Callan and Mansour [5] determined the classification of D-Wilf-equivalence classes: there are 9 classes for single patterns of length three, 23 classes for pairs of length-three patterns, and 69 classes for patterns of length four. They also obtained explicit generating functions in several cases, including
Here denotes the generating function counting nonempty descent sequences in .
In this work, we focus on computing for several patterns of length four. For each equivalence class, we construct a generating tree with one or two labels, extract functional equations from the associated succession rules, and solve them to obtain closed-form generating functions. In particular, we enumerate descent sequences avoiding any of the patterns 0001, 0010, 0011, 0012, 0021, 0110, 0112, 0123, and 0132. (See also [1,2,3] for related results on pattern avoidance in permutations and set partitions.)
The structure of the paper is as follows. Section 2 introduces the framework of generating trees and outlines the general strategy. In Section 2.1, Section 2.2, Section 2.3, Section 2.4, Section 2.5, Section 2.6 and Section 2.7, we treat the individual patterns 0010, 0011, 0110, 0112, 0123, 0132, and 0001 separately. In each case, we derive appropriate succession rules and compute the corresponding generating functions.
2. Generating Trees and Proofs
We now describe the generating tree associated with pattern-avoiding descent sequences in , following the construction in [5] and related works such as [6,7,8,9,10,11,12].
The tree is rooted at the single vertex labeled 0 at level 1. Suppose . Its children are all sequences obtained by appending a value satisfying , provided that the resulting sequence still avoids all patterns in P.
For a node , let denote the subtree rooted at that contains all of its descendants. Two nodes and are considered equivalent, written as , if their corresponding subtrees are isomorphic as ordered rooted trees.
We then form a reduced tree by identifying each node with the first representative (in a breadth-first, left-to-right traversal) of its isomorphism class. From this point onward, we treat and as the same object.
Example 1.
Let . The children of 0 in the generating tree are 00 and 01, which leads to the succession rule .
Clearly, the children of are 000 and 001. The descent sequence avoids P if and only if the descent sequence avoids P, so . Also, the descent sequence avoids P if and only if the descent sequence avoids P (by removing the third letter in ), so . Thus, we have the succession rule . Similarly, we have and . Hence, the generating tree is determined by the following succession rules: , , , and .
For a given set P, we aim to obtain an explicit expression for the generating function
To this end, we introduce the more refined quantity
where . It is immediate that . Furthermore, any succession rule of the form
corresponds to the functional equation
Let . By Example 1, we have
From the solution of this linear system, we obtain the following result.
Theorem 1.
The generating function for the number of descent sequences of length n that avoid 0012 is given by
Note that for all . Hence, by [5], we have the following formula.
Theorem 2.
The generating function for the number of descent sequences of length n that avoid 0021 is given by
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 typically involves appending a letter to v and verifying that if avoids the given pattern, then for all .
2.1. The Pattern 0010
Lemma 1.
The generating tree is determined by the following succession rules:
where , , , , , and .
Proof.
Clearly, the children of are 00 and 01. Thus, we obtain the succession rule . The children of are 000 and 001. Note that a descent sequence avoids P if and only if avoids P, which implies that . Thus, we obtain the succession rule .
The only child of is 0010. Moreover, a descent sequence avoids P if and only if avoids P, which implies that . Hence, we obtain the succession rule .
Clearly, the children of are and , and the children of are and . Thus, we have the succession rules and .
The children of are , , and . Thus, we obtain the succession rule . Moreover, the children of are and . Thus, we obtain the succession rule .
Similarly, we have , , , and . □
Lemma 2.
We have
where and satisfies the following system of equations:
with , for all .
Proof.
By translating the first five succession rules in Lemma 1 into equations, we obtain (1).
Translating the succession rule into an equation in terms of yields
Multiplying both sides by and summing over , we obtain
Therefore,
Similarly, the remaining equations can be derived from the corresponding succession rules. □
By solving (2) for , we obtain
By these expressions, (2) reduces to
This class of functional equations can be solved systematically via the kernel method; see Banderier et al. [13] for details. The equation is first rearranged so that the unknown generating function is multiplied by a polynomial kernel in x and v. The choice is made so that this kernel vanishes, thereby eliminating the unknown term and allowing us to solve for explicitly. In this case, we obtain
Hence, by using the expression of , we have
By using the expressions for , , and , we obtain explicit formulas for , , and . Hence, by solving (1) for , we obtain the following result.
Theorem 3.
The generating function for the number of descent sequences of length n that avoid 0010 is given by
2.2. The Pattern 0011
As in the proof of Lemma 1, one can show that the generating tree is determined by the following succession rules:
where , , , , , , , , , and .
Define for , for , and for . Similar to the arguments in the proof of Lemma 2, we can translate these succession rules into the following equations:
and
By multiplying each equation in (4) by (where corresponds to the definitions of the generating functions ), we obtain
By solving (5) throughout the algorithm in [14], we obtain
Thus, by (3), we have
Therefore, we can present the following result.
Theorem 4.
The generating function for the number of descent sequences of length n that avoid 0011 is given by
2.3. The Pattern 0110
As in the proof of Lemma 1, one can show that the generating tree is determined by the following succession rules
where , , , and . Note that by translating these succession rules into equations, we obtain
To solve this system of recurrence relations, we define
Then, the above succession rules can be written as
To solve this system, we guessed that
based on the initial coefficients of in the generating function , where
is the generating function for the Motzkin numbers (see Sequence A001006 in [15]). We now proceed to solve the system under this assumption. From the system, we have that
Thus, by finding from the equation of , and substituting it into the equation of , we obtain
This class of functional equations can be solved systematically via the kernel method; see Banderier et al. [13] for details. The equation is first rearranged so that the unknown generating function is multiplied by a polynomial kernel in x, v, and u. The choice is made so that this kernel vanishes, thereby eliminating the unknown term and allowing us to solve for explicitly. In this case, we obtain
Using this expression with (6), we obtain
Note that the expressions , , , and (without any assumptions) satisfy the system, and therefore constitute its solution. Hence, from the first two succession rules, we observe
which leads to the following result.
Theorem 5.
The generating function for the number of descent sequences of length n that avoid 0110 is given by
2.4. The Pattern 0112
As in the proof of Lemma 1, one can show that the generating tree is determined by the following succession rules
where , , and . As before, we can translate these rules to equations:
where for . Thus,
This class of functional equations can be solved systematically via the kernel method; see Banderier et al. [13] for details. The equation is first rearranged so that the unknown generating function is multiplied by a polynomial kernel in x and v. The choice is made so that this kernel vanishes, thereby eliminating the unknown term and allowing us to solve for explicitly. In this case, we obtain . Hence, by the first equation, we obtain the following result.
Theorem 6.
The generating function for the number of descent sequences of length n that avoid 0112 is given by
2.5. The Pattern 0123
We start with the following result. For the proof, see Appendix A.
Lemma 3.
The generating tree is determined by the following succession rules
where , , , , , , , and .
Now, we define the following eight generating functions:
Then, the above succession rules can be written as
Theorem 7.
We have
and .
Proof.
Since the expressions of the generating functions , , , , , , , and satisfy the system of equations, the proof is complete. □
Hence, the above theorem gives . Thus, by the fact that , we obtain the following result.
Theorem 8.
The generating function for the number of descent sequences of length n that avoid 0123 is given by
2.6. The Pattern 0132
As in the proof of Lemma 1, one can show that the generating tree is determined by the following succession rules:
where , , and .
Define with and . Then, the above succession rules lead to the following equations
Solving the last two equations for and , and then substituting their expressions into the equation of , we obtain
Let be the roots of the kernel equation . Note that
Thus, by substituting and within the equation, which are chosen so as to annihilate the kernel, and solving for and , we obtain
By the definitions we have that and . Thus,
Hence, by , we obtain,
By expressing in terms of , then substituting this expression into the kernel equation , we have the following result.
Theorem 9.
The generating function for the number of descent sequences of length n that avoid 0132 satisfies
Moreover,
where and .
2.7. The Pattern 0001
We start with the following result. For the proof, see Appendix B.
Lemma 4.
The generating tree is determined by the following succession rules
where , , , , , , and .
Then, we translate these succession rules to equations, and solving the system (leaving to the interested reader), we obtain
Let us give an example explaining how to confirm these formulas. For example, the rule is equivalent to
Thus, we need to show
which it is true.
Therefore, we can present the following formula.
Theorem 10.
The generating function for the number of descent sequences of length n that avoid 0001 is given by
3. Conclusions
In this paper, we studied pattern avoidance in descent sequences of for several patterns of length four. Using the framework of generating trees, we developed a systematic approach based on labelled trees and succession rules. For each pattern, we derived a system of recurrence relations and solved it to obtain explicit formulas for the corresponding generating functions . Our results show that the generating tree method provides a unified and effective strategy for analyzing different pattern-avoidance classes. In particular, despite the diversity of the patterns considered, each case can be reduced to a manageable system of functional equations that leads to closed-form expressions.
A natural direction for future work is to extend this approach to other classes of patterns or longer patterns and to investigate possible Wilf-equivalences between additional families of pattern-avoiding descent sequences.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
No datasets were generated or analyzed during the current study.
Acknowledgments
We thank the referees for their careful reading of and helpful comments on the previous version of this manuscript.
Conflicts of Interest
The author declares no conflicts of interest.
Appendix A
Here we give a detailed proof for Lemma 3. In order to do that, we define the following descent sequences , , , , , , , and and we show that all the succession rules of the generating tree are hold:
- Clearly, the children of 0 are 00 and 01. Since any descent sequence avoids 0123 if and only if avoids 0123, this . Thus, we have the succession rule
- Let . The children of are , , and with . Thus, we have the succession rule
- Let . The children of are , , and with . Thus, we have the succession rule
- Let . The children of are , , with , and (since we avoid 0123 there is no child with ). To show , we note that any descent sequence avoids 0123 if and only if avoids 0123. Thus, we have the succession rule
- Let . The children of are , , with , and (since we avoid 0123 there is no child with ). Thus, we have the succession rule
- Let . The children of are , , with , and (since we avoid 0123 there is no child with ). Thus, we have the succession rule
- Let . The children of are , , with , and (since we avoid 0123 there is no child with ). Thus, we have the succession rule
- Let . The children of are , , with , and (since we avoid 0123 there is no child with ). Thus, we have the succession rule
- Let . The children of are , , with , and (since we avoid 0123 there is no child with ). Thus, we have the succession rule
Note that, in our setting, to show , it suffices to construct a bijection between the set of descent sequences of the form of length n and the set of descent sequences of the form of length . In our cases, this bijection is obtained by rearranging and relabeling the letters of v to produce , while keeping . This is the main reason why we only needed to prove three cases.
Appendix B
Here we give a detailed proof for Lemma 4. In order to do that, we define the following descent sequences , , , , , , and . As shown and noted in Appendix B, we show that all the succession rules of the generating tree hold:
- Clearly, the children of 0 are 00 and 01. Thus, we have the succession rule .
- The children of 00 are 000 and . To show , we note that any descent sequence (or ) avoids 0001 has the form either or . Thus, we have the succession rule .
- The only child of 000 is . Thus, we have the succession rule .
- The children of 01 are and . Thus, we have the succession rule .
- Let . The children of are with , with , , , and . Thus, we have the succession rule
- Let . The children of are with , with , , , and . Thus, we have the succession rule
- Let . The children of are with , with , and . Thus, we have the succession rule
- Let . The children of are with , with , , and . Thus, we have the succession rule
- Let . Very similarly to the last two items, one can obtain the following succession rules:
- Let . The children of are with , with , , and . Thus, we have the succession ruleVery similarly, for , one can show the following succession rule:
- Let . The children of are with , with , , and . Thus, we have the succession ruleVery similarly, for , one can show the following succession rule:
- Let . The children of are with , with , and . Thus, we have the succession ruleVery similarly, for , one can show the following succession rule:
- Let . The children of are with , , with , , . Thus, we have the succession ruleVery similarly, for , one can show the following succession rule:
- Let , The children of are with , with , and . Thus, we have the succession ruleLet , The children of are with , with , and . Thus, we have the succession ruleVery similarly, for , one can show the following succession rules:and
- Let . The children of are with , with , and . Thus, we have the succession ruleLet . Then the children of are with , with , and . Thus, we have the succession ruleVery similarly, for , one can show the following succession rules:and
Again, note that, in our setting, to show , it suffices to construct a bijection between the set of descent sequences of the form of length n and the set of descent sequences of the form of length . In our cases, this bijection is obtained by rearranging and relabeling the letters of v to produce , while keeping . This is the main reason why we did not prove each equivalence separately.
References
- Bóna, M. Combinatorics of Permutations, 2nd ed.; Discrete Mathematics and Its Applications; CRC Press: Boca Raton, FL, USA, 2012. [Google Scholar]
- Kitaev, S. Patterns in Permutations and Words; Monographs in Theoretical Computer Science. An EATCS Series; Springer: Berlin/Heidelberg, Germany, 2011. [Google Scholar]
- Mansour, T. Combinatorics of Set Partitions; CRC Press: Boca Raton, FL, USA, 2013. [Google Scholar]
- Callan, D. On ascent, repetition and descent sequences. arXiv 2019, arXiv:1911.02209. [Google Scholar]
- Callan, D.; Mansour, T. Wilf classes for descent sequences avoiding a pattern or a pair of patterns of length three. Filomat 2026, 40, 3081–3095. [Google Scholar]
- Baril, J.-L. Avoiding patterns in irreducible permutations. Discret. Math. Theor. Comput. Sci. 2016, 17, 97–124. [Google Scholar]
- 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] [Scilit]
- Elizalde, S. Generating trees for permutations avoiding generalized patterns. Ann. Comb. 2007, 11, 435–458. [Google Scholar] [CrossRef] [Scilit]
- Ma, S.-M. Counting permutations by numbers of excedances, fixed points and cycles. Bull. Aust. Math. Soc. 2011, 84, 97–105. [Google Scholar]
- Ma, S.-M. Some combinatorial sequences associated with context-free grammars. arXiv 2012, arXiv:1208.3104. [Google Scholar]
- West, J. Generating trees and the Catalan and Schröder numbers. Discret. Math. 1995, 146, 247–262. [Google Scholar] [CrossRef] [Scilit]
- West, J. Generating trees and forbidden subsequences. Discret. Math. 1996, 157, 363–374. [Google Scholar] [CrossRef] [Scilit]
- Banderier, C.; Bousquet-Mélou, M.; Denise, A.; Flajolet, P.; Gardy, D.; GouyouBeauchamps, D. Generating functions for generating trees. Discret. Math. 2002, 246, 29–55. [Google Scholar] [CrossRef] [Scilit]
- Hou, Q.; Mansour, T. Kernel Method and Linear Recurrence System. J. Comput. Appl. Math. 2008, 261, 227–242. [Google Scholar] [CrossRef] [Scilit]
- Sloane, N.J.A. The On-Line Encyclopedia of Integer Sequences. 2020. Available online: http://oeis.org (accessed on 1 May 2026).
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. |
© 2026 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.