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!)
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) = A000254(n-1) + A159324(n-1). - Gary Detlefs, May 13 2012
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
Table[((1/4)(n-1)!(n-1)(n+2)), {n, 1, 30}] (* Vincenzo Librandi, May 14 2012 *)
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
Cf. A138771.
Column k=2 of A185105.
Sequence in context: A081924 A366176 A368317 * A258789 A367259 A082425
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Apr 10 2008
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 April 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)