A119913 Number of directed simple cycles in the complete graph K_n.
0, 0, 2, 14, 74, 394, 2344, 16036, 125628, 1112028, 10976118, 119481218, 1421542550, 18348340022, 255323504812, 3809950976872, 60683990530072, 1027542662934744, 18430998766219146, 349096664728623126, 6962409983976703106, 145841989688186383106
Offset: 1
Keywords
Examples
a(4)=14 because there are 6 4-cycles and 8 3-cycles.
Links
- Eric Weisstein's World of Mathematics, Barbell Graph
- Eric Weisstein's World of Mathematics, Complete Graph
- Eric Weisstein's World of Mathematics, Graph Cycle
Programs
-
MATLAB
function a = an(n) s = 0; for i = 2:n-1 s = s+fix(exp(1)*factorial(i)); end a = s - (n+3)*(n-2)/2;
-
Mathematica
Table[n (2 HypergeometricPFQ[{1, 1, 1 - n}, {2}, -1] - n - 1)/2, {n, 20}] (* Eric W. Weisstein, Dec 14 2017 *)
Formula
a(n) = Sum_{k=3..n} C(n,k) * (k-1)!.
a(n) = Sum_{i=2..n-1} (floor(e*i!)) - (n+3)(n-2)/2.
a(n) = Sum_{k=1..n-1} A038154(k).
a(n) = 2*A002807(n). - Vladeta Jovovic, Aug 04 2006
Extensions
More terms from Max Alekseyev, Jan 18 2012
Comments