OFFSET
0,2
COMMENTS
For n < 4 the constraint is voidly satisfied: each of the n-digit words satisfies the definition since there is no subword of length 4. - M. F. Hasler, Jan 13 2015
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000 (corrected by Georg Fischer, Jan 20 2019)
Index entries for linear recurrences with constant coefficients, signature (1,1,1).
FORMULA
G.f.: (1 + 2*x + 5*x^2 + 14*x^3 - 3*x^4 - 3*x^6)/(1 - x - x^2 - x^3). - Corrected by Colin Barker, Jan 12 2015
a(n) = a(n-1) + a(n-2) + a(n-3).
a(n) = A001590(n+1) * 12, for n>=4.
a(n) = A196700(n) * 6, for n>=4. - Alois P. Heinz, Jan 12 2015
MATHEMATICA
Join[{1, 3, 9, 27}, LinearRecurrence[{1, 1, 1}, {36, 72, 132}, 30]] (* Harvey P. Dale, Mar 12 2015 *)
PROG
(PARI) Vec((1+2*x+5*x^2+14*x^3-3*x^4-3*x^6)/(1-x-x^2-x^3) + O(x^100)) \\ Colin Barker, Jan 12 2015; extended to indices 0..3 by M. F. Hasler, Jan 13 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Andrew Woods, Jan 12 2015
EXTENSIONS
a(0)-a(3) from M. F. Hasler, Jan 13 2015
STATUS
approved