%I #39 Mar 10 2020 13:57:16
%S 3,2,6,11,26,57,129,289,650,1460,3281,7372,16565,37221,83635,187926,
%T 422266,948823,2131986,4790529,10764221,24186985,54347662,122118088,
%U 274396853,616564132,1385407029,3112981337,6994805571,15717185450,35316195134,79354770147,178308549978
%N Sum of n-th powers of the three roots of x^3-2*x^2-x+1.
%C 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.
%C x1 = 1/(2*cos(Pi/7)),
%C x2 = 1/(-2*cos(2*Pi/7)),
%C x3 = 1/(-2*cos(4*Pi/7)).
%H Colin Barker, <a href="/A274975/b274975.txt">Table of n, a(n) for n = 0..1000</a>
%H Kai Wang, <a href="https://www.researchgate.net/publication/337943524_Fibonacci_Numbers_And_Trigonometric_Functions_Outline">Fibonacci Numbers And Trigonometric Functions Outline</a>, (2019).
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-1).
%F G.f.: -(x^2+4*x-3)/(x^3-x^2-2*x+1). - _Alois P. Heinz_, Jul 14 2016
%F a(0)=3, a(1)=2, a(2)=6; thereafter a(n)=2*a(n-1)+a(n-2)-a(n-3).
%F a(n) = (2*cos(Pi/7))^(-n) + (-2*cos(2*Pi/7))^(-n) + (-2*cos(4*Pi/7))^(-n).
%F a(n) = A033304(n-1) for n>0.
%t CoefficientList[Series[-(x^2 + 4 x - 3)/(x^3 - x^2 - 2 x + 1), {x, 0, 32}], x] (* _Michael De Vlieger_, Jul 14 2016 *)
%o (PARI) Vec(-(x^2+4*x-3)/(x^3-x^2-2*x+1) + O(x^50)) \\ _Colin Barker_, Aug 02 2016
%Y Cf. A096975.
%Y 3 followed by terms of A033304.
%K nonn,easy
%O 0,1
%A _Kai Wang_, Jul 14 2016