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!)
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

Vincenzo Librandi, Table of n, a(n) for n = 1..200

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

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

Adjacent sequences:  A162969 A162970 A162971 * A162973 A162974 A162975

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 12 06:22 EDT 2020. Contains 336438 sequences. (Running on oeis4.)