OFFSET
0,5
COMMENTS
a(n) is the number of words of length n defined on 5 letters that have exactly two a's and exactly two b's and no c's or exactly two a's and exactly three c's and no b's.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (12,-60,160,-240,192,-64).
FORMULA
a(n) = (1/3)*2^(n-7)*(n-3)*(n-2)*(n-1)*n*(n+2).
E.g.f.: (x^2/2)*exp(2*x)*(x^2/2 + x^3/6).
G.f.: 2*x^4*(3 - x)/(1 - 2*x)^6. - Stefano Spezia, Jun 07 2025
From Amiram Eldar, Sep 29 2025: (Start)
Sum_{n>=4} 1/a(n) = 12*log(2)/5 - 37/25.
Sum_{n>=4} (-1)^n/a(n) = 324*log(3/2)/5 - 653/25. (End)
EXAMPLE
a(4) = 6 since the words are the 6 permutations of aabb.
a(6) = 480 since the words are the 90 permutations of aabbdd, the 180 permutations of aabbde, the 90 permutations of aabbee, the 60 permutations of aacccd, and the 60 permutations of aaccce.
MATHEMATICA
A384686[n_] := 2^(n - 4)*(5*Binomial[n, 5] + 6*Binomial[n, 4]);
Array[A384686, 30, 0] (* Paolo Xausa, Jun 13 2025 *)
LinearRecurrence[{12, -60, 160, -240, 192, -64}, {0, 0, 0, 0, 6, 70}, 40] (* Harvey P. Dale, Jul 19 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Jun 07 2025
STATUS
approved
