OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-3,-3).
FORMULA
a(n) = -3*a(n-1) - 3*a(n-2) for n > 2; a(0) = 1, a(1) = 2, a(2) = -2.
a(n) = 2*A123877(n-1), n>0.
G.f.: 1+2*x*(1+2*x)/(1+3*x+3*x^2).
a(6*m + 3) = 0, m>=0. - G. C. Greubel, Jul 27 2016
MATHEMATICA
Join[{1, 2, -2}, LinearRecurrence[{-3, -3}, {0, 6}, 25]] (* G. C. Greubel, Jul 27 2016 *)
LinearRecurrence[{-3, -3}, {1, 2, -2}, 40] (* Harvey P. Dale, Jul 21 2024 *)
PROG
(Magma) [ n le 2 select n else n eq 3 select -2 else -3*Self(n-1)-3*Self(n-2): n in [1..37] ]; // Klaus Brockhaus, Dec 03 2009
CROSSREFS
KEYWORD
sign
AUTHOR
Paul Curtz, Dec 01 2009
EXTENSIONS
Edited and extended by Klaus Brockhaus, Dec 03 2009
STATUS
approved