|
|
A270695
|
|
Alternating sum of centered octagonal pyramidal numbers.
|
|
1
|
|
|
0, -1, 9, -26, 58, -107, 179, -276, 404, -565, 765, -1006, 1294, -1631, 2023, -2472, 2984, -3561, 4209, -4930, 5730, -6611, 7579, -8636, 9788, -11037, 12389, -13846, 15414, -17095, 18895, -20816, 22864, -25041, 27353, -29802, 32394, -35131, 38019
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
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
|
|
|
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
|
Cf. A000447 (centered octagonal pyramidal numbers).
|
|
KEYWORD
|
easy,sign
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|