login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A173184 Partial sums of A000166. 4

%I #39 May 09 2023 10:18:34

%S 1,1,2,4,13,57,322,2176,17009,150505,1485466,16170036,192384877,

%T 2483177809,34554278858,515620794592,8212685046337,139062777326001,

%U 2494364438359954,47245095998005060,942259727190907181,19737566982241851721,433234326593362631602

%N Partial sums of A000166.

%C Partial sums of subfactorial or rencontres numbers, or derangements (number of permutations of n elements with no fixed points). The subsequence of primes begins: 2, 13, 192384877.

%F G.f.: 1/U(0)/(1-x) where U(k) = 1 + x - x*(k+1)/(1 - x*(k+1)/U(k+1)); (continued fraction). - _Sergei N. Gladkovskii_, Oct 15 2012

%F G.f.: 1/(1 - x^2) + (1/(1 - x))*Sum_{k>=1} k^k*x^k/(1 + (k + 1)*x)^(k+1). - _Ilya Gutkovskiy_, Apr 13 2017

%F From _Emanuele Munarini_, Oct 06 2017: (Start)

%F E.g.f.: exp(-t)/(1-t) - exp(t-2)*(coshIntegral(2-2*t) + sinhIntegral(2-2*t) - expIntegralEi(2)).

%F a(n+2) - (n+3)*a(n+1) + (n+2)*a(n) = (-1)^n. (End)

%F D-finite with recurrence a(n+3) - (n+3)*a(n+2) + (n+2)*a(n) = 0. - _Emanuele Munarini_, Aug 24 2017

%e a(3) = 1 + 0 + 1 + 2 = 4.

%t a[0] = 1; a[n_] := a[n] = n*a[n - 1] + (-1)^n; Accumulate@ Array[a, 21, 0] (* _Robert G. Wilson v_, Apr 01 2011 *)

%t dr[{n_,a1_,a2_}]:={n+1,a2,n(a1+a2)}; Accumulate[Transpose[NestList[dr,{0,0,1},30]][[3]]] (* _Harvey P. Dale_, Jul 17 2014 *)

%t Table[Sum[Subfactorial[k], {k, 0, n}], {n, 0, 100}] (* _Emanuele Munarini_, Aug 24 2017 *)

%o (Maxima)

%o s[0]:1$

%o s[n]:=n*s[n-1]+(-1)^n$

%o makelist(sum(s[k],k,0,n),n,0,12); /* _Emanuele Munarini_, Aug 24 2017 */

%Y Cf. A000166, A001277.

%K nonn

%O 0,3

%A _Jonathan Vos Post_, Feb 12 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 20 03:14 EDT 2024. Contains 374441 sequences. (Running on oeis4.)