OFFSET
0,3
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
H. S. M. Coxeter and W. O. J. Moser, Generators and Relations for Discrete Groups, 4th ed., Springer-Verlag, NY, reprinted 1984, p. 134.
Index entries for linear recurrences with constant coefficients, signature (9,-26,25,-4).
FORMULA
G.f.: 1 -x*(2*x-1)*(x^2-4*x+1)/((4*x-1)*(x^3-6*x^2+5*x-1)). - Michael Somos, Jul 21, 2002
a(n) = 9*a(n-1) - 26*a(n-2) + 25*a(n-3) - 4*a(n-4) for n>4. - Colin Barker, Apr 26 2019
EXAMPLE
The words tttt=tsts=stst=1 so a(2)=3.
MATHEMATICA
LinearRecurrence[{9, -26, 25, -4}, {1, 1, 3, 10, 35}, 30] (* Harvey P. Dale, Apr 16 2022 *)
PROG
(PARI) a(n)=if(n<1, n==0, sum(k=-(n-1)\7, (n-1)\7, C(2*n-1, n+7*k)))
(PARI) Vec((1 - 8*x + 20*x^2 - 16*x^3 + 2*x^4) / ((1 - 4*x)*(1 - 5*x + 6*x^2 - x^3)) + O(x^30)) \\ Colin Barker, Apr 26 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jamaine Paddyfoot (jay_paddyfoot(AT)hotmail.com) and John W. Layman, Jul 08 2002
STATUS
approved