login
a(n) = n! * Sum_{k=0..n-2} 1/k!.
8

%I #45 Sep 24 2020 16:27:18

%S 0,0,2,12,60,320,1950,13692,109592,986400,9864090,108505100,

%T 1302061332,16926797472,236975164790,3554627472060,56874039553200,

%U 966858672404672,17403456103284402,330665665962403980,6613313319248079980,138879579704209680000

%N a(n) = n! * Sum_{k=0..n-2} 1/k!.

%C 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

%C 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

%C See A000522 for the number of paths between a pair of distinct vertices of K_n. - _Peter Bala_, Jul 09 2008

%C a(n) = n*a(n-1) + A000217(n-1), where A000217(n) is the n-th triangular number. - _Gary Detlefs_, May 20 2010

%H Mehdi Hassani, <a href="https://arxiv.org/abs/math/0606613">Counting and computing by e</a>, arXiv:math/0606613 [math.CO], 2006.

%H J. Sawada and A. Williams, <a href="http://www.cis.uoguelph.ca/~sawada/papers/pancake_successor.pdf">Successor rules for flipping pancakes and burnt pancakes, Preprint 2015.

%H <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>

%F a(n) = A007526(n) - n.

%F a(n) = floor(n!*exp(1))-n-1, n>0. - _Vladeta Jovovic_, Aug 25 2001

%F a(n) = n*a(n-1) + n*(n-1), for n>=3, a(2)=2 and a(3) = 12. - _Ian Myers_, Jul 19 2012

%F a(n) = A000522(n-2) * n*(n-1). - _Doug Bell_, Jun 30 2015

%F E.g.f.: exp(x)*x^2/(1 - x). - _Ilya Gutkovskiy_, Jan 26 2017

%F a(n) = 2*A038155(n). - _Alois P. Heinz_, Jan 26 2017

%e 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

%t Table[n!Sum[1/k!,{k,0,n-2}],{n,0,30}] (* _Harvey P. Dale_, Jun 04 2012 *)

%o (PARI) main(size)=my(k); vector(size,n,(n-1)!*sum(k=0,n-3,1/k!)); \\ _Anders Hellström_, Jul 14 2015

%Y Cf. A000522, A038155, A141834.

%K nonn

%O 0,3

%A _N. J. A. Sloane_