OFFSET
0,2
REFERENCES
Rodrigo de Castro, TeorÃa de la computación, 2004, unilibros.
LINKS
Luis Mantilla, Table of n, a(n) for n = 0..46
Luis Mantilla, demonstration
Index entries for linear recurrences with constant coefficients, signature (0,4,0,-6,0,4,0,-1).
FORMULA
a(n) = 4*a(n-2) - 6*a(n-4) + 4*a(n-6) - a(n-8).
G.f.: (10*x^7-13*x^6+46*x^5+11*x^4+6*x^3+x^2+2*x+1)/((x-1)^4*(x+1)^4).
a(n) = 2*n + 8*C(n,3) if n is odd, a(n) = 1 + 4*C(n,2) if n is even. - Alois P. Heinz, Mar 01 2021
EXAMPLE
a(0) = 1 : the empty word.
a(1) = 2 : {b, c}.
a(2) = 5 : {aa, bb, cc, bc, cb}.
a(3) = 14 : {aab, aac, aba, aca, baa, bbb, bbc, bcb, bcc, caa, cbb, cbc, ccb, bbb}.
a(4) = 25 : {aaaa, aabb, aabc, aacb, aacc, abab, abac, abba, abca, acab, acac, acba, baab, baac, baba, baca, bbaa, bcaa, caab, caac, caba, caca, cbaa, ccaa, acca}.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Luis Mantilla, Feb 28 2021
STATUS
approved