A266677 Alternating sum of hexagonal pyramidal numbers.
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
Links
- Ilya Gutkovskiy, Extended graphic representation
- OEIS Wiki, Figurate numbers
- Eric Weisstein's World of Mathematics, Pyramidal Number
- Eric Weisstein's World of Mathematics, Hexagonal Pyramidal Number
- Index entries for linear recurrences with constant coefficients, signature (-3,-2,2,3,1).
Programs
-
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]
-
PARI
concat(0, Vec(x*(1 - 3*x)/((x - 1)*(x + 1)^4) + O(x^50))) \\ Michel Marcus, Feb 02 2016
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).
Comments