cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A383312 Number of king permutations on n elements avoiding the mesh pattern (12, {(0,1),(0,2),(1,0),(1,1),(2,0),(2,2)}).

Original entry on oeis.org

1, 1, 0, 0, 2, 14, 86, 624, 5096, 46554, 470446, 5214936, 62943852, 821949042, 11548027442, 173711893048, 2785807179384, 47448884653218, 855436571437710, 16275060021803232, 325872090863707740, 6850004083354211050, 150827444158572339810, 3471582648001267649808, 83371646323922972242776
Offset: 0

Views

Author

Dan Li, Apr 22 2025

Keywords

Comments

A permutation p(1)p(2)...p(n) is a king permutation if |p(i+1)-p(i)|>1 for each 0

Examples

			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.
		

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.