OFFSET
0,2
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,0,-1,3).
FORMULA
O.g.f.: -(1+x+2*x^2)/((3*x-1)*(x+1)*(x^2-x+1)) = -(3/2)/(3*x-1)+(1/3)*(x-2)/(x^2-x+1)+(1/ 6)/(x+1). - R. J. Mathar, Nov 28 2007
a(n) = (1/2)*3^(n+1) + (1/6)*(-1)^n - (2/3)*cos(Pi*n/3). Or, a(n) = (1/2)*3^(n+1) + (1/2)*[ -1; -1; 1; 1; 1; -1]. - Richard Choulet, Jan 02 2008
a(n+1) - 3a(n) = A132367(n+1). - Paul Curtz, Dec 02 2007
6*a(n) = (-1)^n +3^(n+2) -2*A057079(n+1). - R. J. Mathar, Oct 03 2021
MATHEMATICA
LinearRecurrence[{3, 0, -1, 3}, {1, 4, 14, 41}, 50] (* Paolo Xausa, Dec 05 2023 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; 3, -1, 0, 3]^n*[1; 4; 14; 41])[1, 1] \\ Charles R Greathouse IV, Oct 08 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 24 2007
STATUS
approved