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 A248959 #29 Apr 21 2023 13:00:35 %S A248959 1,3,9,27,36,72,132,240,444,816,1500,2760,5076,9336,17172,31584,58092, %T A248959 106848,196524,361464,664836,1222824,2249124,4136784,7608732,13994640, %U A248959 25740156,47343528,87078324,160162008,294583860,541824192,996570060,1832978112 %N A248959 Number of ternary words of length n in which all digits 0..2 occur in every subword of 4 consecutive digits. %C A248959 For n < 4 the constraint is voidly satisfied: each of the n-digit words satisfies the definition since there is no subword of length 4. - _M. F. Hasler_, Jan 13 2015 %H A248959 Colin Barker, <a href="/A248959/b248959.txt">Table of n, a(n) for n = 0..1000</a> (corrected by _Georg Fischer_, Jan 20 2019) %H A248959 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,1). %F A248959 G.f.: (1 + 2*x + 5*x^2 + 14*x^3 - 3*x^4 - 3*x^6)/(1 - x - x^2 - x^3). - Corrected by _Colin Barker_, Jan 12 2015 %F A248959 a(n) = a(n-1) + a(n-2) + a(n-3). %F A248959 a(n) = A001590(n+1) * 12, for n>=4. %F A248959 a(n) = A196700(n) * 6, for n>=4. - _Alois P. Heinz_, Jan 12 2015 %t A248959 Join[{1,3,9,27},LinearRecurrence[{1,1,1},{36,72,132},30]] (* _Harvey P. Dale_, Mar 12 2015 *) %o A248959 (PARI) Vec((1+2*x+5*x^2+14*x^3-3*x^4-3*x^6)/(1-x-x^2-x^3) + O(x^100)) \\ _Colin Barker_, Jan 12 2015; extended to indices 0..3 by _M. F. Hasler_, Jan 13 2015 %Y A248959 Cf. A001590, A196700. %K A248959 nonn,easy %O A248959 0,2 %A A248959 _Andrew Woods_, Jan 12 2015 %E A248959 a(0)-a(3) from _M. F. Hasler_, Jan 13 2015