login
A038154
a(n) = n! * Sum_{k=0..n-2} 1/k!.
8
0, 0, 2, 12, 60, 320, 1950, 13692, 109592, 986400, 9864090, 108505100, 1302061332, 16926797472, 236975164790, 3554627472060, 56874039553200, 966858672404672, 17403456103284402, 330665665962403980, 6613313319248079980, 138879579704209680000
OFFSET
0,3
COMMENTS
The number of rank-orderings of (>=2)-element subsets of an n-set. (Counts nontrivial votes in a rank-ordering voting system.) E.g., a(5) = 320 = 120+120+60+20 because of 5-, 4-, 3- and 2-element subsets. - Warren D. Smith, Jul 06 2005
a(n) is the number of simple cycles through a vertex of the complete graph K_(n+1) on n+1 vertices [Hassani]. For example, in the complete graph K_4 with vertex set {A,B,C,D} there are a(3) = 12 simple cycles at the vertex A, namely the six 3-cycles ABCA, ABDA, ACBA, ACDA, ADBA and ADCA and the six 4-cycles ABCDA, ABDCA, ACBDA, ACDBA, ADBCA and ADCBA. The sum of the lengths of the cycles at a vertex of K_n is equal to A141834(n). - Peter Bala, Jul 09 2008
See A000522 for the number of paths between a pair of distinct vertices of K_n. - Peter Bala, Jul 09 2008
a(n) = n*a(n-1) + A000217(n-1), where A000217(n) is the n-th triangular number. - Gary Detlefs, May 20 2010
FORMULA
a(n) = A007526(n) - n.
a(n) = floor(n!*exp(1))-n-1, n>0. - Vladeta Jovovic, Aug 25 2001
a(n) = n*a(n-1) + n*(n-1), for n>=3, a(2)=2 and a(3) = 12. - Ian Myers, Jul 19 2012
a(n) = A000522(n-2) * n*(n-1). - Doug Bell, Jun 30 2015
E.g.f.: exp(x)*x^2/(1 - x). - Ilya Gutkovskiy, Jan 26 2017
a(n) = 2*A038155(n). - Alois P. Heinz, Jan 26 2017
EXAMPLE
0=1*0+0, 2=2*0+2, 12=3*2+6, 60=4*12+12, 320 = 5*60+20, ... - Gary Detlefs, May 20 2010
MATHEMATICA
Table[n!Sum[1/k!, {k, 0, n-2}], {n, 0, 30}] (* Harvey P. Dale, Jun 04 2012 *)
PROG
(PARI) main(size)=my(k); vector(size, n, (n-1)!*sum(k=0, n-3, 1/k!)); \\ Anders Hellström, Jul 14 2015
CROSSREFS
KEYWORD
nonn
STATUS
approved