OFFSET
0,5
COMMENTS
A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0<i<n. The sequence counts the number a(n) of king permutations of length n that avoid the mesh pattern 12 with squares (0,1), (0,2), (1,0), (1,1), (2,0), and (2,2) shaded.
LINKS
Dan Li and Philip B. Zhang, Distributions of mesh patterns of short lengths on king permutations, arXiv:2411.18131 [math.CO], 2024. See Theorem 4.3 at page 16.
FORMULA
G.f.: (t + 1/(1 + t) - t^2*A(t)^2/((1 + t)*(1 + t + t*A(t))))*A(t) where A(t) = Sum_{n >= 0} n!*t^n*(1-t)^n/(1+t)^n is the g.f. for king permutations given by A002464.
EXAMPLE
For n = 4 the a(4) = 2 solutions are the two permutations 2413 and 3142.
For n = 5 the a(5) = 14 solutions are these 14 permutations: 13524, 14253, 24135, 24153, 25314, 31425, 31524, 35142, 35241, 41352, 42513, 42531, 52413, 53142.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Dan Li, Apr 22 2025
STATUS
approved
