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.

A363236 Number of permutations p of [n] such that each element in p has at least one neighbor with opposite parity.

Original entry on oeis.org

1, 0, 2, 2, 16, 36, 288, 1152, 10368, 57600, 604800, 4320000, 51840000, 453600000, 6147187200, 63605606400, 962415820800, 11500218777600, 192255565824000, 2605984690176000, 47721518530560000, 723526168780800000, 14407079038894080000, 241602987041095680000
Offset: 0

Views

Author

Alois P. Heinz, May 22 2023

Keywords

Examples

			a(0) = 1: (), the empty permutation.
a(1) = 0.
a(2) = 2: 12, 21.
a(3) = 2: 123, 321.
a(4) = 16: 1234, 1243, 1423, 1432, 2134, 2143, 2314, 2341, 3214, 3241, 3412, 3421, 4123, 4132, 4312, 4321.
a(5) = 36: 12345, 12354, 12534, 12543, 14325, 14352, 14523, 14532, 21345, 21543, 23145, 23541, 25143, 25341, 32145, 32154, 32514, 32541, 34125, 34152, 34512, 34521, 41325, 41523, 43125, 43521, 45123, 45321, 52134, 52143, 52314, 52341, 54123, 54132, 54312, 54321.
		

Crossrefs

Formula

a(n) ~ phi^n * n! / (5^(1/4) * 2^(n-1)), where phi = A001622 is the golden ratio. - Vaclav Kotesovec, May 26 2023