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 #31 Sep 08 2022 08:45:15
%S 1,2,4,8,16,33,68,140,288,592,1217,2502,5144,10576,21744,44705,91912,
%T 188968,388512,798768,1642241,3376394,6941756,14272024,29342816,
%U 60327873,124032140,255006036,524284096,1077911008,2216149889
%N a(n) = 2^n for n = 0..4; for n > 4, a(n) = 2*a(n-1) + a(n-5).
%C a(n) equals the number of n-length words on {0,1,2} such that 0 appears only in a run whose length is a multiple of 5. - _Milan Janjic_, Feb 17 2015
%H G. C. Greubel, <a href="/A098588/b098588.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,0,0,1).
%F G.f.: 1/(1-2*x-x^5).
%F a(n) = Sum_{k=0..floor(n/4)} Sum_{i=0..n} binomial(n-4k, i)binomial(i, k).
%F G.f.: G(0), where G(k)= 1 + x*(2+x^4)/(1 - x*(2+x^4)/(x*(2+x^4) + 1/G(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Jul 03 2013
%F Lim_{n->infinity} a(n)/a(n+1) = 0.486389... is a real root of -1 + 2Z + Z^5 = 0. - _Sergei N. Gladkovskii_, Jul 03 2013
%t CoefficientList[Series[1/(1-2*x-x^5), {x,0,50}], x] (* or *) LinearRecurrence[{2,0,0,0,1}, {1,2,4,8,16}, 50] (* _G. C. Greubel_, Feb 03 2018 *)
%o (PARI) x='x+O('x^30); Vec(1/(1-2*x-x^5)) \\ _G. C. Greubel_, Feb 03 2018
%o (Magma) I:=[1,2,4,8,16]; [n le 5 select I[n] else 2*Self(n-1) +Self(n-5): n in [1..30]]; // _G. C. Greubel_, Feb 03 2018
%Y Cf. A008998, A008999.
%K nonn,easy
%O 0,2
%A _Paul Barry_, Sep 16 2004