OFFSET
0,2
LINKS
FORMULA
G.f.: (1+x-x^2)/((1-x)*(1-4*x^2)).
a(n) = 5*2^n/4+(-2)^n/12-1/3.
a(n) = a(n-1)+4*a(n-2)-4*a(n-3).
a(2*n) = A002450(n+1).
a(n) = A097164(n+1)/4.
a(n) = (15*2^n-(-2)^n-8)/24. - Harvey P. Dale, Jun 17 2011
MAPLE
a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=4*a[n-2]+4 od: seq(a[n]/4, n=2..33); # Zerinvary Lajos, Mar 17 2008
MATHEMATICA
CoefficientList[Series[(1+x-x^2)/((1-x)(1-4x^2)), {x, 0, 40}], x] (* or *) LinearRecurrence[{1, 4, -4}, {1, 2, 5}, 41] (* or *) f[n_]:=(15*2^n-(-2)^n - 8)/24; Array[f, 40] (* Harvey P. Dale, Jun 17 2011 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Jul 30 2004
STATUS
approved