OFFSET
0,2
COMMENTS
2*a(n) is the sum of the consecutive integers from A000384(n)+1 to A000384(n+1)-1. - Bruno Berselli, Jun 27 2018
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
From G. C. Greubel, Aug 24 2017: (Start)
a(n) = 4*a(n-1) - 6*a(n-1) + 4*a(n-2) - a(n-4).
G.f.: (7*x + 14*x^2 + 3*x^3)/(1 - x)^4.
E.g.f.: x*(7 + 14*x + 4*x^2)*exp(x). (End)
MAPLE
seq(n*(4*n^2+2*n+1), n=0..40); # Muniru A Asiru, Jun 27 2018
MATHEMATICA
Table[n*(4*n^2 + 2*n + 1), {n, 0, 50}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {0, 7, 42, 129}, 50] (* G. C. Greubel, Aug 24 2017 *)
PROG
(Magma)[n*(4*n^2+2*n+1): n in [0..40]]; // Vincenzo Librandi, Dec 26 2010
(PARI) x='x+O('x^50); Vec((7*x + 14*x^2 + 3*x^3)/(1 - x)^4) \\ G. C. Greubel, Aug 24 2017
(GAP) List([0..40], n->n*(4*n^2+2*n+1)); # Muniru A Asiru, Jun 27 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Jul 21 2005
STATUS
approved