OFFSET
0,3
COMMENTS
a(n) is the number of words of length n defined on 5 letters that contain one a (and no b's or c's), two b's (and no a's or c's) or three c's (and no a's or b's), and, in all cases, one d and any number of e's.
LINKS
Jakub Buczak, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = 1/6*n^4 - 1/2*n^3 + 4/3*n^2 - n.
G.f.: x^2*(3*x^2 - x + 2)/(1 - x)^5.
E.g.f.: exp(x)*(x^2 + x^3/2 + x^4/6).
EXAMPLE
a(4) = 28 since the words are the 12 permutations of adee, the 12 permutations of bbde, and the 4 permutations of cccd.
a(5) = 70 since the words are the 20 permutations of adeee, the 30 permutations of bbdee, and the 20 permutations of cccde.
MATHEMATICA
a[n_] := Sum[k * Binomial[n, k], {k, 2, 4}]; Array[a, 50, 0] (* Amiram Eldar, Jun 22 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Jun 19 2025
STATUS
approved
