login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
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);
MATHEMATICA
a[n_] := If[n == 0, 0, 2 n! - If[OddQ[n], (n-1)!, 0]];
Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Aug 24 2021, from 2nd Maple program *)
CROSSREFS
Bisection (even part) gives 2 * A010050(n) for n>0.
Sequence in context: A197664 A099606 A149231 * A364281 A173086 A081565
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)