login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213873 Number of words w where each letter of the ternary 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, 6, 15, 106, 1075, 13326, 188196, 2914395, 48349015, 846167608, 15456538890, 292407484590, 5695907466120, 113735416237808, 2319861446805120, 48199341935153655, 1017747539683821855, 21799192392184931700, 472889100118180757550, 10375788309377599231200 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..706

FORMULA

a(n) ~ 797*sqrt(3)*27^(n-1)/(16*Pi*n^4). - Vaclav Kotesovec, Aug 13 2013

For n > 1, a(n) = 3*(-4 + 108*n - 397*n^2 - 72*n^3 + 797*n^4) * (3*n-4)! / (2*(2*n-1)*(2*n+1) * (n-2)! * (n+1)! * (n+2)!). - Vaclav Kotesovec, Sep 02 2014

EXAMPLE

a(0) = 1: the empty word.

a(1) = 6: abc, acb, bac, bca, cab, cba, (all permutations of 3 letters).

a(2) = 15: aabbcc, aabcbc, aacbbc, ababcc, abacbc, abcabc, acabbc, acbabc, baabcc, baacbc, bacabc, bcaabc, caabbc, cababc, cbaabc.

MAPLE

a:= proc(n) option remember; `if`(n<2, [1, 6][n+1], (6*n-9) *(3*n-4)

      *(3*n-5) *(797*n^4-72*n^3-397*n^2+108*n-4) *a(n-1) / ((n+1)

      *(n+2) *(2*n+1) *(797*n^4-3260*n^3+4601*n^2-2502*n+360)))

    end:

seq(a(n), n=0..20);

MATHEMATICA

Flatten[{1, 6, Table[3*(-4 + 108*n - 397*n^2 - 72*n^3 + 797*n^4) * (3*n-4)! / (2*(2*n-1)*(2*n+1) * (n-2)! * (n+1)! * (n+2)!), {n, 2, 20}]}] (* Vaclav Kotesovec, Sep 02 2014 *)

CROSSREFS

Column k=3 of A213275.

Sequence in context: A013222 A013228 A133472 * A219771 A087137 A056317

Adjacent sequences:  A213870 A213871 A213872 * A213874 A213875 A213876

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Jun 23 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 9 07:42 EDT 2022. Contains 356019 sequences. (Running on oeis4.)