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
Index entries for linear recurrences with constant coefficients, signature (-3,-2,2,3,1).
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