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!)
A162972 Number of cycles in all non-derangement permutations of {1,2,...,n}. 3
1, 2, 9, 38, 210, 1339, 9870, 82368, 768432, 7926903, 89610070, 1101767732, 14639237184, 209048293375, 3192959638778, 51943905125760, 896723236236864, 16373101528868943, 315259605244694574, 6384318171252621716, 135651088007338895680, 3017472066675257000775 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) = Sum(k*A162971(n,k), k=1..n).
LINKS
FORMULA
E.g.f.: (z*exp(-z) + (exp(-z)-1)*log(1-z)) / (1-z).
a(n) ~ n! * ((1-exp(-1))*(log(n) + gamma) + exp(-1)), where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Oct 02 2013
Conjecture D-finite with recurrence a(n) +(-3*n+8)*a(n-1) +(n-3)*(3*n-14)*a(n-2) +(-n^3+19*n^2-98*n+156)*a(n-3) +(-4*n^3+56*n^2-258*n+395)*a(n-4) +(-6*n^3+84*n^2-395*n+624)*a(n-5) -(n-5)*(4*n^2-41*n+106)*a(n-6) -(n-5)*(n-6)^2*a(n-7)=0. - R. J. Mathar, Jul 26 2022
EXAMPLE
a(3) = 9 because in the 4 non-derangement permutations of {1,2,3,4}, namely (1)(2)(3), (1)(23), (12)(3), (13)(2), we have a total of 3 + 2 + 2 + 2 = 9 cycles.
MAPLE
g := (z*exp(-z)+(exp(-z)-1)*ln(1-z))/(1-z): gser := series(g, z = 0, 25): seq(factorial(n)*coeff(gser, z, n), n = 1 .. 22);
MATHEMATICA
Rest[CoefficientList[Series[(x*Exp[-x]+(Exp[-x]-1)*Log[1-x])/(1-x), {x, 0, 20}], x]* Range[0, 20]!] (* Vaclav Kotesovec, Oct 02 2013 *)
CROSSREFS
Cf. A162971.
Sequence in context: A151008 A057647 A249925 * A202832 A069724 A132961
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Jul 22 2009
EXTENSIONS
a(21)-a(22) from Vincenzo Librandi, Oct 04 2013
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 March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)