321-avoiding and parity-alternating permutations
Statement
It is classical that 321-avoiding permutations are enumerated by the Catalan numbers.
A permutation is parity-alternating if it sends even integers to even integers, and odd integers to odd. I am interested in the number of 321-avoiding parity-alternating permutations. (123-avoidance is also of interest). The four other patterns of length 3 are easy to enumerate.
Example: The sequence for 321-avoiding permutations of size is and this is not in the OEIS at the moment A354208. For example, , and are the two parity-alternating permutations of size 4 which also avoids 321.
These numbers are generated by first computing all 321-avoiding permutations (via a Catalan recursion) and then selecting the parity-alternating ones. We do not have an efficient formula for generating the numbers above.
Question: Can one find some more efficient way of generating the above sequence? A generating function, or a recursion?
Note: For odd , there is a bijection between 123 and 321-avoiding, parity-alternating permutations, by taking the reverse
Posed by Per Alexandersson · co.combinatorics, permutations, enumerative-combinatorics, pattern-avoidance
This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-424040.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.
Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.
Step 1: state it in Lean. The file your agent writes: statements/mo-424040.lean
import Mathlib /-! # 321-avoiding and parity-alternating permutations Source: https://mathoverflow.net/questions/424040 Credit: @<your GitHub handle> State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification. Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging. -/ namespace OMA.S_mo_424040 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_mo_424040