OFFSET
5,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (8,-20,0,76,-96,-32,128,-64).
FORMULA
G.f.: x^5*(2-3*x)*(1-x)^2/(1 - 2*x^2)^2/(1 - 2*x)^4 = (1/(1-2*x)^4-1/(1-2*x^2)^2)/4
EXAMPLE
a(6) = 9 because 111122, 111212, 111123, 111213, 112113, 111132, 111312, 111133, 111313 are all ternary Lyndon words with four 1's
MATHEMATICA
LinearRecurrence[{8, -20, 0, 76, -96, -32, 128, -64}, {2, 9, 40, 137, 448, 1336, 3840, 10540}, 40] (* Harvey P. Dale, Nov 04 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mike Zabrocki, Nov 05 2006
STATUS
approved