A174737 a(n) = a(n-1) - a(n-2), with a(0)=2, a(1)=-1.
2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2
Offset: 0
References
- Rosen, Discrete Mathematics and its Applications, McGraw-Hill, 2007, p. 456, Question 1b.
Links
- Index entries for linear recurrences with constant coefficients, signature (1,-1).
Programs
-
Maple
a[0] := 2: a[1] := -1: for n from 2 to 80 do a[n] := a[n-1]-a[n-2] end do: seq(a[n], n = 0 .. 75); # Emeric Deutsch, Apr 05 2010
Formula
G.f.: ( 2-3*x ) / ( 1-x+x^2 ). - R. J. Mathar, Jan 08 2011
a(n) = 2*cos(n*Pi/3)-4*sin(n*Pi/3)/sqrt(3). - Wesley Ivan Hurt, Sep 01 2025
Extensions
Typo in definition fixed by Emeric Deutsch, Apr 05 2010