login
A269428
Alternating sum of heptagonal pyramidal numbers.
1
0, -1, 7, -19, 41, -74, 122, -186, 270, -375, 505, -661, 847, -1064, 1316, -1604, 1932, -2301, 2715, -3175, 3685, -4246, 4862, -5534, 6266, -7059, 7917, -8841, 9835, -10900, 12040, -13256, 14552, -15929, 17391, -18939, 20577, -22306, 24130, -26050, 28070
OFFSET
0,3
LINKS
OEIS Wiki, Figurate numbers
Eric Weisstein's World of Mathematics, Pyramidal Number
Eric Weisstein's World of Mathematics, Heptagonal Pyramidal Number
FORMULA
G.f.: x*(1 - 4*x)/((x - 1)*(x + 1)^4).
a(n) = ((20*n^3 + 42*n^2 + 4*n - 9)*(-1)^n + 9)/48.
a(n) = Sum_{k = 0..n} (-1)^k*A002413(k).
Sum_{n>=1} 1/a(n) = -0.8939139178060972723185724267951741... . - Vaclav Kotesovec, Feb 26 2016
E.g.f.: (9*sinh(x) - (33*x - 51*x^2 + 10*x^3)*exp(-x))/24. - Franck Maminirina Ramaharo, Nov 11 2018
MATHEMATICA
Table[((20 n^3 + 42 n^2 + 4 n - 9) (-1)^n + 9)/48, {n, 0, 40}]
LinearRecurrence[{-3, -2, 2, 3, 1}, {0, -1, 7, -19, 41}, 41]
PROG
(Magma) [((20*n^3+42*n^2+4*n-9)*(-1)^n+9)/48: n in [0..50]]; // Vincenzo Librandi, Feb 26 2016
(PARI) a(n)=((20*n^3 + 42*n^2 + 4*n - 9)*(-1)^n + 9)/48 \\ Charles R Greathouse IV, Jul 26 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Ilya Gutkovskiy, Feb 26 2016
STATUS
approved