A052518 Number of pairs of cycles of cardinality at least 2.
0, 0, 0, 0, 6, 40, 260, 1848, 14616, 128448, 1246752, 13273920, 153996480, 1935048960, 26193473280, 380120670720, 5888620684800, 97007636275200, 1693590745190400, 31237853849395200, 607035345406156800
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..445
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 84
Programs
-
Magma
m:=25; R
:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Log(1-x)^2 + 2*x*Log(1-x) + x^2 )); [0,0,0,0] cat [Factorial(n+3)*b[n]: n in [1..m-4]]; // G. C. Greubel, May 13 2019 -
Maple
Pairs spec := [S,{B=Cycle(Z,2 <= card),S=Prod(B,B)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
-
Mathematica
With[{m = 25}, CoefficientList[Series[Log[1-x]^2 +2*x*Log[1-x] +x^2, {x, 0, m}], x]*Range[0, m]!] (* G. C. Greubel, May 13 2019 *)
-
PARI
a(n) = if (n <= 2, 0, round(2*(n-2)!*((n-1)*(psi(n)+Euler)-n))); \\ Michel Marcus, Jul 08 2015
-
PARI
my(x='x+O('x^25)); concat(vector(4), Vec(serlaplace( log(1-x)^2 + 2*x*log(1-x) + x^2 ))) \\ G. C. Greubel, May 13 2019
-
Sage
m = 25; T = taylor(log(1-x)^2 + 2*x*log(1-x) + x^2, x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, May 13 2019
Formula
E.g.f.: log(1-x)^2 + 2*x*log(1-x) + x^2.
n*a(n+2) + (1-n-2*n^2)*a(n+1) - n*(1-n^2)*a(n) = 0, with a(0) = ... = a(3) = 0, a(4) = 3!.
a(n) = 2*(n-2)!*((n-1)*(Psi(n) + gamma) - n), n>2. - Vladeta Jovovic, Sep 21 2003