OFFSET
0,5
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3, 0, -1, 3).
FORMULA
3*a(n) - a(n+1) = hexaperiodic 2, 2, 2, -2, -2, -2 = 2*A130151.
From Richard Choulet, Jan 02 2008: (Start)
a(n) = (1/14)*3^n + (1/6)*(-1)^n + (16/21)*cos(Pi*n/3) + (8*sqrt(3)/21)*sin(Pi*n/3).
a(n) = (1/14)*3^n + (1/14)*[13; 11; 5; -13; -11; -5]. (End)
G.f.: ( -1+2*x+2*x^2+x^3 ) / ( (3*x-1)*(1+x)*(x^2-x+1) ). - Harvey P. Dale, Apr 15 2012
42*a(n) = 7*(-1)^n +8*A167380(n+3) +3^(n+1). - R. J. Mathar, Oct 03 2021
MATHEMATICA
LinearRecurrence[{3, 0, -1, 3}, {1, 1, 1, 1}, 40] (* Harvey P. Dale, Apr 15 2012 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Dec 06 2007
STATUS
approved