login
A255631
Number of n-length words on {0,1,2,3} avoiding runs of zeros of length 1 (mod 3).
1
1, 3, 10, 34, 114, 382, 1282, 4302, 14434, 48430, 162498, 545230, 1829410, 6138222, 20595586, 69104398, 231866082, 777980590, 2610359362, 8758542414, 29387549602, 98604086254, 330846428418, 1110089483662, 3724684796002, 12497440101678, 41932678239682
OFFSET
0,2
FORMULA
a(n+3) = 3*a(n+2) + 4*a(n) with n > 0, a(0) = 1, a(1) = 3, a(2) = 10.
G.f.: -(x^2+1) / (4*x^3+3*x-1). - Colin Barker, Mar 20 2015
MATHEMATICA
RecurrenceTable[{a[0] == 1, a[1] == 3, a[2] == 10, a[n] == 3* a[n - 1] + 4*a[n - 3]}, a[n], {n, 0, 25}]
LinearRecurrence[{3, 0, 4}, {1, 3, 10}, 40] (* Harvey P. Dale, Aug 01 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Milan Janjic, Feb 28 2015
STATUS
approved