login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270695 Alternating sum of centered octagonal pyramidal numbers. 0
0, -1, 9, -26, 58, -107, -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

Table of n, a(n) for n=0..37.

OEIS Wiki, Centered pyramidal numbers

Index entries for linear recurrences with constant coefficients, signature (-3,-2,2,3,1).

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.

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

CROSSREFS

Cf. A000447 (centered octagonal pyramidal numbers).

Cf. A000330, A006324 (partial sums of centered octagonal pyramidal numbers), A019298, A232599.

Sequence in context: A052153 A154560 A249275 * A048468 A255108 A048771

Adjacent sequences:  A270692 A270693 A270694 * A270696 A270697 A270698

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 15 21:06 EDT 2018. Contains 316237 sequences. (Running on oeis4.)