|
|
A138772
|
|
Number of entries in the second cycles of all permutations of {1,2,...,n}; each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.
|
|
8
|
|
|
0, 1, 5, 27, 168, 1200, 9720, 88200, 887040, 9797760, 117936000, 1536796800, 21555072000, 323805081600, 5187108326400, 88268019840000, 1590132031488000, 30233431388160000, 605024315191296000, 12711912992722944000, 279783730940313600000, 6437458713635389440000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (1/4)*(n-1)!*(n-1)*(n+2).
a(n) = (n+1)*a(n-1) + (n-2)!.
a(n) = (n-1)*a(n-1) + n!/2.
a(n) = Sum_{k=0..n-1} k*A138771(n,k).
E.g.f. if offset 0: x*(2-x)/(2*(1-x)^3). Such e.g.f. computations resulted from e-mail exchange with Gary Detlefs. - Wolfdieter Lang, May 27 2010
a(n) = n! * Sum_{i=1..n} (Sum_{j=1..i} (j/i)). - Pedro Caceres, Apr 19 2019
E.g.f.: ( x*(2-x)/(1-x)^2 + 2*log(1-x) )/4. - G. C. Greubel, Jul 07 2019
D-finite with recurrence a(n) +(-n-1)*a(n-1) -2*a(n-2) +2*(n-3)*a(n-3)=0. - R. J. Mathar, Jul 26 2022
|
|
EXAMPLE
|
a(3) = 5 because the number of entries in the second cycles of (1)(2)(3), (1)(23), (132), (12)(3), (123) and (13)(2) is 1+2+0+1+0+1=5.
|
|
MAPLE
|
seq((1/4)*factorial(n-1)*(n-1)*(n+2), n = 1 .. 30);
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) vector(30, n, (n-1)*(n+2)*(n-1)!/4) \\ G. C. Greubel, Jul 07 2019
(Magma) [(n-1)*(n+2)*Factorial(n-1)/4: n in [1..30]]; // G. C. Greubel, Jul 07 2019
(Sage) [(n-1)*(n+2)*factorial(n-1)/4 for n in (1..30)] # G. C. Greubel, Jul 07 2019
(GAP) List([1..30], n-> (n-1)*(n+2)*Factorial(n-1)/4) # G. C. Greubel, Jul 07 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|