OFFSET
0,5
COMMENTS
6*a(n) is the number of words of length n defined on 5 letters that have exactly one a, exactly one b, and exactly two c's and no d's or exactly four d's and no c's (see examples).
3*a(n) is the number of words of length n defined on 4 letters that have exactly two a's and exactly two b's and no c's or exactly two a's and exactly four c's and no b's. For example, 3*a(6) = 3*35 = 105 since the words are the 90 permutations of aabbdd and the 15 permutations of aacccc.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (7,-21,35,-35,21,-7,1).
FORMULA
a(n) = -(4/3)*n + (203/72)*n^2 - (33/16)*n^3 + (97/144)*n^4 - (5/48)*n^5 + (1/144)*n^6.
G.f.: (7*x^6 - 4*x^5 + 2*x^4)/(1-x)^7.
E.g.f.: exp(x)*(x^4/12 + x^6/144).
a(n) = 7*a(n-1) - 21*a(n-2) + 35*a(n-3) - 35*a(n-4) + 21*a(n-5) - 7*a(n-6) + a(n-7) for n > 6. - Chai Wah Wu, Jun 11 2025
EXAMPLE
6*a(4) = 6*2 = 12 since the words are the 12 permutations of abcc.
6*a(7) = 6*105 = 630 since the words are the 420 permutations of abcceee and the 210 permutations of abdddde.
MATHEMATICA
A384733[n_] := 5*Binomial[n, 6] + 2*Binomial[n, 4];
Array[A384733, 50, 0] (* Paolo Xausa, Jun 11 2025 *)
PROG
(Python)
def A384733(n): return n*(n*(n*(n*(n*(n-15)+97)-297)+406)-192)//144 # Chai Wah Wu, Jun 11 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Enrique Navarrete, Jun 08 2025
STATUS
approved
