The Euler zigzag number counts permutations satisfying . Reversing every inequality gives the same count by replacing each label with . The first values, starting at , are . For the two upward-starting examples are
132 and 231. Their exponential generating function isThis convention fixes the direction of the first inequality; adding both directions for doubles the count.[ref] New to topics? Read the docs here!