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!)
A352971 Moments of the distribution of position of the first occurrence of pattern aa in a random ternary word. 0
1, 12, 258, 8274, 353742, 18904602, 1212354798, 9070656551, 7756033173342, 746093257148442, 79745110236049038, 9375786203927344554, 1202540991574287431742, 167091435183140588426682, 25003060551369349424359278, 4008624526767825553573112394 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Let X be the random variable that assigns to each word on alphabet {a,b,c} the number of letters required for the first occurrence of the pattern aa. Then a(n) = E(X^n).

Let X(m,k) be the random variable that assigns to each m-ary word the number of letters required for the first occurrence of the pattern aa...a (k copies of a). The moment generating function for X(m,k) is G(exp(t)) where G(t) = T(t/m), T(z) = z^k/(z^k + c(z)(1- m*z)), c(z) = (1-z^k)/(1-z).

LINKS

Table of n, a(n) for n=0..15.

Philippe Flajolet and Robert Sedgewick, Analytic Combinatorics, Cambridge Univ. Press, 2009, page 59.

FORMULA

E.g.f.: exp(2t)/(9 - 6*exp(t) - 2*exp(2t)).

a(n) ~ n! * (3 - sqrt(3)) / (12 * (log(3*(sqrt(3) - 1)/2))^(n+1)). - Vaclav Kotesovec, Apr 13 2022

MATHEMATICA

nn = 15; c[z_] := (1 - z^k)/(1 - z);

T[z_] := z^k/(z^k + (1 - m z) c[z]); G[t_] := T[t/m];

Range[0, nn]! CoefficientList[Series[G[Exp[t]] /. {k -> 2, m -> 3}, {t, 0, nn}], t]

CROSSREFS

Cf. A302922.

Sequence in context: A113091 A053324 A297717 * A138451 A295844 A113672

Adjacent sequences:  A352968 A352969 A352970 * A352972 A352973 A352974

KEYWORD

nonn

AUTHOR

Geoffrey Critzer, Apr 12 2022

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 July 2 21:48 EDT 2022. Contains 355029 sequences. (Running on oeis4.)