A030297 a(n) = n*(n + a(n-1)) with a(0)=0.
0, 1, 6, 27, 124, 645, 3906, 27391, 219192, 1972809, 19728190, 217010211, 2604122676, 33853594957, 473950329594, 7109254944135, 113748079106416, 1933717344809361, 34806912206568822, 661331331924807979
Offset: 0
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..449
Programs
-
Maple
f := proc(n) options remember; if n <= 1 then n elif n = 2 then 6 else -n*(n-2)*f(n-3)+(n-3)*n*f(n-2)+3*n*f(n-1)/(n-1); fi; end;
-
Mathematica
a=0;lst={a};Do[a=(a+n)*n;AppendTo[lst, a], {n, 2*4!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 14 2008 *) RecurrenceTable[{a[0]==0,a[n]==n(n+a[n-1])},a[n],{n,20}] (* Harvey P. Dale, Oct 22 2011 *) Round@Table[(2 E Gamma[n, 1] - 1) n, {n, 0, 20}] (* Round is equivalent to FullSimplify here, but is much faster - Vladimir Reshetnikov, Oct 07 2016 *)
Formula
a(n) = A019461(2n).
For n>=2, a(n) = floor(2*e*n! - n - 2). - Benoit Cloitre, Feb 16 2003
a(n) = sum_{k=0...n} (n! / k!) * k^2. - Ross La Haye, Sep 21 2004
E.g.f.: x*(1+x)*exp(x)/(1-x). - Vladeta Jovovic, Dec 01 2004
Extensions
Better description from Henry Bottomley, May 15 2000
Comments