OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = a(-n).
a(2*n+1) = A097080(n+1).
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4). - Colin Barker, Jul 26 2014
G.f.: -x*(3*x^2-4*x+3) / ((x-1)^3*(x+1)). - Colin Barker, Jul 26 2014
E.g.f.: (exp(x)*x*(x+1) + 5*sinh(x))/2. - Peter Luschny, Aug 04 2014
MATHEMATICA
CoefficientList[Series[-x (3 x^2 - 4 x + 3)/((x - 1)^3 (x + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 27 2014 *)
PROG
(Sage)
def A():
a, b, c, d = 0, 3, 2, 7
while True:
yield a
a, b, c, d = b, c, d, a + 2*(d - b)
(PARI) concat(0, Vec(-x*(3*x^2-4*x+3)/((x-1)^3*(x+1)) + O(x^100))) \\ Colin Barker, Jul 26 2014
(Magma) [(5*(1+(-1)^(1+n))+2*n^2) / 4: n in [0..60]]; // Vincenzo Librandi, Jul 27 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Luschny, Jul 26 2014
STATUS
approved