OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Bott, Raoul, Lectures on Morse theory, old and new, Bull. Amer. Math. Soc. 7 (1982), no. 2, 331-358; reprinted in Vol. 48 (October, 2011). See Eq. (4.30).
Index entries for linear recurrences with constant coefficients, signature (0,1,0,1,0,-1).
FORMULA
a(n) = ((-1)^n+1)*(n+5*i^n+3)/8-2*(n+1). - Bruno Berselli, Nov 08 2011
G.f.: -x*(x+2)*(x^2+2*x+2) / ((x-1)^2*(x+1)^2*(x^2+1)). - Colin Barker, Jul 10 2015
MAPLE
f:=g->(1+x)^(2*g)*(1+x^3)^(3*g)/((1-x^2)*(1-x^4))-x^(2*g)*(1+x)^4/((1-x^2)*(1-x^4));
s:=g->seriestolist(series(f(g), x, 60));
s(0);
MATHEMATICA
LinearRecurrence[{0, 1, 0, 1, 0, -1}, {0, -4, -6, -8, -7, -12}, 80] (* Harvey P. Dale, Jul 30 2019 *)
PROG
(Magma) g:=0; m:=60; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!((1+x)^(2*g)*(1+x^3)^(3*g)/((1-x^2)*(1-x^4))-x^(2*g)*(1+x)^4/((1-x^2)*(1-x^4)))); // Bruno Berselli, Nov 08 2011
(PARI) a(n)=if(n%2, , (n+5*I^n+3)/4)-2*n-2 \\ Charles R Greathouse IV, Nov 08 2011
(PARI) concat(0, Vec(-x*(x+2)*(x^2+2*x+2)/((x-1)^2*(x+1)^2*(x^2+1)) + O(x^100))) \\ Colin Barker, Jul 10 2015
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 08 2011
STATUS
approved