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!)
A052517 Number of ordered pairs of cycles over all n-permutations having two cycles. 20

%I #54 Sep 08 2022 08:44:59

%S 0,0,2,6,22,100,548,3528,26136,219168,2053152,21257280,241087680,

%T 2972885760,39605518080,566931294720,8678326003200,141468564787200,

%U 2446811181158400,44753976117043200,863130293635276800

%N Number of ordered pairs of cycles over all n-permutations having two cycles.

%C a(n) is a function of the harmonic numbers. If we discard the first term and set a(0)=0, a(1)=2..then a(n) = 2n!*h(n) where h(n) = Sum_{k=1..n} 1/k. - _Gary Detlefs_, Aug 04 2010

%C a(n+1) is twice the sum over all permutations of the number of its cycles (fixed points included). - _Olivier Gérard_, Oct 23 2012

%C In a game where n differently numbered cards are drawn in a random sequence, and a point is earned every time the newest card is either the highest or the lowest yet drawn (the first card gets two points as it is both the highest and the lowest), the expected number of points earned is a(n+1)/n!, for instance if n=3, there are two ways of getting 3 points and four ways of getting 4 points, giving an average of 22/6 = 3 2/3. - _Elliott Line_, Mar 19 2020

%D G. Boole, A Treatise On The Calculus of Finite Differences, Dover, 1960, p. 30.

%H Vincenzo Librandi, <a href="/A052517/b052517.txt">Table of n, a(n) for n = 0..200</a>

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=83">Encyclopedia of Combinatorial Structures 83</a>

%F E.g.f.: (log(1 - x))^2. - _Michael Somos_, Feb 05 2004

%F a(n) ~ 2*(n-1)!*log(n)*(1+gamma/log(n)), where gamma is Euler-Mascheroni constant (A001620). - _Vaclav Kotesovec_, Oct 08 2012

%F a(n) = Sum_{k=1..n-1} 2*k*|S1(n-1,k)| = 2*|S1(n,2)|. - _Olivier Gérard_, Oct 23 2012

%F 0 = a(n) * n^2 - a(n+1) * (2*n+1) + a(n+2) for all n in Z. - _Michael Somos_, Apr 23 2014

%F 0 = a(n)*(a(n+1) - 7*a(n+2) + 6*a(n+3) - a(n+4)) + a(n+1)*(a(n+1) - 6*a(n+2) + 4*a(n+3)) + a(n+2)*(-3*a(n+2)) if n>0. - _Michael Somos_, Apr 23 2014

%F For n>=2, a(n) = (n-2)! * Sum_{i=1..n-1} Sum_{j=1..n-1} (i+j)/(i*j). - _Pedro Caceres_, Feb 14 2021

%e a(3)=6 because we have the ordered pairs of cycles: ((1)(23)), ((23)(1)), ((2)(13)), ((13)(2)), ((3)(12)), ((12)(3)). - _Geoffrey Critzer_, Jun 13 2013

%e G.f. = 2*x^2 + 6*x^3 + 22*x^4 + 100*x^5 + 548*x^6 + 3528*x^7 + ...

%p pairsspec := [S,{S=Prod(B,B),B=Cycle(Z)},labeled]: seq(combstruct[count](pairsspec,size=n), n=0..20); # Typos fixed by _Johannes W. Meijer_, Oct 16 2009

%t Flatten[{0,Table[(n+1)!*Sum[1/(k*(n+1-k)),{k,1,n}],{n,0,20}]}] (* _Vaclav Kotesovec_, Oct 08 2012 *)

%t With[{m = 25}, CoefficientList[Series[Log[1-x]^2, {x,0,m}], x]*Range[0, m]!] (* _G. C. Greubel_, May 13 2019 *)

%o (PARI) {a(n) = if( n<0, 0, n! * sum(k=1, n-1, 1 / (k * (n - k))))};

%o (Magma) m:=25; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Log(1-x)^2 )); [0,0] cat [Factorial(n+1)*b[n]: n in [1..m-2]]; // _G. C. Greubel_, May 13 2019

%o (Sage) m = 25; T = taylor(log(1-x)^2, x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # _G. C. Greubel_, May 13 2019

%Y Equals 2 * A000254(n+1), n>0.

%Y Equals, for n=>2, the second right hand column of A028421.

%Y Cf. A302827, A304589.

%K easy,nonn

%O 0,3

%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000

%E Name improved by _Geoffrey Critzer_, Jun 13 2013

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 18 15:48 EDT 2024. Contains 371780 sequences. (Running on oeis4.)