OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (8,-28,56,-70,56,-28,8,-1).
FORMULA
a(n) = n*(11954-29577*n+27640*n^2-12831*n^3+3234*n^4-420*n^5+24*n^6)/24.
G.f.: x*(1+38*x+27*x^2+101*x^3+610*x^4+693*x^5+3570*x^6)/(1-x)^8.
EXAMPLE
a(0) = 0: no word of length 7 is possible for an empty alphabet.
a(1) = 1: aaaaaaa for alphabet {a}.
a(2) = 46: aaaaaaa, aaaaaab, aaaaaba, aaaaabb, aaaabaa, aaaabab, aaaabba, aaaabbb, aaabaaa, aaabaab, aaababa, aaababb, aaabbaa, aaabbab, aaabbba, aabaaaa, aabaaab, aabaaba, aabaabb, aababaa, aababab, aababba, aabbaaa, aabbaab, aabbaba, abaaaaa, abaaaab, abaaaba, abaaabb, abaabaa, abaabab, abaabba, ababaaa, ababaab, abababa, baaaaaa, baaaaab, baaaaba, baaaabb, baaabaa, baaabab, baaabba, baabaaa, baabaab, baababa, bbbbbbb for alphabet {a,b}.
MAPLE
a:= n-> n*(11954+ (-29577 +(27640 +(-12831+(3234+(-420+24*n)*n) *n) *n) *n) *n)/24:
seq(a(n), n=0..40);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Jun 08 2012
STATUS
approved