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!)
A270695 Alternating sum of centered octagonal pyramidal numbers. 1
0, -1, 9, -26, 58, -107, 179, -276, 404, -565, 765, -1006, 1294, -1631, 2023, -2472, 2984, -3561, 4209, -4930, 5730, -6611, 7579, -8636, 9788, -11037, 12389, -13846, 15414, -17095, 18895, -20816, 22864, -25041, 27353, -29802, 32394, -35131, 38019 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
G.f.: -x*(1 - 6*x + x^2)/((1 - x)*(1 + x)^4).
E.g.f.: (1/12)*(3*exp(x) - (3 + 18*x - 36*x^2 + 8*x^3)*exp(-x)).
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*(4*n^2 - 1)*(2*n + 3) + 3)/12.
MAPLE
A270695:= n-> ((-1)^n*(4*n^2 -1)*(2*n+3) +3)/12: seq(A270695(n), n=0..40); # G. C. Greubel, Apr 02 2021
MATHEMATICA
LinearRecurrence[{-3, -2, 2, 3, 1}, {0, -1, 9, -26, 58}, 39]
Table[((-1)^n (4 n^2 - 1) (2 n + 3) + 3)/12, {n, 0, 38}]
PROG
(PARI) x='x+O('x^100); concat(0, Vec(-x*(1-6*x+x^2)/((1-x)*(1+x)^4))) \\ Altug Alkan, Mar 21 2016
(Magma) [((-1)^n*(4*n^2 - 1)*(2*n + 3) + 3)/12 : n in [0..40]]; // Wesley Ivan Hurt, Mar 21 2016
(Sage) [((-1)^n*(4*n^2 -1)*(2*n+3) +3)/12 for n in (0..40)] # G. C. Greubel, Apr 02 2021
CROSSREFS
Cf. A000447 (centered octagonal pyramidal numbers).
Cf. A000330, A006324 (partial sums of centered octagonal pyramidal numbers), A019298, A232599.
Sequence in context: A154560 A338548 A249275 * A048468 A255108 A048771
KEYWORD
easy,sign
AUTHOR
Ilya Gutkovskiy, Mar 21 2016
EXTENSIONS
a(6)=179 inserted by Georg Fischer, Apr 03 2019
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 April 24 11:36 EDT 2024. Contains 371936 sequences. (Running on oeis4.)