OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,0,1,-3).
FORMULA
G.f.: x*(1+2*x) / ( (x-1)*(3*x-1)*(1+x+x^2) ). - R. J. Mathar, Apr 27 2015
MATHEMATICA
Module[{nn=30, d}, d=PadRight[{}, nn, {1, 2, 0}]; Table[FromDigits[Take[d, n], 3], {n, nn}]] (* or *) LinearRecurrence[{3, 0, 1, -3}, {1, 5, 15, 46}, 30] (* Harvey P. Dale, Apr 25 2015 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved