This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A098588 #31 Sep 08 2022 08:45:15 %S A098588 1,2,4,8,16,33,68,140,288,592,1217,2502,5144,10576,21744,44705,91912, %T A098588 188968,388512,798768,1642241,3376394,6941756,14272024,29342816, %U A098588 60327873,124032140,255006036,524284096,1077911008,2216149889 %N A098588 a(n) = 2^n for n = 0..4; for n > 4, a(n) = 2*a(n-1) + a(n-5). %C A098588 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 A098588 G. C. Greubel, <a href="/A098588/b098588.txt">Table of n, a(n) for n = 0..1000</a> %H A098588 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,0,0,1). %F A098588 G.f.: 1/(1-2*x-x^5). %F A098588 a(n) = Sum_{k=0..floor(n/4)} Sum_{i=0..n} binomial(n-4k, i)binomial(i, k). %F A098588 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 A098588 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 A098588 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 A098588 (PARI) x='x+O('x^30); Vec(1/(1-2*x-x^5)) \\ _G. C. Greubel_, Feb 03 2018 %o A098588 (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 A098588 Cf. A008998, A008999. %K A098588 nonn,easy %O A098588 0,2 %A A098588 _Paul Barry_, Sep 16 2004