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 A248960 #17 Oct 27 2016 11:46:57 %S A248960 1,3,9,27,81,150,366,870,2022,4686,10974,25614,59742,139398,325350, %T A248960 759198,1771590,4134126,9647262,22512342,52533750,122590422,286071414, %U A248960 667563054,1557794622,3635198310,8482932318,19795382454,46193598486,107795266974,251546100558,586996465758,1369788083022 %N A248960 Number of ternary words of length n in which all digits 0..2 occur in every 5 consecutive digits. %H A248960 Colin Barker, <a href="/A248960/b248960.txt">Table of n, a(n) for n = 0..1000</a> %H A248960 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,2,2,-1,-1). %F A248960 G.f.: (1+2*x+4*x^2+10*x^3+28*x^4-8*x^5-14*x^6-6*x^8+3*x^10) / ((1+x)*(1-2*x-2*x^3+x^5)). - _Colin Barker_, Oct 27 2016 %F A248960 a(n) = a(n-1) + 2*a(n-2) + 2*a(n-3) + 2*a(n-4) - a(n-5) - a(n-6). %F A248960 a(n) = A242317(n-4) * 6. %t A248960 Join[{1,3,9,27,81},LinearRecurrence[{1,2,2,2,-1,-1},{150,366,870,2022,4686,10974},30]] (* _Harvey P. Dale_, Apr 04 2015 *) %o A248960 (PARI) Vec((1+2*x+4*x^2+10*x^3+28*x^4-8*x^5-14*x^6-6*x^8+3*x^10)/((1+x)*(1-2*x-2*x^3+x^5)) + O(x^30)) \\ _Colin Barker_, Oct 27 2016 %Y A248960 Cf. A242317, A249019. %K A248960 nonn,easy %O A248960 0,2 %A A248960 _Andrew Woods_, Jan 12 2015 %E A248960 Changed offset to 0. - _N. J. A. Sloane_, Jan 15 2015