OFFSET
1,3
COMMENTS
That is, the number of subsets of at least 3 elements out of n, ordered up to cyclic permutations.
For n > 2, also the number of undirected cycles in the n-barbell graph. - Eric W. Weisstein, Dec 14 2017
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
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
EXAMPLE
a(4)=14 because there are 6 4-cycles and 8 3-cycles.
MATHEMATICA
Table[n (2 HypergeometricPFQ[{1, 1, 1 - n}, {2}, -1] - n - 1)/2, {n, 20}] (* Eric W. Weisstein, Dec 14 2017 *)
PROG
(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;
CROSSREFS
KEYWORD
nonn
AUTHOR
Amir M. Ben-Amram (amirben(AT)mta.ac.il), Aug 02 2006
EXTENSIONS
More terms from Max Alekseyev, Jan 18 2012
STATUS
approved