login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A152660 Triangle read by rows: T(n,k) is the number of permutations of [n] for which k is the maximal number of initial entries whose parities alternate (1 <= k <= n). 1
1, 0, 2, 2, 2, 2, 8, 8, 0, 8, 48, 36, 12, 12, 12, 288, 216, 72, 72, 0, 72, 2160, 1440, 576, 432, 144, 144, 144, 17280, 11520, 4608, 3456, 1152, 1152, 0, 1152, 161280, 100800, 43200, 28800, 11520, 8640, 2880, 2880, 2880, 1612800, 1008000, 432000, 288000, 115200, 86400, 28800, 28800, 0, 28800 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Sum of entries in row n is n! (=A000142(n)).

T(n,n) = A092186(n) (the parity alternating permutations; see the Tanimoto reference).

T(n,1) = A152661(n).

LINKS

Table of n, a(n) for n=1..55.

S. Tanimoto, Combinatorial study on the group of parity alternating permutations, arXiv:0812.1839 [math.CO], 2008-2017.

FORMULA

T(2n,k) = 2(n!)^2*binomial(2n-k-1, n-floor(k/2));

T(2n+1,2k) = n!(n+1)!*binomial(2n-2k+1, n-k);

T(2n+1,2k+1) = n!(n+1)!*binomial(2n-2k, n-k-1) if k < n;

T(2n+1,2n+1) = n!(n+1)!.

EXAMPLE

T(4,2)=8 because we have 1243, 1423, 2134, 2314, 3241, 3421, 4132 and 4312.

Triangle starts:

    1;

    0,   2;

    2,   2,   2;

    8,   8,   0,   8;

   48,  36,  12,  12,  12;

  288, 216,  72,  72,   0,  72;

MAPLE

T := proc (n, k) if n < k then 0 elif `mod`(n, 2) = 0 and `mod`(k, 2) = 0 then 2*factorial((1/2)*n)^2*binomial(n-k-1, (1/2)*n-(1/2)*k) elif `mod`(n, 2) = 0 and `mod`(k, 2) = 1 then 2*factorial((1/2)*n)^2*binomial(n-k-1, (1/2)*n-(1/2)*k+1/2) elif `mod`(n, 2) = 1 and `mod`(k, 2) = 0 then factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial(n-k, (1/2)*n-(1/2)*k-1/2) elif `mod`(n, 2) = 1 and k = n then factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2) else factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial(n-k, (1/2)*n-(1/2)*k-1) end if end proc: for n to 10 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form

MATHEMATICA

T[n0_?EvenQ, k_] := With[{n = n0/2}, 2 (n!)^2*Binomial[2 n - k - 1, n - Floor[k/2]]];

T[n1_?OddQ, k0_?EvenQ] := With[{n = (n1 - 1)/2, k = k0/2}, n! (n + 1)! * Binomial[2 n - 2 k + 1, n - k] ];

T[n1_?OddQ, k1_?OddQ] := With[{n = (n1 - 1)/2, k = (k1 - 1)/2}, n! (n+1)! * Binomial[2 n - 2 k, n - k - 1] ];

T[n1_?OddQ, n1_?OddQ] := With[{n = (n1 - 1)/2}, n! (n + 1)!];

Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-Fran├žois Alcover, Nov 28 2017 *)

CROSSREFS

Cf. A000142, A092186, A152661.

Sequence in context: A058788 A013598 A100943 * A058787 A085056 A265447

Adjacent sequences:  A152657 A152658 A152659 * A152661 A152662 A152663

KEYWORD

nonn,tabl

AUTHOR

Emeric Deutsch, Dec 12 2008

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 14 04:56 EST 2019. Contains 329110 sequences. (Running on oeis4.)