OFFSET
0,2
COMMENTS
One of a family of sequences with palindromic generators.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (2*n^3 +3*n^2 +3*n +2)/2.
G.f.: (1 +3*x^2 -4*x^3)/(1-x)^5.
E.g.f.: (2 +8*x +9*x^2 +2*x^3)*exp(x)/2. - G. C. Greubel, Aug 14 2019
MAPLE
a := n-> (n+1)*(2*(n+1)^2-3*n)/2; seq(a(n), n = 0..40); # G. C. Greubel, Aug 14 2019
MATHEMATICA
Table[(n^3 +(n+1)^3 -1)/2 +1, {n, 0, 40}] (* Vladimir Joseph Stephan Orlovsky, May 04 2011 *)
CoefficientList[Series[(1 +3x^2 -4x^3)/(1-x)^5, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 08 2013 *)
PROG
(Magma) [(2*n^3+3*n^2+3*n+2)/2: n in [0..40]]; // Vincenzo Librandi, Aug 08 2013
(PARI) vector(40, n, n--; (n+1)*(2*(n+1)^2-3*n)/2) \\ G. C. Greubel, Aug 14 2019
(Sage) [(n+1)*(2*(n+1)^2-3*n)/2 for n in (0..40)] # G. C. Greubel, Aug 14 2019
(GAP) List([0..40], n-> (n+1)*(2*(n+1)^2-3*n)/2); # G. C. Greubel, Aug 14 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Mar 21 2003
STATUS
approved