login
A255633
Number of n-length words on {0,1,2,3,4,5} avoiding runs of zeros of length 1 (mod 3).
5
1, 5, 26, 136, 710, 3706, 19346, 100990, 527186, 2752006, 14365970, 74992966, 391476866, 2043580150, 10667858546, 55688153926, 290702250530, 1517518403926, 7921720943186, 41352818219110, 215869201519106, 1126876333254646, 5882498575587890, 30707708087054086
OFFSET
0,2
FORMULA
a(n+3) = 5*a(n+2) + 6*a(n) with n > 0, a(0) = 1, a(1) = 5, a(2) = 26.
G.f.: (1 + x^2)/(1 - 5*x - 6*x^3). - Andrew Howroyd, May 01 2020
MATHEMATICA
RecurrenceTable[{a[0] == 1, a[1] == 5, a[2] == 26, a[n] == 5* a[n - 1] + 6*a[n - 3]}, a[n], {n, 0, 20}]
LinearRecurrence[{5, 0, 6}, {1, 5, 26}, 30] (* Harvey P. Dale, Aug 11 2023 *)
PROG
(PARI) Vec((1 + x^2)/(1 - 5*x - 6*x^3) + O(x^30)) \\ Andrew Howroyd, May 01 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Milan Janjic, Feb 28 2015
EXTENSIONS
Terms a(20) and beyond from Andrew Howroyd, May 01 2020
STATUS
approved