A341896 a(n) is the number of words of length n over the alphabet {a,b,c} with an even number of appearances of the letter 'a' and the sum of appearances of the letters 'b' and 'c' add up to at most 3.
1, 2, 5, 14, 25, 90, 61, 294, 113, 690, 181, 1342, 265, 2314, 365, 3670, 481, 5474, 613, 7790, 761, 10682, 925, 14214, 1105, 18450, 1301, 23454, 1513, 29290, 1741, 36022, 1985, 43714, 2245, 52430, 2521, 62234, 2813, 73190, 3121, 85362, 3445, 98814, 3785, 113610
Offset: 0
Examples
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}.
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).
Crossrefs
Bisection gives: A080856 (even part).
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