login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A213874
Number of words w where each letter of the 4-ary alphabet occurs n times and for every prefix z of w we have #(z,a_i) = 0 or #(z,a_i) >= #(z,a_j) for all j>i and #(z,a_i) counts the occurrences of the i-th letter in z.
2
1, 24, 105, 2575, 115955, 7364321, 586368681, 54862627919, 5795673908453, 673174876488400, 84386541996407430, 11262879538848476760, 1584243362361105791448, 233004893382083549345048, 35610340402841609968092950, 5627093485549459958456588775
OFFSET
0,2
LINKS
FORMULA
For n > 1, a(n) = 8*(9297776*n^10 + 17051200*n^9 - 11545329*n^8 - 20688255*n^7 + 7760028*n^6 + 7548270*n^5 - 2879537*n^4 - 619195*n^3 + 326046*n^2 - 30420*n + 216) * (4*n-5)! / (3 * (2*n-1) * (2*n+1) * (2*n+3) * (9*n^2-9*n+2) * (9*n^2+9*n+2) * (n-2)! * (n+1)! * (n+2)! * (n+3)!). - Vaclav Kotesovec, Sep 02 2014
EXAMPLE
a(0) = 1: the empty word.
a(1) = 24: abcd, abdc, ..., dcab, dcba, (all permutations of 4 letters).
a(2) = 105: aabbccdd, aabbcdcd, aabbdccd, ..., dcaabbcd, dcababcd, dcbaabcd.
MATHEMATICA
Flatten[{1, 24, Table[8*(9297776*n^10 + 17051200*n^9 - 11545329*n^8 - 20688255*n^7 + 7760028*n^6 + 7548270*n^5 - 2879537*n^4 - 619195*n^3 + 326046*n^2 - 30420*n + 216) * (4*n-5)! / (3 * (2*n-1) * (2*n+1) * (2*n+3) * (9*n^2-9*n+2) * (9*n^2+9*n+2) * (n-2)! * (n+1)! * (n+2)! * (n+3)!), {n, 2, 20}]}] (* Vaclav Kotesovec, Sep 02 2014 *)
CROSSREFS
Column k=4 of A213275.
Sequence in context: A044275 A044656 A011199 * A100149 A013980 A100150
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 23 2012
STATUS
approved