OFFSET
0,1
COMMENTS
a(n) is x1^n + x2^n + x3^n, where x1, x2, x3 are the roots of the polynomial x^3-2*x^2-x+1.
x1 = 1/(2*cos(Pi/7)),
x2 = 1/(-2*cos(2*Pi/7)),
x3 = 1/(-2*cos(4*Pi/7)).
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Kai Wang, Fibonacci Numbers And Trigonometric Functions Outline, (2019).
Index entries for linear recurrences with constant coefficients, signature (2,1,-1).
FORMULA
G.f.: -(x^2+4*x-3)/(x^3-x^2-2*x+1). - Alois P. Heinz, Jul 14 2016
a(0)=3, a(1)=2, a(2)=6; thereafter a(n)=2*a(n-1)+a(n-2)-a(n-3).
a(n) = (2*cos(Pi/7))^(-n) + (-2*cos(2*Pi/7))^(-n) + (-2*cos(4*Pi/7))^(-n).
a(n) = A033304(n-1) for n>0.
MATHEMATICA
CoefficientList[Series[-(x^2 + 4 x - 3)/(x^3 - x^2 - 2 x + 1), {x, 0, 32}], x] (* Michael De Vlieger, Jul 14 2016 *)
PROG
(PARI) Vec(-(x^2+4*x-3)/(x^3-x^2-2*x+1) + O(x^50)) \\ Colin Barker, Aug 02 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kai Wang, Jul 14 2016
STATUS
approved