OFFSET
0,5
COMMENTS
a(n) is the number of ternary strings of length n that contain either none or four 0's and either none or four 1's.
LINKS
Index entries for linear recurrences with constant coefficients, signature (9,-36,84,-126,126,-84,36,-9,1).
FORMULA
E.g.f.: exp(x)*(1 + x^4/24)^2.
O.g.f.:(1 - 8*x + 28*x^2 - 56*x^3 + 72*x^4 - 64*x^5 + 40*x^6 - 16*x^7 + 73*x^8)/(1 - x)^9. - Stefano Spezia, Feb 19 2021
EXAMPLE
a(9)=883 since the strings are the 630 permutations of 000011112, the 126 permutations of 000022222, the 126 permutations of 111122222, and 222222222.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Feb 17 2021
STATUS
approved