login
a(n) is the number of words of length n over the alphabet {0,1,2} with at least two 1's and exactly one occurrence of the subword 22.
0

%I #59 Sep 16 2020 06:11:43

%S 0,0,0,0,3,18,69,216,597,1518,3633,8304,18306,39192,81906,167736,

%T 337623,669522,1310559,2536224,4858719,9224262,17370693,32472816,

%U 60302340,111305040,204307620,373111680,678188235,1227359874,2212281369,3972626952,7108762953

%N a(n) is the number of words of length n over the alphabet {0,1,2} with at least two 1's and exactly one occurrence of the subword 22.

%H Maria Juliana Mantilla Morales, <a href="http://cientic.uis.edu.co/blogmatematicas/wp-content/uploads/2020/09/1.-TRABAJO-FINAL-MATEMATICA-COMPUTACIONAL-2.pdf">Segundo trabajo matemática computacional</a> (in Spanish).

%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (4,-2,-8,5,8,-2,-4,-1).

%F a(n) = (((1+sqrt(5))/2)^n)*(-3*sqrt(5)/125 + ((135+13*sqrt(5))/500)*n + ((-45-9*sqrt(5))/250)*n^2 + ((3+sqrt(5))/100)*n^3) + (((1-sqrt(5))/2)^n)*(3*sqrt(5)/125 + ((135-13*sqrt(5))/500)*n + ((-45+9*sqrt(5))/250)*n^2 + ((3-sqrt(5))/100)*n^3).

%F G.f.: 3*x^4*(x+1)^2/(x^2+x-1)^4. - _Alois P. Heinz_, Sep 14 2020

%F E.g.f.: (cosh(x/2) + sinh(x/2))*(5*x*(6 - 15*x + 11*x^2)*cosh(sqrt(5)*x/2) + sqrt(5)*(-12 + 30*x - 27*x^2 + 25*x^3)*sinh(sqrt(5)*x/2))/250. - _Stefano Spezia_, Sep 16 2020

%F a(n) = (n-3)*((n^2+3*n+2)*F(n) + 3*(n-3)*n*F(n+1))/50, where F(n) is the n-th Fibonacci number. - _Vaclav Kotesovec_, Sep 16 2020

%e a(4) = 3: 1122, 1221, 2211.

%e a(5) = 18: 01122, 10122, 11022, 21122, 12122, 02211, 22011, 22101, 22110, 22112, 22121, 01221, 10221, 12201, 12210, 21221, 12212, 11220.

%e The word 11222 is not included because the subword 22 occurs more than once (exactly twice).

%Y Cf. A000045.

%K nonn,easy

%O 0,5

%A _Maria Juliana Mantilla Morales_, Sep 14 2020

%E a(16)-a(32) from _Alois P. Heinz_, Sep 14 2020