Counting up-up-or-down-down permutations
arXiv:2411.16113
Abstract
Answering a question of Donald Knuth, we find the bivariate exponential generating function for "up-up-or-down-down'' permutations of odd length according to their last entry. An up-up-or-down-down permutation is a permutation satisfying if and only if for . Equivalently, an up-up-or-down-down permutation is one in which every peak and every valley is odd.