%I #21 Sep 22 2024 09:52:42
%S 1,5,21,81,296,1043,3585,12095,40221,132225,430633,1391623,4467689,
%T 14262766,45311977,143343279,451768405,1419092951,4444424613,
%U 13882255419,43256925753,134492621659,417322590000,1292554593007,3996626787973,12338508959035,38037021764053
%N Number of ternary strings of length n with maximal run length four containing 11112.
%H Math StackExchange, <a href="http://math.stackexchange.com/questions/1685843">Words built with 0,1,2</a>
%H Marko Riedel, <a href="/A269916/a269916.maple.txt">Maple code by total enumeration and by generating function.</a>
%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (3, 3, -1, -9, -25, -39, -45, -43, -32, -18, -8, -2).
%F G.f.: x^5*(x+1)*(x^2+1)*(x^4+x^3+x^2+x+1) / ((x^8+3*x^7+5*x^6+7*x^5 +7*x^4+5*x^3+3*x^2+x-1) * (2*x^4+2*x^3+2*x^2+2*x-1)).
%t Drop[CoefficientList[Series[x^5 (x + 1) (x^2 + 1) (x^4 + x^3 + x^2 + x + 1)/((x^8 + 3 x^7 + 5 x^6 + 7 x^5 + 7 x^4 + 5 x^3 + 3 x^2 + x - 1) (2 x^4 + 2 x^3 + 2 x^2 + 2 x - 1)), {x, 0, 31}], x], 5] (* _Michael De Vlieger_, Mar 08 2016 *)
%Y Cf. A081038, A269914, A269915, A269917.
%K nonn
%O 5,2
%A _Marko Riedel_, Mar 07 2016