Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #23 Jun 13 2015 00:51:29
%S 1,2,5,9,21,37,85,149,341,597,1365,2389,5461,9557,21845,38229,87381,
%T 152917,349525,611669,1398101,2446677,5592405,9786709,22369621,
%U 39146837,89478485,156587349,357913941,626349397,1431655765,2505397589
%N Expansion of (1+x-x^2)/((1-x)*(1-4*x^2)).
%C Interleave (4*4^n-1)/2 (see A002450) and (7*4^n-1)/3 (A206374).
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,4,-4).
%F G.f.: (1+x-x^2)/((1-x)*(1-4*x^2)).
%F a(n) = 5*2^n/4+(-2)^n/12-1/3.
%F a(n) = a(n-1)+4*a(n-2)-4*a(n-3).
%F a(2*n) = A002450(n+1).
%F a(n) = A097164(n+1)/4.
%F a(n) = (15*2^n-(-2)^n-8)/24. - _Harvey P. Dale_, Jun 17 2011
%p 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
%t 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 *)
%K nonn,easy
%O 0,2
%A _Paul Barry_, Jul 30 2004