%I #42 Sep 08 2022 08:45:13
%S 0,1,6,33,196,1305,9786,82201,767208,7891281,88776910,1085051121,
%T 14322674796,203121569833,3080677142466,49764784609065,
%U 853110593298256,15469738758475041,295858753755835158,5951981987323272001,125652953065713520020,2777591594084193600441
%N a(n) = Sum_{k=1..n} k*k!*C(n,k).
%C Limit to which the columns of array A093966 converge.
%C Number of objects in all permutations of n objects taken 1,2,...,n at a time. Example: a(2)=6 because the permutations of {a,b} taken 1 and 2 at a time are: a,b,ab and ba, containing altogether 1+1+2+2=6 objects. a(n)=Sum(k*A008279(n,k),k=1..n). - _Emeric Deutsch_, Aug 16 2006
%C The number of sequences -where each member is an element in a set consisting of n elements- such that the last member is a repetition of a former member. Example: Set of possible members: {l,r}. Sequences such that the last member is a repetition of a former member: l,l; r,r; l,r,l; l,r,r; r,l,l; r,l,r. a(n)=Sum(k*A008279(n,k),k=1..n). [From Franz Fritsche (ff(AT)simple-line.de), Feb 22 2009]
%C The total number of elements in all ascending runs (including runs of length 1) over all permutations of {1,2,...,n}. a(2) = 6 because in the permutations [1,2] and [2,1] there are 4 runs of length 1 and 1 run of length 2. a(n) = Sum_{k>=1} A132159(n,k)*k. - _Geoffrey Critzer_, Feb 24 2014
%H Alois P. Heinz, <a href="/A093964/b093964.txt">Table of n, a(n) for n = 0..200</a>
%F E.g.f.: x*exp(x)/(1-x)^2. - _Vladeta Jovovic_, Apr 24 2004
%F a(n) = 1 + (n-1)*floor(e*n!) = 1 + (n-1)*A000522(n) = A000522(n+1) - 2*A000522(n) = A001339(n) - A000522(n). - _Henry Bottomley_, Dec 22 2008
%F a(n) = n if n < 2, a(n) = n*((n+1)/(n-1)*a(n-1) - a(n-2)) for n >= 2. - _Alois P. Heinz_, Jan 21 2013
%F E.g.f.: x*(1- 12*x/(Q(0)+6*x-3*x^2))/(1-x)^2, where Q(k) = 2*(4*k+1)*(32*k^2+16*k+x^2-6) - x^4*(4*k-1)*(4*k+7)/Q(k+1) ; (continued fraction). - _Sergei N. Gladkovskii_, Nov 18 2013
%F G.f.: conjecture: T(0)/x - 1/x, where T(k) = 1 - x^2*(k+1)^2/(x^2*(k+1)^2 - (1 - 2*x*(k+1))*(1 - 2*x*(k+2))/T(k+1) ); (continued fraction). - _Sergei N. Gladkovskii_, Nov 18 2013
%F a(n) = n*a(n-1) + A007526(n), a(0) = 0. - _David M. Cerna_, May 12 2014
%e G.f. = x + 6*x^2 + 33*x^3 + 196*x^4 + 1305*x^5 + 9786*x^6 + 82201*x^7 + ...
%p seq(add(k*n!/(n-k)!,k=1..n),n=0..20); # _Emeric Deutsch_, Aug 16 2006
%p # second Maple program:
%p a:= proc(n) a(n):=`if`(n<2, n, n*((n+1)/(n-1)*a(n-1)-a(n-2))) end:
%p seq(a(n), n=0..30); # _Alois P. Heinz_, Jan 21 2013
%t nn=21;Range[0,nn]!CoefficientList[Series[D[Exp[y x]/(1-x)^2,y]/.y->1,{x,0,nn}],x] (* _Geoffrey Critzer_, Feb 24 2014 *)
%o (PARI) a(n)=sum(k=1,n,k*k!*binomial(n,k))
%o (Magma) [0] cat [n le 2 select 6^(n-1) else n*((n+1)*Self(n-1) - (n-1)*Self(n-2))/(n-1): n in [1..30]]; // _G. C. Greubel_, Dec 29 2021
%o (Sage) [factorial(n)*( x*exp(x)/(1-x)^2 ).series(x,n+1).list()[n] for n in (0..30)] # _G. C. Greubel_, Dec 29 2021
%Y Cf. A000522, A001339, A007526, A008279.
%Y Row n=2 of A210472. - _Alois P. Heinz_, Jan 23 2013
%K nonn
%O 0,3
%A _Ralf Stephan_, Apr 20 2004
%E a(0) inserted by _Alois P. Heinz_, Jan 21 2013