OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,3,1,0,-3)
FORMULA
G.f. x*(1+2*x) / ( (x-1)*(1+x+x^2)*(3*x^2-1) ). - R. J. Mathar, Mar 22 2011
a(0)=0, a(1)=1, a(2)=2, a(3)=3, a(4)=7, a(n)=3*a(n-2)+a(n-3)-3*a(n-5). - Harvey P. Dale, Aug 23 2013
EXAMPLE
34 = 1021 (base 3) passes the test.
MATHEMATICA
CoefficientList[Series[x (1+2x)/((x-1)(1+x+x^2)(3x^2-1)), {x, 0, 40}], x] (* or *) LinearRecurrence[{0, 3, 1, 0, -3}, {0, 1, 2, 3, 7}, 40] (* Harvey P. Dale, Aug 23 2013 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved