OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (7,0,1,-7).
FORMULA
G.f.: x*(1+x+2*x^2) / ( (x-1)*(7*x-1)*(1+x+x^2) ). - R. J. Mathar, Apr 29 2015
a(n) = 5/57*A049347(n-1) + 3/57*A049347(n) + 29/171*A000420(n) - 2/9. - Enxhell Luzhnica, Apr 27 2016
a(n) = (29*7^n + 7*sqrt(3)*sin(2*Pi*n/3) + 9*cos(2*Pi*n/3) - 38)/171. - Ilya Gutkovskiy, Apr 27 2016
MATHEMATICA
Rest@ CoefficientList[Series[x (1 + x + 2 x^2)/((x - 1) (7 x - 1) (1 + x + x^2)), {x, 0, 19}], x] (* Michael De Vlieger, Apr 28 2016 *)
PROG
(PARI) Vec(x*(1+x+2*x^2) / ( (x-1)*(7*x-1)*(1+x+x^2) ) + O(x^30)) \\ Michel Marcus, Apr 28 2016
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved