

A152661


Number of permutations of [n] for which the first two entries have the same parity (n>=2).


1



0, 2, 8, 48, 288, 2160, 17280, 161280, 1612800, 18144000, 217728000, 2874009600, 40236134400, 610248038400, 9763968614400, 167382319104000, 3012881743872000, 57621363351552000, 1152427267031040000, 24329020081766400000, 535238441798860800000
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,2


COMMENTS

a(n) is also the number of 3term 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 midterms of the arithmetic progressions are marked). [Emeric Deutsch, Aug 31 2009]


LINKS

Table of n, a(n) for n=2..22.
S. Tanimoto, Combinatorial study on the group of parity alternating permutations, arXiv:0812.1839 [math.CO], 20082017.


FORMULA

a(n) = A152660(n,1).
a(2n) = 2*(n!)^2*binomial(2*n2,n);
a(2n+1) = n!*(n+1)!*binomial(2n,n1).
Conjecture: (n+3)*a(n) +2*(n2)*a(n1) +(n1)*(n2)*(n3)*a(n2)=0.  R. J. Mathar, Apr 20 2015
Conjecture: a(n) = 2*A077613(n1).  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(n2, (1/2)*n) else factorial((1/2)*n1/2)*factorial((1/2)*n+1/2)*binomial(n1, (1/2)*n3/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}] (* JeanFrançois Alcover, Nov 28 2017 *)


CROSSREFS

Cf. A152660.
Sequence in context: A009693 A192251 A104190 * A177066 A228568 A007170
Adjacent sequences: A152658 A152659 A152660 * A152662 A152663 A152664


KEYWORD

nonn


AUTHOR

Emeric Deutsch, Dec 12 2008


STATUS

approved



