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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A161131 Number of permutations of {1,2,...,n} that have no odd fixed points. 5
1, 0, 1, 3, 14, 64, 426, 2790, 24024, 205056, 2170680, 22852200, 287250480, 3597143040, 52370755920, 760381337520, 12585067447680, 207863095910400, 3854801333416320, 71370457471716480, 1465957162768492800 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

Table of n, a(n) for n=0..20.

FORMULA

a(n) = Sum_{j=0..floor(n/2)} d(n-j)*binomial(floor(n/2), j), where d(i)=A000166(i) are the derangement numbers.

a(n) = Sum_{j=0..ceiling(n/2)} (-1)^j*binomial(ceiling(n/2), j)*(n-j)!. - Emeric Deutsch, Jul 18 2009

a(n) ~ exp(-1/2) * n!. - Vaclav Kotesovec, Feb 18 2017

EXAMPLE

a(3)=3 because we have 312, 231, and 321.

MAPLE

d[0] := 1: for n to 25 do d[n] := n*d[n-1]+(-1)^n end do: a := proc (n) options operator, arrow: add(d[n-j]*binomial(floor((1/2)*n), j), j = 0 .. floor((1/2)*n)) end proc; seq(a(n), n = 0 .. 22);

a := proc (n) options operator, arrow: add((-1)^j*binomial(ceil((1/2)*n), j)*factorial(n-j), j = 0 .. ceil((1/2)*n)) end proc; seq(a(n), n = 0 .. 22); # Emeric Deutsch, Jul 18 2009

MATHEMATICA

Table[Sum[(-1)^j*Binomial[Ceiling[n/2], j]*(n-j)!, {j, 0, Ceiling[n/2]}], {n, 0, 30}] (* Vaclav Kotesovec, Feb 18 2017 *)

PROG

(PARI) for(n=0, 30, print1(sum(j=0, ceil(n/2), (-1)^j*binomial(ceil(n/2), j)*(n - j)!), ", ")) \\ Indranil Ghosh, Mar 08 2017

CROSSREFS

Cf. A000166, A161132.

Sequence in context: A292744 A151239 A151240 * A247978 A026592 A034275

Adjacent sequences:  A161128 A161129 A161130 * A161132 A161133 A161134

KEYWORD

nonn

AUTHOR

Emeric Deutsch, Jul 18 2009

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 July 9 04:03 EDT 2020. Contains 335538 sequences. (Running on oeis4.)