login
A266677
Alternating sum of hexagonal pyramidal numbers.
5
0, -1, 6, -16, 34, -61, 100, -152, 220, -305, 410, -536, 686, -861, 1064, -1296, 1560, -1857, 2190, -2560, 2970, -3421, 3916, -4456, 5044, -5681, 6370, -7112, 7910, -8765, 9680, -10656, 11696, -12801, 13974, -15216, 16530, -17917, 19380, -20920, 22540
OFFSET
0,3
COMMENTS
More generally, the ordinary generating function for the alternating sum of k-gonal pyramidal numbers is x*(1 + (3 - k)*x)/((x - 1)*(x + 1)^4).
LINKS
OEIS Wiki, Figurate numbers
Eric Weisstein's World of Mathematics, Pyramidal Number
Eric Weisstein's World of Mathematics, Hexagonal Pyramidal Number
FORMULA
G.f.: x*(1 - 3*x)/((x - 1)*(x + 1)^4).
a(n) = ((-1)^n*(2*n*(n + 2)*(4*n + 1) - 3) + 3)/24.
a(n) = Sum_{k = 0..n} (-1)^k*A002412(k).
MATHEMATICA
Table[((-1)^n (2 n (n + 2) (4 n + 1) - 3) + 3)/24, {n, 0, 40}]
LinearRecurrence[{-3, -2, 2, 3, 1}, {0, -1, 6, -16, 34}, 40]
PROG
(PARI) concat(0, Vec(x*(1 - 3*x)/((x - 1)*(x + 1)^4) + O(x^50))) \\ Michel Marcus, Feb 02 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Ilya Gutkovskiy, Feb 02 2016
STATUS
approved