OFFSET
2,2
COMMENTS
a(n) is also the number of 3-term arithmetic progressions of consecutive entries in all permutations of {1,2,...,n}. Example: a(4)=8 because we have 12'3'4, 412'3, 143'2, 23'41, 32'14, 43'2'1 (the mid-terms of the arithmetic progressions are marked). [Emeric Deutsch, Aug 31 2009]
LINKS
S. Tanimoto, Combinatorial study on the group of parity alternating permutations, arXiv:0812.1839 [math.CO], 2008-2017.
FORMULA
a(n) = A152660(n,1).
a(2n) = 2*(n!)^2*binomial(2*n-2,n);
a(2n+1) = n!*(n+1)!*binomial(2n,n-1).
Conjecture: (-n+3)*a(n) +2*(n-2)*a(n-1) +(n-1)*(n-2)*(n-3)*a(n-2)=0. - R. J. Mathar, Apr 20 2015
Conjecture: a(n) = 2*A077613(n-1). - R. J. Mathar, Apr 20 2015
EXAMPLE
a(4)=8 because we have 1324, 1342, 3124, 3142, 2413, 2431, 4213 and 4231.
MAPLE
a := proc (n) if `mod`(n, 2) = 0 then 2*factorial((1/2)*n)^2*binomial(n-2, (1/2)*n) else factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial(n-1, (1/2)*n-3/2) end if end proc: seq(a(n), n = 2 .. 22);
MATHEMATICA
a[n0_?EvenQ] := With[{n = n0/2}, 2 (n!)^2*Binomial[2*n - 2, n]];
a[n1_?OddQ] := With[{n = (n1 - 1)/2}, n! (n + 1)! Binomial[2 n, n - 1]];
Table[a[n], {n, 2, 22}] (* Jean-François Alcover, Nov 28 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Dec 12 2008
STATUS
approved