A037224 Number of permutations p of {1,2,3...,n} that are fixed points under the operation of first reversing p, then taking the inverse.
1, 0, 0, 2, 2, 0, 0, 12, 12, 0, 0, 120, 120, 0, 0, 1680, 1680, 0, 0, 30240, 30240, 0, 0, 665280, 665280, 0, 0, 17297280, 17297280, 0, 0, 518918400, 518918400, 0, 0, 17643225600, 17643225600, 0, 0, 670442572800, 670442572800, 0, 0, 28158588057600
Offset: 1
Examples
Let p be the permutation {11,1,9,3,7,5,8,6,10,4,12,2} of {1,2,3,..,12}. Then the reverse Rp of p is {2,12,4,10,6,8,5,7,3,9,1,11} and the inverse IRp of Rp is {11,1,9,3,7,5,8,6,10,4,12,2}. Thus p counts as one of the a(12)=120 fixed-points for n=12.
Links
- C. Bebeacua, T. Mansour, A. Postnikov and S. Severini, On the X-rays of permutations, arXiv:math/0506334 [math.CO], 2005.
- M. Szabo, Non-attacking Queens Problem Page
Programs
-
Maple
a:= n-> `if`(irem(n, 4, 'm')>1, 0, `if`(m=0, 1, (2*m-1)! * 2/(m-1)!)): seq(a(n), n=1..99); # Alois P. Heinz, Jan 21 2011
-
Mathematica
{1}~Join~Table[If[MemberQ[{0, 1}, Mod[n, 4]], (2 # - 1)!*2/(# - 1)! &[Floor[n/4]], 0], {n, 2, 44}] (* Michael De Vlieger, Oct 05 2016 *)
-
PARI
a(n)= { if ( n%4>=2, return(0) ); n = n\4; if ( n==0, return(1) ); return( (2*n-1)!*2/(n-1)! ); } vector(55,n,a(n)) /* Joerg Arndt, Jan 21 2011 */
Formula
a(4n) = a(4n+1) = (2n-1)!*2/(n-1)!, a(4n+2) = a(4n+3) = 0.
Extensions
Edited by N. J. A. Sloane, Jun 12 2009, incorporating comments from John W. Layman, Sep 17 2004
Comments