OFFSET
0,3
COMMENTS
Sequence identical to its third differences.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3, -3, 2).
FORMULA
a(n+1) - 2*a(n) = hexaperiodic 1, 5, 4, -1, -5, -4, A130815.
a(n) = 2^n - 2*cos((Pi*n)/3) - (4*sqrt(3)/3)*sin((Pi*n)/3). Or, a(n) = 2^n + [ -2; -3; -1; 2; 3; 1]. - Richard Choulet, Dec 31 2007
G.f.: (1+x)*(1-3*x) / ( (2*x-1)*(x^2-x+1) ). - R. J. Mathar, Nov 07 2015
MATHEMATICA
a = {-1, -1, 3}; Do[AppendTo[a, 3*a[[ -1]] - 3*a[[ -2]] + 2*a[[ -3]]], {40}]; a (* Stefan Steinerberger, Dec 22 2007 *)
LinearRecurrence[{3, -3, 2}, {-1, -1, 3}, 31] (* Ray Chandler, Sep 23 2015 *)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Dec 13 2007
STATUS
approved