OFFSET
0,1
COMMENTS
LINKS
Muniru A Asiru, Table of n, a(n) for n = 0..600
Index entries for linear recurrences with constant coefficients, signature (-3, -3, -2).
FORMULA
a(n) = -3a(n-1) - 3a(n-2) - 2a(n-3), with a(0)=a(1)=a(2)=2, a(3)=-7.
G.f.: (2+8*x+14*x^2+9*x^3)/((2*x+1)*(1+x+x^2)). - R. J. Mathar, Apr 09 2009
a(0)=2; a(n) = (1/2)*(-2)^n - 3*cos(2*Pi*n/3) + sqrt(3)*sin(2*Pi*n/3) for n >= 1. - Richard Choulet, Apr 23 2009
MAPLE
a := proc(n) option remember: if n=0 then 2 elif n=1 then 2 elif n=2 then 2 elif n=3 then -7 elif n>=4 then -3*procname(n-1) - 3*procname(n-2) - 2*procname(n-3) fi; end:
seq(a(n), n=0..100); # Muniru A Asiru, Jan 27 2018
PROG
(GAP) a := [2, 2, 2, -7];; for n in [5..10^3] do a[n] := -3*a[n-1] - 3*a[n-2] - 2*a[n-3]; od; a; # Muniru A Asiru, Jan 27 2018
CROSSREFS
KEYWORD
sign
AUTHOR
Paul Curtz, Mar 31 2009
EXTENSIONS
Edited and extended by R. J. Mathar, Apr 09 2009
STATUS
approved