In Exercise E, we mentioned permutations avoid 123 and Exercise D is about permutations avoid 123 consecutively. It would be fun if we involve these two notions in one problem.
Suppose `\pi` are `\tau` are two permutations, here we'd like to ask how many permutations of length `n` avoid `\pi` and also avoid `\tau` consecutively.
`a(n)` is the number of permutations of length `n` that avoid `123` and meanwhile avoid `321` consecutively.
Find `a(n)`.