OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Lukas Fleischer, Jeffrey Shallit, Words With Few Palindromes, Revisited, arxiv preprint arXiv:1911.12464 [cs.FL], November 27 2019.
Index entries for linear recurrences with constant coefficients, signature (1,0,1).
FORMULA
a(n) = a(n - 1) + a(n - 3) for n >= 7. Furthermore, a(n) ~ C*alpha^n, where C ~ 5.37711043 and alpha ~ 1.465571231876768 is the largest real zero of X^3 - X^2 - 1.
a(n) = 6*A000930(n - 1) for n >= 5.
G.f.: (1 + 2*x + 3*x^2 + 5*x^3 + 9*x^4 + 6*x^5 + 6*x^6) / (1 - x - x^3). - Colin Barker, Dec 02 2019
MATHEMATICA
LinearRecurrence[{1, 0, 1}, {1, 3, 6, 12, 24, 36, 54}, 40] (* Harvey P. Dale, Dec 16 2021 *)
PROG
(PARI) Vec((1 + 2*x + 3*x^2 + 5*x^3 + 9*x^4 + 6*x^5 + 6*x^6) / (1 - x - x^3) + O(x^40)) \\ Colin Barker, Dec 02 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jeffrey Shallit, Dec 02 2019
STATUS
approved