login
A337142
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
0, 0, 0, 0, 3, 18, 69, 216, 597, 1518, 3633, 8304, 18306, 39192, 81906, 167736, 337623, 669522, 1310559, 2536224, 4858719, 9224262, 17370693, 32472816, 60302340, 111305040, 204307620, 373111680, 678188235, 1227359874, 2212281369, 3972626952, 7108762953
OFFSET
0,5
LINKS
FORMULA
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).
G.f.: 3*x^4*(x+1)^2/(x^2+x-1)^4. - Alois P. Heinz, Sep 14 2020
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
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
EXAMPLE
a(4) = 3: 1122, 1221, 2211.
a(5) = 18: 01122, 10122, 11022, 21122, 12122, 02211, 22011, 22101, 22110, 22112, 22121, 01221, 10221, 12201, 12210, 21221, 12212, 11220.
The word 11222 is not included because the subword 22 occurs more than once (exactly twice).
CROSSREFS
Cf. A000045.
Sequence in context: A027333 A026576 A048899 * A107583 A373651 A157535
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
a(16)-a(32) from Alois P. Heinz, Sep 14 2020
STATUS
approved