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!)
A212291 Number of permutations of n elements with at most one fixed point. 3

%I #34 Jul 16 2023 18:35:18

%S 1,1,1,5,17,89,529,3709,29665,266993,2669921,29369141,352429681,

%T 4581585865,64142202097,962133031469,15394128503489,261700184559329,

%U 4710603322067905,89501463119290213,1790029262385804241,37590614510101889081,826993519222241559761

%N Number of permutations of n elements with at most one fixed point.

%C Agrees with the number of maximal matchings in the n-crown graph up to at least n = 10. - _Eric W. Weisstein_, Jun 14-Dec 30 2017

%H Alois P. Heinz, <a href="/A212291/b212291.txt">Table of n, a(n) for n = 0..400</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CrownGraph.html">Crown Graph</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Matching.html">Matching</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/MaximalIndependentEdgeSet.html">Maximal Independent Edge Set</a>

%F a(n) = 2/e * n! + O(n).

%F a(n) = 2*!n - (-1)^n, where !n is the subfactorial. - _Eric W. Weisstein_, Dec 30 2017

%F a(n) = A000166(n) + A000240(n).

%F E.g.f.: (1+x)*exp(-x)/(1-x).

%F From _Mohammed Bouras_, May 29 2023: (Start)

%F a(n) = n! - A155521(n-1).

%F A155521(n-1)/a(n) = 1/(2+3/(3+4/(4+5/(...(n-1)+n)))). (End)

%p b:= proc(n) b(n):= `if` (n<1, 1, n*b(n-1)+(-1)^(n)) end:

%p a:= n-> b(n) +n*b(n-1):

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Jun 17 2012

%t nn=20; Range[0,nn]! CoefficientList[Series[(1+x)Exp[-x]/(1-x),{x,0,nn}],x] (* _Geoffrey Critzer_, Sep 27 2013 *)

%t Table[(-1)^n (HypergeometricPFQ[{1, -n}, {}, 1] - n HypergeometricPFQ[{1, 1 - n}, {}, 1]), {n, 20}] (* _Eric W. Weisstein_, Jun 14 2017 *)

%t Table[2 Subfactorial[n] - (-1)^n, {n, 20}] (* _Eric W. Weisstein_, Dec 30 2017 *)

%o (PARI) d(n)=if(n,round(n!/exp(1)),1)

%o a(n)=if(n,n*d(n-1))+d(n)

%o (PARI) my(x='x+O('x^25)); Vec(serlaplace((1+x)/(1-x)*exp(-x))) \\ _Joerg Arndt_, Jun 04 2023

%Y Cf. A000166, A000240, A155521.

%K nonn,easy

%O 0,4

%A _Charles R Greathouse IV_, Jun 17 2012

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 23 09:48 EDT 2024. Contains 371905 sequences. (Running on oeis4.)