OFFSET
0,2
COMMENTS
From the Noonan and Zeilberger link below, a(n) is the number of words in the 26-letter English alphabet {A,B,C,...,X,Y,Z} that do not contain any of the "bad" words: PIPI or CACA or PICA or CAPI. The expected wait time to see an occurrence of one of any of these four words is G(1/26) = 114582. The expected wait time to see all four of these words is 979223595402/1028195 (approximately 952371). - Geoffrey Critzer, May 17 2014
LINKS
J. Noonan and D. Zeilberger, The Goulden-Jackson cluster method: extensions, applications and implementations
Index entries for linear recurrences with constant coefficients, signature (26,-2,52,-4).
FORMULA
G.f.: (1+2*x^2)/(1-26*x+2*x^2-52*x^3+4*x^4).
a(0)=1, a(1)=26, a(2)=676, a(3)=17576, a(n)=26*a(n-1)-2*a(n-2)+ 52*a(n-3)- 4*a(n-4). - Harvey P. Dale, Oct 04 2014
MATHEMATICA
sol=Solve[{A==-z^4-z^2A-z^2D, B==-z^4-z^2B-z^2C, C==-z^4-z^2A-z^2D, D==-z^4-z^2B-z^2C}, {A, B, C, D}]; nn=20; CoefficientList[Series[1/(1-26z-A-B-C-D)/.sol, {z, 0, nn}], z] (* Geoffrey Critzer, May 17 2014 *)
LinearRecurrence[{26, -2, 52, -4}, {1, 26, 676, 17576}, 30] (* Harvey P. Dale, Oct 04 2014 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 08 2011
STATUS
approved