# Enumeration of Words that Contain the Pattern $$\varvec{123}$$ Exactly Once

• Mingjia Yang
Article

## Abstract

Enumeration problems related to words avoiding patterns as well as permutations that contain the pattern 123 exactly once have been studied in great detail. However, the problem of enumerating words that contain the pattern 123 exactly once is new and will be the focus of this paper. Previously, Zeilberger provided a shortened version of Burstein’s combinatorial proof of Noonan’s theorem which states that the number of permutations with exactly one 321 pattern is equal to $$\frac{3}{n} \left( {\begin{array}{c}2n\\ n+3\end{array}}\right)$$. Surprisingly, a similar method can be directly adapted to words. We are able to use this method to find a formula enumerating the words with exactly one 123 pattern. Further inspired by Shar and Zeilberger’s work on generating functions enumerating 123-avoiding words with r occurrences of each letter, we examine the algebraic equations for generating functions for words with r occurrences of each letter and with exactly one 123 pattern.

## Keywords

Generating functions Pattern in words Enumeration

05A05 05A15

## Notes

### Acknowledgements

The author thanks Doron Zeilberger for bringing this project to her attention and continued conversation. The author also would like to thank Matthew Russell for offering suggestions that improved the exposition of this paper, Andrew Lohr and Alejandro Ginory for proofreading the draft, and Manuel Kauers for his help in finding the asymptotics.

## References

1. 1.
Bóna, M.: Permutations with one or two 132-subsequences. Discrete Math. 181(1–3), 267–274 (1998)
2. 2.
Burstein, A.: A short proof for the number of permutations containing pattern 321 exactly once. Electron. J. Combin. 18(2), #P21 (2011)
3. 3.
Chapuy, G.: The asymptotic number of $$12..d$$-avoiding words with $$r$$ occurrences of each letter $$1,2,\ldots ,n$$. arXiv:1412.6070 (2014)
4. 4.
Kauers, M., Paule, P.: The Concrete Tetrahedron. Symbolic Sums, Recurrence Equations, Generating Functions, Asymptotic Estimates. Section 6.5. Texts and Monographs in Symbolic Computation. Springer, Vienna (2011)Google Scholar
5. 5.
Noonan, J.: The number of permutations containing exactly one increasing subsequence of length three. Discrete Math. 152(1-3), 307–313 (1996)
6. 6.
Shar, N., Zeilberger, D.: The (ordinary) generating functions enumerating $$123$$-avoiding words with $$r$$ occurrences of each of $$1,2,\ldots , n$$ are always algebraic. Ann. Comb. 20(2), 387–396 (2016)
7. 7.
Zeilberger, D.: A Snappy proof that 123-avoiding words are equinumerous with 132-avoiding words. Personal Journal of Shalosh B. Ekhad and Doron Zeilberger, April 11, 2005. http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/a123.html
8. 8.
Zeilberger, D.: Alexander Burstein’s lovely combinatorial proof of John Noonan’s beautiful theorem that the number of $$n$$-permutations that contain the pattern $$321$$ exactly once equals $$(3/n)(2n!)/((n-3)!(n+3)!)$$. Personal Journal of Shalosh B. Ekhad and Doron Zeilberger, Oct. 18, 2011. http://sites.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/burstein.html