OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
OEIS Wiki, Centered pyramidal numbers
Index entries for linear recurrences with constant coefficients, signature (-3,-2,2,3,1).
FORMULA
G.f.: -x*(1 - 6*x + x^2)/((1 - x)*(1 + x)^4).
E.g.f.: (1/12)*(3*exp(x) - (3 + 18*x - 36*x^2 + 8*x^3)*exp(-x)).
a(n) = -3*a(n-1) - 2*a(n-2) + 2*a(n-3) + 3*a(n-4) + a(n-5).
a(n) = ((-1)^n*(4*n^2 - 1)*(2*n + 3) + 3)/12.
MAPLE
A270695:= n-> ((-1)^n*(4*n^2 -1)*(2*n+3) +3)/12: seq(A270695(n), n=0..40); # G. C. Greubel, Apr 02 2021
MATHEMATICA
LinearRecurrence[{-3, -2, 2, 3, 1}, {0, -1, 9, -26, 58}, 39]
Table[((-1)^n (4 n^2 - 1) (2 n + 3) + 3)/12, {n, 0, 38}]
PROG
(PARI) x='x+O('x^100); concat(0, Vec(-x*(1-6*x+x^2)/((1-x)*(1+x)^4))) \\ Altug Alkan, Mar 21 2016
(Magma) [((-1)^n*(4*n^2 - 1)*(2*n + 3) + 3)/12 : n in [0..40]]; // Wesley Ivan Hurt, Mar 21 2016
(Sage) [((-1)^n*(4*n^2 -1)*(2*n+3) +3)/12 for n in (0..40)] # G. C. Greubel, Apr 02 2021
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Ilya Gutkovskiy, Mar 21 2016
EXTENSIONS
a(6)=179 inserted by Georg Fischer, Apr 03 2019
STATUS
approved