posted on 2025-05-08, 16:21authored byMurray Elder, Geoffrey Lee, Andrew Rechnitzer
We prove that the class of permutations generated by passing an ordered sequence 12...n through a stack of depth 2 and an infinite stack in series is in bijection with an unambiguous context-free language, where a permutation of length n is encoded by a string of length 3n. It follows that the sequence counting the number of permutations of each length has an algebraic generating function.