login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270694 Alternating sum of centered heptagonal pyramidal numbers. 1
0, -1, 8, -23, 51, -94, 157, -242, 354, -495, 670, -881, 1133, -1428, 1771, -2164, 2612, -3117, 3684, -4315, 5015, -5786, 6633, -7558, 8566, -9659, 10842, -12117, 13489, -14960, 16535, -18216, 20008, -21913, 23936, -26079, 28347, -30742, 33269 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
More generally, the ordinary generating function for the alternating sum of centered k-gonal pyramidal numbers is -x*(1 - (k - 2)*x + x^2)/((1 - x)*(1 + x)^4).
LINKS
FORMULA
G.f.: -x*(1 - 5*x + x^2)/((1 - x)*(1 + x)^4).
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*(2*n + 1)*(14*n^2 + 14*n - 9) + 9)/48.
E.g.f.: (1/48)*(9*exp(x) - (9 + 66*x - 126*x^2 + 28*x^3)*exp(-x)). - G. C. Greubel, Mar 28 2016
MAPLE
A270694:= n-> ((-1)^n*(2*n+1)*(14*n^2+14*n-9) + 9)/48; seq(A270694(n), n=0..40); # G. C. Greubel, Apr 02 2021
MATHEMATICA
LinearRecurrence[{-3, -2, 2, 3, 1}, {0, -1, 8, -23, 51}, 39]
Table[((-1)^n (2 n + 1) (14 n^2 + 14 n - 9) + 9)/48, {n, 0, 38}]
PROG
(PARI) my(x='x+O('x^50)); concat(0, Vec(-x*(1-5*x+x^2)/((1-x)*(1+x)^4))) \\ Altug Alkan, Mar 21 2016
(Magma) [((-1)^n*(2*n + 1)*(14*n^2 + 14*n - 9) + 9)/48 : n in [0..40]]; // Wesley Ivan Hurt, Mar 21 2016
(Sage) [((-1)^n*(2*n+1)*(14*n^2+14*n-9) +9)/48 for n in (0..40)] # G. C. Greubel, Apr 02 2021
CROSSREFS
Cf. A004126 (centered heptagonal pyramidal numbers).
Cf. A000330, A006323 (partial sums of centered heptagonal pyramidal numbers), A019298, A232599.
Sequence in context: A175346 A225280 A218711 * A027054 A358246 A048467
KEYWORD
easy,sign
AUTHOR
Ilya Gutkovskiy, Mar 21 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 10:31 EDT 2024. Contains 371240 sequences. (Running on oeis4.)