login
A359039
Number of Wachs permutations of size n.
2
1, 1, 2, 4, 8, 24, 48, 192, 384, 1920, 3840, 23040, 46080, 322560, 645120, 5160960, 10321920, 92897280, 185794560, 1857945600, 3715891200, 40874803200, 81749606400, 980995276800, 1961990553600, 25505877196800, 51011754393600, 714164561510400, 1428329123020800
OFFSET
0,3
COMMENTS
A Wachs permutation pi is a permutation of [n] such that |pi^{-1}(i) - pi^{-1}(i*)| <= 1, for all 1 <= i <= n-1, where i* is defined as i-1 if i is even, i+1 if i is odd and i+1 <= n, and n otherwise.
LINKS
Francesco Brenti and Paolo Sentinelli, Wachs permutations, Bruhat order and weak order, arXiv:2212.04932 [math.CO], 2022.
FORMULA
If n=2m, then a(n) = m!*2^m, if n=2m+1, then a(n) = (m+1)!*2^m.
a(n) = A081123(n+1)*A016116(n). - Alois P. Heinz, Jan 23 2023
Sum_{n>=0} 1/a(n) = 3*sqrt(e) - 2. - Amiram Eldar, Jan 25 2023
D-finite with recurrence a(n) +2*a(n-1) +(-n-1)*a(n-2) +2*(-n+1)*a(n-3)=0. - R. J. Mathar, Jul 17 2023
EXAMPLE
For n=4, a(n)=8, since we have the 8 Wachs permutations 1234, 1243, 2134, 2143, 3412, 3421, 4312, 4321.
MAPLE
A359039 := proc(n)
local m ;
m := floor(n/2) ;
if type(n, 'even') then
m!*2^m ;
else
(m+1)!*2^m ;
end if;
end proc: # R. J. Mathar, Jul 17 2023
# second Maple program:
a:= n-> ceil(n/2)!*2^floor(n/2):
seq(a(n), n=0..28); # Alois P. Heinz, Dec 21 2023
MATHEMATICA
a[n_]:=If[EvenQ[n], (n/2)! 2^(n/2), ((n + 1)/2)!*2^((n - 1)/2)]
CROSSREFS
Sequence in context: A286866 A334764 A218861 * A078222 A078223 A291405
KEYWORD
nonn
AUTHOR
STATUS
approved