Search: id:A001540 Results 1-1 of 1 results found. %I A001540 M1856 N0734 %S A001540 0,2,8,36,184,1110,7776,62216,559952,5599530,61594840,739138092, %T A001540 9608795208,134523132926,2017846993904,32285551902480,548854382342176, %U A001540 9879378882159186,187708198761024552,3754163975220491060 %N A001540 Number of transpositions needed to generate permutations of length n. %D A001540 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %D A001540 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A001540 R. J. Ord-Smith, Generation of permutation sequences: Part 1, Computer J., 13 (1970), 151-155. %H A001540 T. D. Noe, Table of n, a(n) for n=1..100 %F A001540 E.g.f.: cosh(x)/(1-x) - exp(x). %F A001540 Recurrence: a(n) = n*a(n-1) + n - (n mod 2). %F A001540 a(n) = -1 + n!*sum{k=0, [n/2], 1/(2k)!} = -1 + round(n! * cosh(1)). %e A001540 a(5)=-1+5!(1+1/2!+1/4!)=-1+120+60+5=184. %o A001540 (PARI) a(n)=-1+n!*sum(k=0,floor(n/2),1/(2*k)!) %Y A001540 a(n) = |A009179(n)|-1 = (n-1)*|A009179(n-1)-A009179(n-2)|. %Y A001540 Sequence in context: A113327 A129148 A081958 this_sequence A129044 A052582 A020021 %Y A001540 Adjacent sequences: A001537 A001538 A001539 this_sequence A001541 A001542 A001543 %K A001540 nonn,easy,nice %O A001540 1,2 %A A001540 N. J. A. Sloane (njas(AT)research.att.com). %E A001540 Edited by Ralf Stephan, Apr 16 2004 Search completed in 0.001 seconds