This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A173184 #39 May 09 2023 10:18:34 %S A173184 1,1,2,4,13,57,322,2176,17009,150505,1485466,16170036,192384877, %T A173184 2483177809,34554278858,515620794592,8212685046337,139062777326001, %U A173184 2494364438359954,47245095998005060,942259727190907181,19737566982241851721,433234326593362631602 %N A173184 Partial sums of A000166. %C A173184 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 A173184 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 A173184 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 A173184 From _Emanuele Munarini_, Oct 06 2017: (Start) %F A173184 E.g.f.: exp(-t)/(1-t) - exp(t-2)*(coshIntegral(2-2*t) + sinhIntegral(2-2*t) - expIntegralEi(2)). %F A173184 a(n+2) - (n+3)*a(n+1) + (n+2)*a(n) = (-1)^n. (End) %F A173184 D-finite with recurrence a(n+3) - (n+3)*a(n+2) + (n+2)*a(n) = 0. - _Emanuele Munarini_, Aug 24 2017 %e A173184 a(3) = 1 + 0 + 1 + 2 = 4. %t A173184 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 A173184 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 A173184 Table[Sum[Subfactorial[k], {k, 0, n}], {n, 0, 100}] (* _Emanuele Munarini_, Aug 24 2017 *) %o A173184 (Maxima) %o A173184 s[0]:1$ %o A173184 s[n]:=n*s[n-1]+(-1)^n$ %o A173184 makelist(sum(s[k],k,0,n),n,0,12); /* _Emanuele Munarini_, Aug 24 2017 */ %Y A173184 Cf. A000166, A001277. %K A173184 nonn %O A173184 0,3 %A A173184 _Jonathan Vos Post_, Feb 12 2010