This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A212291 Number of permutations of n elements with at most one fixed point. 2
 1, 1, 1, 5, 17, 89, 529, 3709, 29665, 266993, 2669921, 29369141, 352429681, 4581585865, 64142202097, 962133031469, 15394128503489, 261700184559329, 4710603322067905, 89501463119290213, 1790029262385804241, 37590614510101889081, 826993519222241559761 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS 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 LINKS Alois P. Heinz, Table of n, a(n) for n = 0..400 Eric Weisstein's World of Mathematics, Crown Graph Eric Weisstein's World of Mathematics, Matching Eric Weisstein's World of Mathematics, Maximal Independent Edge Set FORMULA a(n) = 2/e * n! + O(n). a(n) = 2*!n - (-1)^n, where !n is the subfactorial. - Eric W. Weisstein, Dec 30 2017 a(n) = A000166(n) + A000240(n). E.g.f.: (1+x)*exp(-x)/(1-x). MAPLE b:= proc(n) b(n):= `if` (n<1, 1, n*b(n-1)+(-1)^(n)) end: a:= n-> b(n) +n*b(n-1): seq(a(n), n=0..30);  # Alois P. Heinz, Jun 17 2012 MATHEMATICA nn=20; Range[0, nn]!CoefficientList[Series[(1+x)Exp[-x]/(1-x), {x, 0, nn}], x] (* Geoffrey Critzer, Sep 27 2013 *) Table[(-1)^n (HypergeometricPFQ[{1, -n}, {}, 1] - n HypergeometricPFQ[{1, 1 - n}, {}, 1]), {n, 20}] (* Eric W. Weisstein, Jun 14 2017 *) Table[2 Subfactorial[n] - (-1)^n, {n, 20}] (* Eric W. Weisstein, Dec 30 2017 *) PROG (PARI) d(n)=if(n, round(n!/exp(1)), 1) a(n)=if(n, n*d(n-1))+d(n) CROSSREFS Cf. A000166, A000240. Sequence in context: A026685 A089923 A145041 * A307176 A179684 A250744 Adjacent sequences:  A212288 A212289 A212290 * A212292 A212293 A212294 KEYWORD nonn,easy AUTHOR Charles R Greathouse IV, Jun 17 2012 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 June 16 12:38 EDT 2019. Contains 324152 sequences. (Running on oeis4.)