OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,-2).
FORMULA
G.f.: (1-4x+4x^2)/(1-x+2x^2).
From G. C. Greubel, Jun 13 2016: (Start)
a(n) = a(n-1) - 2*a(n-2).
a(n) = -(2^((n+2)/2)/sqrt(7))*( 2*sin(n*arctan(sqrt(7))) + sqrt(2)*sin((n+1)*arctan(sqrt(7))) ), n>=1, and a(0)=1. (End)
MATHEMATICA
a[n_] := Sin[n*ArcTan[Sqrt[7]]]; FullSimplify[Join[{1}, Table[- (2^(n/2 + 1)/Sqrt[7])*(2*a[n] + Sqrt[2]*a[n + 1]), {n, 1, 100}]]] (* or *) Join[{1}, LinearRecurrence[{1, -2}, {-3, -1}, 100]] (* G. C. Greubel, Jun 13 2016 *)
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Nov 03 2009
STATUS
approved