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 #15 May 17 2016 21:06:20
%S 1,2,1,2,4,5,10,20,37,74,148,293,586,1172,2341,4682,9364,18725,37450,
%T 74900,149797,299594,599188,1198373,2396746,4793492,9586981,19173962,
%U 38347924,76695845,153391690,306783380,613566757,1227133514,2454267028
%N a(n) = a(n-3) + 2^(n-4) with a(1) = 1, a(2) = 2, a(3) = 1.
%C a(n) and successive differences: 1,1,2,1,2,4,5,10,20,37; 0,1,-1,1,2,1,5,10,17,37; 1,-2,2,1,-1,4,5,7,20,37; -3,4,-1,-2,5,1,2,13,17,34; 7,-5,-1,7,-4,1,11,4,17,43; -12,4,8,-11,5,10,-7,13,26,25; Rows must be taken by pairs (companions because a(n)-a(n-3) alternatively gives A131577 and A011782 also companions). Note a(3n+2)=2*a(3n+1)=4*a(3n), n positive; see A113405. Sum of consecutive three terms of even rows gives 0,4,32,256.
%H G. C. Greubel, <a href="/A166578/b166578.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,1,-2).
%F For n > 4, a(n) = 2a(n-1) + a(n-3) - 2a(n-4).
%F a(3n) = (8^n - 8)/14 + 1, a(3n-1) = (8^n - 8)/28 + 2, a(3n-2) = (8^n - 8)/56 + 1.
%F G.f.: (1-3*x^2-x^3)/(1-2*x-x^3+2*x^4). - _Colin Barker_, Jan 25 2012
%t RecurrenceTable[{a[1]==1,a[2]==2,a[3]==1,a[n]==a[n-3]+2^(n-4)},a[n],{n,40}] (* or *) LinearRecurrence[{2,0,1,-2},{1,2,1,2},40] (* _Harvey P. Dale_, Sep 14 2011 *)
%o (PARI) Vec((1-3*x^2-x^3)/(1-2*x-x^3+2*x^4)+O(x^99)) \\ _Charles R Greathouse IV_, Jan 25 2012
%K nonn,easy
%O 0,2
%A _Paul Curtz_, Oct 17 2009
%E Edited by _Charles R Greathouse IV_, Nov 04 2009