login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A363236
Number of permutations p of [n] such that each element in p has at least one neighbor with opposite parity.
3
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,3
LINKS
Wikipedia, Permutation
FORMULA
a(n) ~ phi^n * n! / (5^(1/4) * 2^(n-1)), where phi = A001622 is the golden ratio. - Vaclav Kotesovec, May 26 2023
EXAMPLE
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
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 22 2023
STATUS
approved