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.

A332345 a(n) is the number of totally alternating permutations of 1,2,...,n.

Original entry on oeis.org

1, 1, 2, 4, 6, 12, 28, 76, 240, 852, 3392, 14868, 71392, 371740, 2089184, 12589980, 81037792, 554555300, 4021728992, 30800978980, 248464000480, 2105271605804, 18696216008416, 173630895701996, 1683187452989920, 17000599430003444, 178625854452674272
Offset: 0

Views

Author

David Bevan, Feb 10 2020

Keywords

Comments

A permutation w of 1,...,n is totally alternating if both w and w^{-1} are either alternating or reverse alternating.
Totally alternating permutations are those that avoid the consecutive patterns 123 and 321 and also the consecutive covincular patterns 123 and 321.
If a permutation is totally alternating, then so are its other 7 symmetries.

Examples

			The six totally alternating permutations of 1,...,4 are 1324, 2143, 2413, 3142, 3412 and 4231.
		

Crossrefs

For n > 1, a(n) = 2*(A007999(n) + A332344(n)).
For odd n > 1, a(n) = 4*A007999(n).
For even n > 1, a(n) = 4*A007999(n) - 2*A007999(n-2).