OFFSET
0,3
COMMENTS
Centered square numbers alternating with odd squares.
LINKS
Jinyuan Wang, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
E.g.f.: ((2 + x*(2 + x))*cosh(x) + x*(3 + 2*x)*sinh(x))/2.
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6).
a(n) = (3*n^2 + 2*n + 2 + (-1)^n*(-n^2 + 2*n + 2))/4.
a(2n) = A001844(n). a(2n+1) = (2n+1)^2.
EXAMPLE
Illustration of initial terms:
o
o o o o o o o o o
o o o o o o o o o o o o o o o o o
o o o o o o o o o o o o o o o o o o o o o o o o o
o o o o o o o o o o o o o o o o o
o o o o o o o o o
o
0 1 2 3 4 5 6
MAPLE
a:=series((1+x+2*x^2+6*x^3+x^4+x^5)/(1-x^2)^3, x=0, 55): seq(coeff(a, x, n), n=0..54); # Paolo P. Lava, Mar 27 2019
MATHEMATICA
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {1, 1, 5, 9, 13, 25}, 55]
Table[(3 n^2 + 2 n + 2 + (-1)^n (-n^2 + 2 n + 2))/4, {n, 0, 54}]
PROG
(PARI) x='x+O('x^99); Vec((1+x+2*x^2+6*x^3+x^4+x^5)/(1-x^2)^3) \\ Altug Alkan, Apr 06 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Apr 06 2016
STATUS
approved