The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A335873 Total number of points in all permutations of [n] that are fixed or reflected. 2
 0, 1, 4, 10, 48, 216, 1440, 9360, 80640, 685440, 7257600, 76204800, 958003200, 11975040000, 174356582400, 2528170444800, 41845579776000, 690452066304000, 12804747411456000, 236887827111936000, 4865804016353280000, 99748982335242240000, 2248001455555215360000 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS A permutation p of [n] has fixed point j if p(j) = j, it has reflected point j if p(n+1-j) = j.  A point can be fixed and reflected at the same time. LINKS Alois P. Heinz, Table of n, a(n) for n = 0..450 T. Simpson, Permutations with unique fixed and reflected points, Preprint. (Annotated scanned copy) Wikipedia, Permutation FORMULA E.g.f.: 2*x/(1-x) - (log(1+x) - log(1-x))/2. a(0) = 0, a(n) = 2*n! - (n mod 2)*(n-1)! for n > 0. a(n) = (n-1)*(4*a(n-1)+(n-2)*(4*n-3)*a(n-2))/(4*n-7) for n >= 2, a(n) = n for n < 2. a(n) = Sum_{k=1..n} k * A335872(n,k). EXAMPLE a(3) = 10: (1)(2)(3), (1)32, 21(3), 23(1), (3)12, (3)(2)(1). MAPLE b:= proc(s, i) option remember; (n-> `if`(n=0, [1, 0],       add((p-> p+[0, `if`(j in {i, n}, p[1], 0)])(         b(s minus {j}, i+1)), j=s)))(nops(s))     end: a:= n-> b({\$1..n}, 1)[2]: seq(a(n), n=0..14); # second Maple program: a:= n-> `if`(n=0, 0, 2*n! -`if`(n::odd, (n-1)!, 0)): seq(a(n), n=0..22); # third Maple program: a:= proc(n) option remember; `if`(n<2, n, (n-1)*       (4*a(n-1)+(n-2)*(4*n-3)*a(n-2))/(4*n-7))     end: seq(a(n), n=0..22); CROSSREFS Bisection (even part) gives 2 * A010050(n) for n>0. Cf. A000142, A005359, A306258, A335872. Sequence in context: A197664 A099606 A149231 * A173086 A081565 A151611 Adjacent sequences:  A335870 A335871 A335872 * A335874 A335875 A335876 KEYWORD nonn,easy AUTHOR Alois P. Heinz, Jun 28 2020 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.

Last modified May 17 09:03 EDT 2021. Contains 343969 sequences. (Running on oeis4.)