OFFSET
0,1
COMMENTS
LINKS
Colin Barker, Table of n, a(n) for n = 0..900
Index entries for linear recurrences with constant coefficients, signature (7,49,49).
FORMULA
G.f.: (-49*x^2-14*x+3)/(-49*x^3-49*x^2-7*x+1).
a(n) = (-sqrt(7)*tan(Pi/7))^n + (-sqrt(7)*tan(2*Pi/7))^n + (-sqrt(7)*tan(4*Pi/7))^n.
a(0)=3, a(1)=7, a(2)=147; thereafter a(n) = 7*a(n-1) + 49*a(n-2) + 49*a(n-3).
MATHEMATICA
CoefficientList[Series[(-49 x^2 - 14 x + 3)/(-49 x^3 - 49 x^2 - 7 x + 1), {x, 0, 20}], x] (* Michael De Vlieger, Jul 19 2016 *)
LinearRecurrence[{7, 49, 49}, {3, 7, 147}, 30] (* Harvey P. Dale, Jan 01 2023 *)
PROG
(PARI) terms(n) = my(a=3, b=7, c=147, d=0, i=0); while(i < n, if(i==0, print1(a, ", "); i++, if(i==1, print1(b, ", "); i++, if(i==2, print1(c, ", "); i++, while(i < n, d=7*c + 49*b + 49*a; print1(d, ", "); a=b; b=c; c=d; i++)))))
/* Call function as follows to print initial 10 terms: */
terms(10) \\ Felix Fröhlich, Jul 19 2016
(PARI) polsym(x^3 - 7*x^2 - 49*x - 49, 30) \\ Charles R Greathouse IV, Jul 20 2016
(PARI) Vec((1-7*x)*(3+7*x)/(1-7*x-49*x^2-49*x^3) + O(x^30)) \\ Colin Barker, Jul 23 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kai Wang, Jul 19 2016
STATUS
approved